Differences between version 4 and predecessor to the previous major change of .vimrc.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Saturday, September 6, 2003 2:18:06 pm | by CraigBox | Revert |
Older page: | version 2 | Last edited on Friday, December 6, 2002 8:53:58 pm | by SamJansen | Revert |
@@ -1,8 +1,17 @@
.vimrc is the file that is executed by default by the text editor Vim upon startup. It is generally a good idea to put a .vimrc in your home directory with some useful setting in it.
There are a whole host of useful settings, but a few common ones follow:
- set nocompatible " Make Vim behave less like vi and more like Vim - this makes vim a lot easier to user
- syntax on " Syntax highlight whatever language you are editing, Vim supports many languages
- set incsearch " Enable incremental searching by default
- set showmatch " Highlight the matches of the last search
+ set nocompatible
" Make Vim behave less like vi and more like Vim - this makes vim a lot easier to user
+ syntax on
" Syntax highlight whatever language you are editing, Vim supports many languages
+ set incsearch
" Enable incremental searching by default
+ set showmatch
" Highlight the matches of the last search
+ set backspace=2 " allow backspacing over everything in insert mode
+ set autoindent " always set autoindenting on
+ set textwidth=0 " Don't wrap words by default
+ " Vim5 comes with syntaxhighlighting. The next lines turn it on
+ if has("syntax")
+ syntax on
+ endif
+
+vimrc is also capable of on-the-fly [gzip] and bzip2 (de)compression.