|
|
|
|
|
by snide
2307 days ago
|
|
Sorry for seeing this late. Basically, iTerm allows you to send Escape sequences and even Vim special characters. 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. |
|
It looks like you're changing your .vimrc itself.
How would I get iTerm to just send cmd+p as cmd+p? I tried making a keymapping in that menu with "Key Combination": "cmd+p", "Action": "Do Not Remap Modifiers". Rather than sending it to VIM, it still brings up a print screen dialogue.
Similarly, I can't get cmd+[, cmd+], cmd+h (or j, k, l, etc) to send through to VIM.
With both VS Code and MacVim, that stuff is easily configurable. My failure (thus far) to figure out how to do the same with iTerm is why I don't really use it.