Saturday, October 24, 2015

Re: Character s is not work on vim maps

* 吴江 <wujiangthu@gmail.com>:
> When I use noremap <C-S> :update<CR> to map ctrl-s to save file,
> it's not work, and I use noremap <C-S-l> :update<CR> to
> map ctrl-shift-s works, since character s is not work
> and s will be translate only into shift in map? Thanks.

* Dr. Charles E. Campbell, Jr. <drchip@campbellfamily.biz> [2015-10-25 00:49]:
> Hello-I suspect you're using vim (as opposed to gvim) -
> and your terminal is taking the ctrl-s.

that's what i thought, too. but why does c-s-l work then?

anyway.. wujiangthu - it's not the 's' that doesnt work -
it is the CTRL-S which has a special meaning for terminals.
the CTRL-S is usually the "stop" command for them.
so the terminal "eats" it before vim gets to see it.

if you do use vim within a terminal then you
can unset the "stop" which CTRL-S gives it:
$ stty stop ""

now start vim and you will see that when you switch
to insert mode and type CTRL-S that a "^S" shows up.

however, you might want stop+start with CTRL-S
and CTRL-Q in your terminal at times. if so then
consider mapping command to other key combinations.

as the comma is on the same key with
DE+EN layouts i use ",," for updating:
map ,, :upd<cr>

Sven

--
--
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/d/optout.

No comments:

Post a Comment