Arun's Blog
Linux and related technologies.
Tuesday, 29 December 2009
Vi Editor magics
Adding line number to a file with vi
open the file with vi editor
:%!nl
of-course there are other ways to do it with vi :)
Add empty line after every line with vi
:%s/\v(.*\n){1}/&\r
Remove white space at the beginning of a line with vi
:%le
Sorting lines with vi
:sort u
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment