sample ~/.vimrc
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <[email protected]> |
It annoys me as, for whatever reason, I cannot remember where to look and need to do so after every break! :-) From ":h defaults" in modern vim: Defaults without a .vimrc file ================================================================== If Vim is started normally and no user vimrc file is found, the $VIMRUNTIME/defaults.vim script is loaded. This will set 'compatible' off, switch on syntax highlighting and a few more things. See the script for details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in patch 7.4.2111 to be exact). This should work well for new Vim users. If you create your own .vimrc, it is recommended to add these lines somewhere near the top: unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim Then Vim works like before you had a .vimrc. Copying $VIMRUNTIME/vimrc_example.vim to your .vimrc is another way to do this. Alternatively, you can copy defaults.vim to your .vimrc and modify it (but then you won't get updates when it changes). ================================================================== The .vimrc example in the book dates back to well before vim 7.4. I think these two lines should probably be added to the default .vimrc in the book - per the developers' recommendation. It will not matter for power users as the .vimrc that has been developed over the past 10+ years is copied from machine to machine anyway. Maybe add a note about the location of $VIMRUNTIME (or show the command so it doesn't have to be updated when a new minor is released - ':echo $VIMRUNITME' works well enough). --DJ -- http://lists.linuxfromscratch.org/sympa/info/blfs-dev Unsubscribe: See the above information page