It would be awesome if we could switch VimR tabs using ⌘-<number>, just like it happens in Chrome/Firefox/iTerm and probably a bunch of other apps.
What do you think?
This already works with normal gvim bindings:
https://github.com/askedrelic/dotfiles/blob/4e153e51a8e7421f7b6cc5466398f46e1a9b57d0/.vimrc#L913
Thanks! That's one impressive .vimrc. However, in VimR ⌘+1 is mapped the hard way to toggle "File Browser" 😢
Any way to turn it off?
This is related to #418... Maybe we should do it like the IdeaVim plugin for JetBrains IDEs...
@pjg you can turn off the File Browser in the Preferences > Tools menu. I turn off all the tools, then all Apple+# keys work!
@askedrelic thanks, this worked!
Alternatively, you can remap the File Browser, as you can with any macOS app (instead of turning it off).
App Shortcuts, VimR.app,Toggle File BrowserShift+Cmd+E to mimic VSCode)It'll look something like,

In my vim configuration I have,
" Switch tab with Cmd + [1-9].
nnoremap <d-1> :tabn 1<CR>
nnoremap <d-2> :tabn 2<CR>
nnoremap <d-3> :tabn 3<CR>
nnoremap <d-4> :tabn 4<CR>
nnoremap <d-5> :tabn 5<CR>
nnoremap <d-6> :tabn 6<CR>
nnoremap <d-7> :tabn 7<CR>
nnoremap <d-8> :tabn 8<CR>
nnoremap <d-9> :tabn 9<CR>
nnoremap <d-9> :tabn 0<CR>
inoremap <d-1> <C-o>:tabn 1<CR>
inoremap <d-2> <C-o>:tabn 2<CR>
inoremap <d-3> <C-o>:tabn 3<CR>
inoremap <d-4> <C-o>:tabn 4<CR>
inoremap <d-5> <C-o>:tabn 5<CR>
inoremap <d-6> <C-o>:tabn 6<CR>
inoremap <d-7> <C-o>:tabn 7<CR>
inoremap <d-8> <C-o>:tabn 8<CR>
inoremap <d-9> <C-o>:tabn 9<CR>
inoremap <d-9> <C-o>:tabn 0<CR>
and some additional nice ones are,
" Save file with CMD+s.
nnoremap <d-s> :w<CR>
inoremap <d-s> <C-o>:w<CR>
" Close current buffer/file with Cmd + w.
nnoremap <d-w> :tabclose<CR>
inoremap <d-w> <C-o>:tabclose<CR>
" Map CMD+z and CMD+Shift+z to undo/redo.
nnoremap <C-z> u
inoremap <C-z> <C-o>u
nnoremap <C-S-z> <C-r>
inoremap <C-S-z> <C-o><C-r>
" Map CMD+p to CtrlP.
nnoremap <d-p> :CtrlP<CR>
inoremap <d-p> <C-o>:CtrlP<CR>
If you want, I could add this to the wiki?
Feel free to do it. I hope that at some point I can implement a real keyboard shortcut management....
Most helpful comment
Alternatively, you can remap the File Browser, as you can with any macOS app (instead of turning it off).
App Shortcuts,a. set the Application to
VimR.app,b. set the Menu Title to
Toggle File Browserc. set the Keyboard Shortcut to whatever you want (I use
Shift+Cmd+Eto mimic VSCode)It'll look something like,
In my vim configuration I have,
and some additional nice ones are,