Showing posts with label vi. Show all posts
Showing posts with label vi. Show all posts

Wednesday, December 4, 2013

Toggle case of alphabets in /vi/ and console

tr 'a-z' 'A-Z' < contacts.txt

Case of letters in the file contacts.txt can be changed from lower to upper using the console command above. In vi the same can be achieved by switching to command mode and typing the tilde key on the letter of choice. For bulk edits visualization mode (Ctrl+v) works well. More information about this can be found at: http://vim.wikia.com/wiki/Switching_case_of_characters

Thursday, January 5, 2012

Delete lines matching a string on VIM

:g/pattern/d
:v/pattern/d

Tuesday, December 13, 2011

Go to col on vim/vi


You can quickly jump to a specified column in Vim by simply typing the column number followed by a pipe.


80| # go to the 80th column

Thanks to DailyVim