Vi delete from line1 to current :1,.d This deletes lines 1 to current. :1,.-1d This deletes lines 1 to abov..
Tag : vi
I use vi a lot on nix machines and there’s a lot of useful tricks you can do to edit files. A good trick to get rid of those annoying ^M characters from a dos file is – :%s/(ctrl-v)(ctrl-m)//g So you want to type :%s/ and then ctrl & v and without ..