]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Added vim configuration file.
authorSimon Ruderich <simon@ruderich.com>
Sat, 19 Jul 2008 15:25:54 +0000 (17:25 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 19 Jul 2008 15:25:54 +0000 (17:25 +0200)
vimrc [new file with mode: 0644]

diff --git a/vimrc b/vimrc
new file mode 100644 (file)
index 0000000..a8f9446
--- /dev/null
+++ b/vimrc
@@ -0,0 +1,79 @@
+" Vim main configuration file.
+
+
+" Make sure Vim (and not Vi) settings are enabled.
+set nocompatible
+
+" Enable automatic filedection, plugin and indention load.
+filetype plugin indent on
+
+" Use utf-8 file encoding for all files.
+set fileencodings=utf-8
+
+" Wrap text after 78 characters.
+set textwidth=78
+
+" Set tabs to 4 spaces, use softtabs.
+set shiftwidth=4
+set softtabstop=4
+set expandtab
+" When < and > is used indent/deindent to the next shiftwidth boundary.
+set shiftround
+" Use the default value for real tabs.
+set tabstop=8
+
+" Enable auto indention.
+set autoindent
+
+" Activate lines display.
+set number
+" Display the ruler.
+set ruler
+
+" Activate syntax folding.
+set foldmethod=syntax
+set foldcolumn=2
+set foldlevel=99 " no folding at default
+
+" Use smartcase mode when searching; only check for case if the searched word
+" contains a capital character.
+set ignorecase
+set smartcase
+
+" Activate spell checking, use English as default.
+set spell
+set spelllang=en_us
+
+" When joining lines only add one space after a sentence.
+set nojoinspaces
+
+" Allow backspacing over autoindent, line breaks and insert mode starts.
+set backspace=indent,eol,start
+
+" Don't use any modelines.
+set nomodeline
+
+" When completing paths first use the longest path then display a list of all
+" possible files.
+set wildmode=longest,list
+
+" Visualize the line the cursor is currently in.
+set cursorline
+
+" Use a dark background.
+set background=dark
+
+
+" Disable Apple style movements in MacVim.
+if has("gui_macvim")
+    let macvim_skip_cmd_opt_movement = 1
+endif
+
+
+" Activate syntax coloring.
+syntax enable
+
+
+" Automatically save and the load the file state (stored in ~/.vim/view).
+autocmd BufWrite * mkview
+autocmd BufRead  * loadview