Learning a new vim trick is more interesting than working on my Technology Investment Tax Credit application

The Ohio Technology Investment Tax Credit is a fantastic boon to starting businesses. But applying for it is really boring.

Anyway, when I opened up vim to work on my application, I found a really good tip of the day, copied below:

VimTip 295: Line/word/file/whatever completion

In addition to vimtip #291 you can use whole completion mode. It can complete whole lines (<C-x>l, then <C-p>, <C-n>), filenames (<C-f>), keywords, words from custom dictionary and many, many others. During coding it usually saves a LOT of key strokes 😉 This mode has many other powerful features, for example when completing word (by &;tlC-x><C-p> or just by <C-p>) you can continue completion with another <C-x<>-p>. For example, after writing such text:

this is first line
second line is here

Placing cursor at third line and pressing <C-x>l will double last line – <C-n>, <C-p> in this moment can be used to manipulate completed line. Or, instead of completing whole line you can press ‘f’ and then complete by <C-p> which will result in ‘first’ word. After that you can <C-x><C-p> to get ‘line’ word (since this is next word after ‘first’). Try yourself for other powerful combinations.

Now I just need a completion mode that will calculate intelligent sales forecasts, and this application would be done.

One thought on “Learning a new vim trick is more interesting than working on my Technology Investment Tax Credit application

Comments are closed.