logo       

Re: [Fwd: Ctrl-^]: msg#00066

editors.vim.mac

Subject: Re: [Fwd: Ctrl-^]

Stephen Riehm wrote:

Strangely though, the following map provides a "close alternative".

map <S-C-6> <ESC>:w!<CR>:e#<CR>

Good luck though - maybe things have changed enough on the mac platform to allow ctrl-6 again.

You inspired me to test this map:

:map <c-6> :e #<CR>

On my version of Vim, this works for mapping ctrl-6 to edit the previous buffer (and it also makes ctrl-^ work as well). When I unmap <c-6>, neither ctrl-6 nor ctrl-^ switches to the previous buffer; instead, they both accumulate 6's as the numeric argument (e.g., `ctrl-6 k` moves 6 lines up).

So for me, at least, this is a good work-around pending a fix in the code base. I tested this on Vim 7.206, compiled as below:

:version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Mar 3 2007 15:21:47)
MacOS X (unix) version
Included patches: 1-206
Compiled by mike@mac
Huge version with Carbon GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval +browse ++builtin_terms +byte_offset +cindent
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv -cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse -mouseshape +mouse_dec -mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
-netbeans_intg -osfiletype +path_extra -perl +postscript +printer +profile
-python +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/Vim.app/Contents/Resources/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MAC -fno-common -fpas
cal-strings -Wall -Wno-unknown-pragmas -mdynamic-no-pic -pipe -I. -Iproto -DMACO
S_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -g -O
Linking:
gcc -L/usr/local/lib -o Vim -framework Carbon -lncurses -liconv


Michael Henry




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise