|
|
|
|
|
by AlchemistCamp
2307 days ago
|
|
Really? I didn't think iTerm would pass along cmd keys, which is the primary reason I use MacVim instead. For example, I use these kinds of mappings: nmap <D-j> <C-j>
nmap <D-k> <C-k>
nmap <D-h> <C-h>
nmap <D-l> <C-l>
nmap <C-[> <C-T>
nmap <D-]> <C-]>
nmap <D-[> <C-]>
nmap <D-p> :CtrlP pwd<cr>
nmap <D-r> :CtrlPBufTag<cr>
nmap <D-e> :CtrlPMRUFiles<cr>
This way, when on a Mac I can use cmd in place of ctrl for various commands I use all the time that are less convenient with ctrl.In my .gvimrc, I added the following to make sure that cmd-p and cmd-l don't get incercepted:
"Disable the print key for MacVim"
if has("gui_macvim")
macmenu &File.Print key=<nop>
macmenu &Tools.List\ Errors key=<nop>
"macmenu &MacVim.Hide\ MacVim key=<nop>
set macligatures
endif If there's any possible way to accomplish the same with iTerm, I'd give it another try! |
|
Here's a screenshot http://snid.es/d156c6b7deea
In mine, under profiles/keys, I've set ⌘s to [17~
This is essentially F6, which I then bind in vim to
nnoremap <F6> :w<CR> imap <F6> <Esc>:w<CR>
I do this with a lot of ⌘ or otherwise unbindable settings (again, this only effects iterm2). This is how you can get iterm2 to pick up any keybinding and send it to vim as something else.