3

Control + 6 or Shift + Control + ^ will switch between the current file and the alternate file in vim. Its useful but I hate using the Control key and try to avoid it if possible. However, despite searching and experimenting I can't seem to map to my leader key. I think the problem is with numeric keys and the caret. Anybody have any ideas to get this working?

Thanks in advance

4

1 回答 1

7

这两个都有效。

nnoremap <leader>f <C-^>
nnoremap <leader>v :e #<CR>

它们目前被映射到前面有领导者的随机字母,因为我不确定你想要哪个。第二个是功能上等效的<C-^>行为:h CTRL-^。除了它不适用于没有名称的文件。

没有看到你尝试了什么,我无法告诉你出了什么问题。

于 2013-06-12T23:10:18.000 回答