14.06.2014 Views

vim 101 hacks

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Buyer: xiujuan lu (luxiujuan@gmail.com)<br />

Transaction ID: 85W16630AD8515549<br />

Vim <strong>101</strong> Hacks<br />

www.thegeekstuff.com<br />

To remove an abbreviation definition permanently, remove it from .<strong>vim</strong>rc<br />

If you are typing your website URL or email address frequently, you can<br />

create an abbreviation as shown below.<br />

:iabbrev tgs http://www.thegeekstuff.com<br />

:iabbrev myemail ramesh.thegeekstuff@gmail.com<br />

After the above, whenever you type myemail, it will expand your email<br />

address automatically.<br />

You can also insert special keys in the iabbrev value. For example, you can<br />

add carriage return key as shown below.<br />

:iabbrev TRR Thanks,Regards,Ramesh Natarajan<br />

In this example, whenever I type TRR, it will expand to the following.<br />

Thanks,<br />

Regards,<br />

Ramesh Natarajan<br />

Hack 38. Automatic Spelling Correction<br />

The autocorrect.<strong>vim</strong> plugin has a collection of all typical spelling mistakes<br />

and their correct spelling.<br />

67

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!