Home
George Aristy
Cancel

Vim Tip of the Day

Copying lines containing search hits (source):1.- Clear a register (eg ‘a’): qaq2.- Append all matching lines to that register: g/pattern/y A3.- Copy contents of register a to clipboard (register ‘...

Some Windows magic

Script to get number of lines in a file:REM %1 is the file name to be parsed, passed at command line<blockquote>@set count=0for /f %%a in (%1) do (@set /a count+=1)@echo %count%</blockquot...

Vim column mode

Today I found myself in the need of Vim’s column mode (using regex for what I wanted to do would have been hard).I googled real quick but the first few hits weren’t of much use/very clear and and s...