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?
Asked
Active
Viewed 98 times
0
-
Are you using MacVim? Or Vim via the terminal? – Peter Rincker Mar 18 '14 at 14:50
-
I use both but mostly MacVim. I take it cmd wouldn't work in the terminal? – freddyrangel Mar 18 '14 at 14:51
-
As an alternative you may want to look into using [buffer's effectively](http://stackoverflow.com/a/21338192/438329) – Peter Rincker Mar 18 '14 at 15:34
-
Yeah I think you have a point Peter. I've been using Vim for a couple of months now and it's time I start using buffers a lot more. Thanks! – freddyrangel Mar 18 '14 at 15:41
2 Answers
2
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

benjifisher
- 5,054
- 16
- 18
2
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.

Explosion Pills
- 188,624
- 52
- 326
- 405