However, the above example doesn't work as intended.
I think the documentation should have a few more examples on how to implement simple mappings (for example q in this case) to whatever you would like to surround with.
Also I have had this in my .vimrc for a long time, and now since vim-sandwich allows customising, I wanted to implement this in input of a.
Basically, I would like to have similar functionality (e.g. ciadiacsadsa etc.) to recognise all of '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', '#' as a. (Or anything else like o or x or whatever)
For example : THIS_IS_A|_NAME (cursor represented as |)
cia => THIS_IS_(ready to type)_NAME
dia=> THIS_IS__NAME
daa => THIS_ISNAME
etc.
What would be the simplest way to implement these?
I would like to implement something like
viq
ciq
diq
caq
daq
csq
dsq
mapping to change or delete any quote marks including'
"
or backtick.*** I don't mind about
ysiwq
as it won't know which quote i mean.Example :
"'Text'"
viq
= visually selects =>'Text'
ciq
=>"'(ready to type)'"
diq
=>"''"
caq
=>"(ready to type)"
daq
=>""
csq(
=>"(Text)"
dsq
=>"Text"
I was searching through the web and the doc but all I could find was this example:
However, the above example doesn't work as intended.
I think the documentation should have a few more examples on how to implement simple mappings (for example
q
in this case) to whatever you would like to surround with.Also I have had this in my .vimrc for a long time, and now since vim-sandwich allows customising, I wanted to implement this in input of
a
.Basically, I would like to have similar functionality (e.g.
cia
dia
csa
dsa
etc.) to recognise all of'_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', '#'
asa
. (Or anything else likeo
orx
or whatever)For example :
THIS_IS_A|_NAME
(cursor represented as|
)cia
=>THIS_IS_(ready to type)_NAME
dia
=>THIS_IS__NAME
daa
=>THIS_ISNAME
What would be the simplest way to implement these?