]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - vimrc
Added vim configuration file.
[config/dotfiles.git] / vimrc
1 " Vim main configuration file.
2
3
4 " Make sure Vim (and not Vi) settings are enabled.
5 set nocompatible
6
7 " Enable automatic filedection, plugin and indention load.
8 filetype plugin indent on
9
10 " Use utf-8 file encoding for all files.
11 set fileencodings=utf-8
12
13 " Wrap text after 78 characters.
14 set textwidth=78
15
16 " Set tabs to 4 spaces, use softtabs.
17 set shiftwidth=4
18 set softtabstop=4
19 set expandtab
20 " When < and > is used indent/deindent to the next shiftwidth boundary.
21 set shiftround
22 " Use the default value for real tabs.
23 set tabstop=8
24
25 " Enable auto indention.
26 set autoindent
27
28 " Activate lines display.
29 set number
30 " Display the ruler.
31 set ruler
32
33 " Activate syntax folding.
34 set foldmethod=syntax
35 set foldcolumn=2
36 set foldlevel=99 " no folding at default
37
38 " Use smartcase mode when searching; only check for case if the searched word
39 " contains a capital character.
40 set ignorecase
41 set smartcase
42
43 " Activate spell checking, use English as default.
44 set spell
45 set spelllang=en_us
46
47 " When joining lines only add one space after a sentence.
48 set nojoinspaces
49
50 " Allow backspacing over autoindent, line breaks and insert mode starts.
51 set backspace=indent,eol,start
52
53 " Don't use any modelines.
54 set nomodeline
55
56 " When completing paths first use the longest path then display a list of all
57 " possible files.
58 set wildmode=longest,list
59
60 " Visualize the line the cursor is currently in.
61 set cursorline
62
63 " Use a dark background.
64 set background=dark
65
66
67 " Disable Apple style movements in MacVim.
68 if has("gui_macvim")
69     let macvim_skip_cmd_opt_movement = 1
70 endif
71
72
73 " Activate syntax coloring.
74 syntax enable
75
76
77 " Automatically save and the load the file state (stored in ~/.vim/view).
78 autocmd BufWrite * mkview
79 autocmd BufRead  * loadview