Wednesday, June 20, 2012

GVIM BASICS & TIP & TRICKS -2 short tutorial

This article is in continuation from my last article gvim-basics-tip-tricks-1. The best thing with GVIM is that each day you get to learn something new and useful to learn.

So more tips and tricks:
1) * : "*" is used to search word near/under your cursor.

2) %: "%" can be used to look for accompanying bracket. {},[],(). For example if your cursor is on "{" and you press "%" the it will take you to the corresponding "}". It can be very useful when used with "d"(delete) or "y"(yank).

3)"q:"- "q:" is used to view your command history, you can copy paste commands from there or even edit the commands and run the commands directly by selecting them.

4)"q/" - used view previous searches.

5) If you like colors then you can put on the color font by ":syntax on" or just put "syntax on" in your .vimrc file and this action will be taken every time you open a new vim window.

6) w! - sometimes when you try to edit write protected file ":w!" can be useful .

7) :wq! - save and exit write protected file.

I will share some tips and tricks here and keep on writing new articles as I learn more.

No comments:

Post a Comment