I always knew that VIM is a very very powerful editor than all the present non-opensource editors. But, I was using crimson editor (freeware), and before that I used editplus (shareware), because, I could not figure out one feature in gvim. That feature is, to open all the files in a single window with different tabs. Today, I figured out that feature, and it is really nice.
There is one script (minibufexpl.vim), which you can get from the following website.
http://vim.sourceforge.net/scripts/script.php?script_id=159
You just need to put this file in plugins directory in your vim installation directory. Now, if you open any file from gvim, it would be opened in the same window in different tab.
If you press, Ctrl+TAB, it will take you to tabbed pane, and there by pressing TAB, you can move from one file to another, and if you press Enter, that file would be loaded.
If you are using this script, you cannot use :q to close one file. If you use :q first time, it will close the tabbed pane. If you use :q second time, it will close all the files, and gvim window. To close one file, goto tabbed pane by Ctrl+TAB, and then goto corresponding file by TAB, and press d. It will close that file.
By mistake, if you close the tabbed pane, you can get it by :MiniBufExplorer
The next problem was, if you open a file from explorer, I want to open that file in the window that is already opened. The solution for this problem is also very simple.
In windows explorer, Tools -> Folder Options -> File Types, select the extension of the file, and in the action, type this.
c:\Software\vim\vim63\gvim.exe --remote-silent "%1"
Of course, you have to change the path of the gvim.exe.
Then, it will open in the same window that was already opened.
There is another tip that I found today. If you put the cursor on a word, and press "*", then it will search for that word. It will also highlight the words. This is same as highlight words in eclipse or idea.
You can get many of the tips at
http://vim.sourceforge.net/tips/index.php
Use GVim, and increase your productivity.
Update:
If you are using GVIM 7.0 or latest version, you can use the command gvim.exe --remote-tab-silent "%1". Starting VIM 7.0, the tabs are in-built.
Wednesday, October 26, 2005
Monday, October 17, 2005
Installed cygwin
After so much frustration with windows, Atlast, I installed cygwin on my machine. I did not realize the power of cygwin till now. It was because, I was using the very old cygwin that everybody uses in my company. I started playing games like typespeed, which is really cool text based game. I remember my days in IIT Bombay, where I used to play these games a lot.
You can get cygwin from http://www.cygwin.com/
If you are using windows, and eventually want to move to linux, then you should start using this.
You can get cygwin from http://www.cygwin.com/
If you are using windows, and eventually want to move to linux, then you should start using this.
Saturday, October 15, 2005
Hare Krishna
Hare Krishna Hare Krishna Krishna Krishna Hare Hare
Hare Rama Hare Rama Rama Rama Hare Hare
Hare Rama Hare Rama Rama Rama Hare Hare
Labels:
general
Subscribe to:
Posts (Atom)