On 2006-05-10, "Malhotra, Vijendra" <[EMAIL PROTECTED]> wrote:
> Gary Johnson [mailto:[EMAIL PROTECTED] Sent Wednesday 10 May 2006 00:44 > > On 2006-05-09, "Malhotra, Vijendra" <[EMAIL PROTECTED]> wrote: > > > > > BTW what is the difference between gvim and vim -g ? > > > > If vim and gvim are links to the same file, nothing. > No they are not pointing to the same file. Now what is the > difference It depends on how the two were built. You can find out for yourself by executing :version in each one and comparing the results. The "conventional" way to build and install vim is to build one vim binary with all the features you want, copy it to your bin directory, then link to it all the other names by which it can be run. This is what "make install" does on a Unix system. Here is an "ls -l" of all the files installed by the Vim-7.0 distribution. lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 eview -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 evim -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 ex -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 gview -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 gvim -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 gvimdiff -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 rgview -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 rgvim -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 rview -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 rvim -> vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 view -> vim -rwxr-xr-x 1 garyjohn fw 1624748 May 8 16:43 vim lrwxrwxrwx 1 garyjohn fw 3 May 8 16:43 vimdiff -> vim -rwxr-xr-x 1 garyjohn fw 1600 May 8 16:43 vimtutor -rwxr-xr-x 1 garyjohn fw 12964 May 8 16:43 xxd When you execute "view", you get a read-only console vim, the same as if you had executed "vim -R". When you execute "gvim", you get a graphical vim, the same as if you had executed "vim -g". All the other names alter vim's behavior in other ways. It's important to some people that a program run in the minimum memory possible. If they run vim in a console, they don't want it to waste any memory needed by only the GUI version. Consequently, they build a gvim binary with the GUI features and a separate vim binary without the GUI features. Some Linux distributions do that. In that case, executing "vim -g" won't work. Some people want to have a version of vim that doesn't take very much disk space so that they can put it on a recovery diskette or on a small /bin or /sbin partition, but that is really a different issue. You can put a tiny vim in /bin or /sbin and a full-sized vim in /usr/bin and just make sure that /usr/bin precedes the others in your PATH. HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA