we can replace vim with a set of strings by selecting them in visual mode and entering command mode. it automatically fills the selected range
: '& L;' >
and we can do the replacement like: '& L;' > s / TestSubstitute // ds
I would like to know if it is possible in vim to execute the substitute command on the partial line selected in visual mode, so something like
: `<,` `> [then replace the command]
As a rule, I copy a set of field names separated by "," metrics in vim, and would like to calculate the number of columns, which can be determined by the number of comma entries, when all field names are selected in visual mode.
select fname, lastmodtime, lastaccesstime from fileInfo;
If I select text from fname in lastaccesstime in visual mode and would like to know the number of commas in the selected text.
Thanks in advance,
Naga Kieran
source
share