logo       

Re: Ctrl-^ (was Re: Vim with Thunderbird): msg#00108

editors.vim.mac

Subject: Re: Ctrl-^ (was Re: Vim with Thunderbird)

Nicolas Weber wrote:
Hi,

It does seem to me that the OS X port of Vim is somewhat less mature than the ports for Linux and Windows. I've had some problems with unicode font rendering, keyboard support (for example, ctrl-^ doesn't work out-of-the-box), etc. But I expect the rough edges to be smoothed out over time.

can you try if this patch [1] fixed the ctrl-6 issue for you?

[1]: http://wiki.macvim.org/wiki/VimPatches/Ctrl6

Hi, Nico,

I just tested your patch, and unfortunately it doesn't fix the problem I have with CTRL-^. If I understand the patch correctly, it hard-wires CTRL-2 and CTRL-6 to their shifted equivalents (CTRL-@ and CTRL-^). I believe the patch does as it is intended because the patched version of Vim circumvents my work-around for the still-broken CTRL-^ behavior.

According to the Vim manual, pressing CTRL-^ (that is, ctrl-shift-6) should switch to the previously edited file. On Linux and Windows, this works for me, but on my mac it doesn't work; instead, pressing CTRL-^ (and CTRL-6, for that matter) behaves as if I'd pressed '6' without either shift or control. So CTRL-^j results in the cursor moving down 6 lines instead of switching to the previous buffer and going down one line.

My work-around for this problem is the following map in my .vimrc:

" mac-vim 7.206 doesn't properly handle CTRL-^ (and CTRL-6) to
" edit the previous buffer. This mapping is a work-around.
if has("mac")
map <c-6> :e #<CR>
endif

When I apply your patch, my work-around no longer fixes the problem, since CTRL-6 is hard-wired to CTRL-^, and CTRL-^ itself doesn't work properly.

Also, when I'm not using your patch, I'm unable to map CTRL-^ to my work-around with either of the following:

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

But when I map CTRL-6 as I've done in my .vimrc, I can use both CTRL-6 and CTRL-^ to invoke my mapping.

I don't really understand what's going on here, but I'm content with my work-around until a full solution can be implemented.

Thanks,
Michael Henry
P.S. I'm using Vim 7.0.206 for these tests.



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

News | FAQ | advertise