On 13/04/09 07:56, pansz wrote:
>
> Tony Mechelynck 写道:
>>> Recommended place for your personal GUI initializations:
>>> Unix $HOME/.gvimrc
>>> OS/2 $HOME/.gvimrc or $VIM/.gvimrc
>>> MS-DOS and Win32 $HOME/_gvimrc or $VIM/_gvimrc
>>> Amiga s:.gvimrc or $VIM/.gvimrc
>>
>> Notice the underscore for Windows even under $HOME.
>
> I don't know if it's a bug or a feature, but I did that since Vim 6.0
> and it still works today, and I know that I must use $HOME/.gvimrc or
> $VIM/_gvimrc in Windows.
>
> Probably some version between 6.0 and 7.2 solves this "bug" and supports
> $HOME/_gvimrc in Windows. But I'm here to indicate that *traditionally*
> you must use a dot-file in Windows if you put in your $HOME directory.
> _vimrc and _gvimrc only works in $VIM, did not work in $HOME.
>
> Soft-link is not evil, underscore prefix is. Why use underscore when a
> dot-file serves very well for both cygwin and Windows? I regard this as
> a feature instead of a bug.
On Unix-like OSes, an initial dot is used to indicate that a file is
hidden, and files or directories with that kind of name are used in the
$HOME directory for quite a number of configuratiopn parameters for
various applications.
On DOS, a file name consists of eight chazracters or less, plus one dot,
plus three characters or less. If fewer, the balance is made up by
spaces in the FAT directory.
On Unix, if a vimrc or gvimrc with an initial dot is not found, Vim will
look for the same with an initial underscore insead, in case the file is
shared with Dos.
On a Dos-like OS, if the file is not found with an initial underscore,
Vim will look for the same name with an initial dot in case Long File
Names are used.
Now where did I read that? Somewhere in the help, but...
Ah, for the vimrc it is at |_vimrc| or |.vimrc| (which refer to the same
location in the help).
For the gvimrc it's less clear, but it is said a little below
|buffers-menu| that if _gvimrc isn't found, .gvimrc is tried, and
vice-versa. Scroll somewhat more and you'll find the lines I quoted in
my previous post.
Personally I don't use a gvimrc: I have a vimrc only, and where needed I
check has('gui_running') to discriminate between GUI-only and
Console-mode-only, or has('gui') for whatever would cause an error in a
non-GUI-enabled build but doesn't harm in Console mode otherwise. And a
few GUIEnter autocommands for things which must be done again at GUI
startup and cannot be preset before, such as the audio-and-visual beep.
Best regards,
Tony.
--
Besides the device, the box should contain:
* Eight little rectangular snippets of paper that say "WARNING"
* A plastic packet containing four 5/17 inch pilfer grommets and two
club-ended 6/93 inch boxcar prawns.
YOU WILL NEED TO SUPPLY: a matrix wrench and 60,000 feet of tram
cable.
IF ANYTHING IS DAMAGED OR MISSING: You IMMEDIATELY should turn to your
spouse and say: "Margaret, you know why this country can't make a car
that can get all the way through the drive-through at Burger King
without a major transmission overhaul? Because nobody cares, that's
why."
WARNING: This is assuming your spouse's name is Margaret.
-- Dave Barry, "Read This First!"
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---