I'm used to using cmd-option + arrows to switch between tabs in Chrome. I'd like to do the same in Vim without having to learn vimscript right way. Any suggestions?

有帮助吗?

解决方案

Something like

:nnoremap <D-A-Down> <C-PageDown>
:nnoremap <D-A-Up> <C-PageUp>

should do it. The <D-> modifier is Mac-specific. For other options, see

:help keycodes

其他提示

You can use some alternative mappings. The terminal may not play nice with some of these because <Tab> is a control key already.

Something like:

nnoremap <C-t> :tabe<CR>                                                        
nnoremap <C-tab> :tabn<CR>                                                
nnoremap <C-S-tab> :tabp<CR>

This will not necessarily work depending on your terminal and terminal settings, so you would just have to learn to use other navigation keys.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top