You are using *noremap
wrong:
When you use *noremap
, you ask Vim to use the original meaning of S
.
When you use *map
, you ask Vim to use whatever is the current meaning of S
.
vnoremap
is OK if the commands executed by your mapping are supposed to be native commands but you are using a command that is already remapped by a plugin. You should use *map
, instead.
Additionally, vmap
covers visual and select mode: you should probably be more precise in your mappings.
So…
xmap ' S'
xmap " S"
xmap [ S[
xmap { S{
xmap ( S(
(edit)
Your problem with <C-c>
is the exact reverse: you are using vmap
so you are telling Vim to use whatever "
currently does. Because…
- you have mapped
"
to doS"
, - you use
"
in the RHS of your<C-c>
mapping, - and you use
vmap
for it…
pressing <C-c>
does S"+ygv
which is not what you want. The rules above are simple: follow them and all will be good. Here they are again, with a slightly different wording:
Use
*noremap
when you want to use commands with their default meaning.Use
*map
when you want to use commands with their remapped meaning.