Thanks you for quick answer -----Original Message----- From: A.J.Mechelynck [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 12:22 PM To: Vu The Cuong Cc: vim@vim.org Subject: Re: _vimrc in fedora core 5
Vu The Cuong wrote: > Currently I'm using win XP. > I just install dual OS with fedora core 5 and I installed vim 7 > mannually from source. installation successful. > I created .gvimrc in my home folder and I put gvimrc.vim.example in to > this folder but vim seems not detected this file. > Could anyone tell me what's the exact name of this file under linux? > Thanks > > > > Under Linux, Vim will read: 1) $HOME/.vimrc and if not found, $HOME/_vimrc 2) only in GUI mode: $HOME/.gvimrc and if not found, $HOME/_gvimrc These are files, not folders. If you want to use the example scripts, I recommend to source (using ":source" or ":runtime") them than copy them: that way, if ever there is a bugfix to them you won't be stuck with the older version. Under Windows, the searching order is reversed (underscores first, then dots). Thus, on a dual-boot system, if your HOME folder is the same, you can have a single vimrc called either .vimrc or _vimrc provided that there is no file by the other name; or one for Linux with a dot and another one for Windows with an underscore. Personally I don't use the gvimrc; I have built my own vimrc around the line "runtime vimrc_example.vim" which invokes the example script. Most user settings go after that line; a ":language messages" command (if any) goes before it if it is to set the languages for the menus. The reason is I find it easier to maintain a single rc file; any settings peculiar to gvim or to console vim can be wrapped as follows if has("gui_running") " settings for gvim else " settings for console Vim endif Even if you prefer to have a separate gvimrc, remember that gvim also reads the vimrc; so if you have settings in the vimrc which are for "console Vim" only you will still have to wrap them in "if ! has('gui_running')". After looking at what there is in the gvimrc_example, I don't miss it. Some settings (such as "set ch=2 hlsearch") I have set in my vimrc so Console Vim and gvim behave identically; ":set mousehide" isn't necessary since it is the default; and whatever colors displease me I have changed in a small colorscheme named almost-default.vim. As for the 'guifont', the example given in a comment won't work on all systems; I use, in my vimrc, a snippet of code similar to what is mentioned under ":help setting-guifont", but slightly more complicated because there is still a version of kvim (gvim for kde) on this system, and that requires a 4th 'guifont' format. Best regards, Tony.