On gvim I can used
imap <C-s> <ESC>:w
imap <C-c> and etc...
But I cant on vim (terminal) used the imap? How can i use the some imap on the terminal?
feedback
|
|
The imap command works fine in a terminal. The problem is that a terminal treats some control characters specially, using them to control terminal behavior, and does not forward those characters to the application running in the terminal. Ctrl-S and Ctrl-Q are normally used for flow control. Ctrl-C normally causes an INTR (interrupt) signal to be sent to the application. Applications can tell the terminal to not treat certain characters specially and to forward them instead. Vim handles Ctrl-C itself and you should be able to imap it. (I just tried it and it worked for me.) Vim does not tell the terminal to forward Ctrl-S and Ctrl-Q, however, so you would have to tell the terminal to do that yourself. One way is to execute this command at the shell prompt before running vim:
| |||
|
feedback
|