简体   繁体   中英

Control key remap not working in vim

I'm using a macbook pro with OS X 10.10.5 and vim 7.3. I've got the following remap inoremap <cu> <esc>viwU<esc>ea . Obviously, I expect the word under the cursor to be capitalized after pressing Ctrl-u, but instead it pages up. I can't seem to figure out why this isn't working. I see a few posts on remapping ctrl to cmd but I'd prefer to stick with cntrl - I use the same settings when working on a Windows machine.

As a note, I'm using a logitech keyboard, but it doesn't work on the mac keyboard as well.

inoremap creates an insert mode mapping. Using <cu> in normal mode moves the page up.

Your mapping should work if you hit <cu> in insert mode.

inoremap will create an insert mode mapping.

In this case, you may use noremap <cu> <esc>viwU<esc>ea to remap cu .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM