Tuesday 6 September 2011

Vim: How to delete the first n characters from every line or region


deletes the first 5 characters of every line

:%s/^.\{5}//gic


Alternatively:

:v
visual mode, then
0
then CTRL +V for visual block
tada!

No comments:

Post a Comment