Wednesday, December 11, 2013

Re: imapping issue

On Wednesday, December 11, 2013 8:57:20 AM UTC-8, ajabutex wrote:
> Hallo.
>
>
>
> On Vim I want to imap the following sequence of command under the hotkey
>
> Ctrl-S:
>
>
>
> imap <C-S> <Esc>:w<Enter>i
>
> imap <Ctrl>S <Esc>:w<Enter>i
>
>
>
> but it doesnt work, nor the first version nor the second one.
>
>
>
> It works properly if I change hotkey, for example:
>
>
>
> imap <F12> <Esc>:w<Enter>i
>
>
>
> works as one can expect.
>
>
>
> What is wrong with Ctrl_S?

Add to .bashrc:
# Disable Flow-control so these keys are available for mapping C-S/C-Q
stty -ixon

Add to .vimrc:
" Save file
map <C-s> :write<CR>
map! <C-s> <Esc>:write<CR>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment