Hi All,
I want to remove last word from a line using Vi.
Do we have any vi command for that.
line : ss dd ff gg
i have to run some vi command which can delete gg from the line
Thanks,
Ravi Sadani
Hi All,
I want to remove last word from a line using Vi.
Do we have any vi command for that.
line : ss dd ff gg
i have to run some vi command which can delete gg from the line
Thanks,
Ravi Sadani
ctrl + w when in insert mode
Not working .. Getting nothing.
I have done esc I to be in insert mode then ctrl+w.
http://azero.dk/support/editor/vi/
Below command in execute mode Remove last word from all lines
%s/ .[^ ]$//
Below command in execute mode Remove last word from line 5
5s/ .[^ ]$//
Below command in execute mode Remove last word from line 1 to 10
1,10s/ .[^ ]$//