Sunday, March 3, 2013

Gvim Basics - 3

In this page I have tried to cover other unique features of gvim.  These feature or command will help you to use this software more efficiently and robustly.

  • Undo and Redo action in gvim
    Undoing your action and redoing action is the simplest thing to do in gvim. Just first go into command mode and type u if you want to undo your editing action in gvim. And it you want to redo your action press control + r  and it is done.
  • Opening new tab in same gvim window
    Opening new tab in same window can be achieved by simply typing tabnew in command window. And then you can open your file. If you know the path of the file you can type path of the file to be edited in front of the :tabnew  command and directly open the file.
  • Opening file in same gvim window
    You can achieve this task by using command :e. If you are not giving the file path you want to edit in gvim your current file you are editing will be reloaded or reopened in the same window.  And by using command :E you can list down all file or directory in current directory in gvim window. You do not need to go into command window and open file from there. Now you can open file just by moving cursor at that file and pressing enter at that file.
  • Auto completing the keyword in gvim 
    This is the most fascinating feature of the gvim I  have found. To auto complete the word you are typing just press control + p after typing some initial character of the keyword and gvim will list down all keywords matching with the initial you have typed in the current window.
  • Displaying line numbers and ignoring the case sensitivity
    You can display line numbers of the each and every line by typing command :set nu and gvim will show each line number. It is by default that while you are searching the any keyword gvim is case sensitive. If you want to make it ignore that case sensitivity you can type command :set ic . This will set ignore case and gvim will ignore case sensitivity while searching keyword in file.
  • Searching begin's respective end and end's respective begin
    This can be achieved by pressing shift + 5  command while your cursor is at any character of the begin or end. If your cursor is on begin gvim will  find it's respective end. If it is at end gvim will find its respective begin. This feature is very much useful while you are codding large program and there is large hierarchy.
  • Splitting window/tab in one or more part
    By pressing command :sp command you can split your file into another file. So you can edit two or more file at the same time. By giving path of the file you can also open file in split format. This is very much useful feature of the gvim. 


                                                GO BACK TO INDEX

3 comments: