forked from sunaku/.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.vim
67 lines (54 loc) · 2.78 KB
/
config.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
" http://www.vi-improved.org/vimrc.php
" http://vim.wikia.com/wiki/Example_vimrc
" http://vim.wikia.com/wiki/Vim_Tips_Wiki
" http://stackoverflow.com/questions/tagged/vim
" http://items.sjbach.com/319/configuring-vim-right
" http://push.cx/2008/256-color-xterms-in-ubuntu
" http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen
" http://vim.wikia.com/wiki/Single_tags_file_for_a_source_tree
"-----------------------------------------------------------------------------
"" bootstrap
"-----------------------------------------------------------------------------
source ~/.vimlocal
" base this configuration on the official example vimrc,
" which is maintained by the great Bram Moolenaar himself!
"let s:example = globpath(&runtimepath, 'vimrc_example.vim')
"if !empty(s:example)
" execute 'source '. s:example
"endif
" register bundles found in the runtimepath
let s:bundles = tr(globpath(&runtimepath, 'bundle/*/.'), "\n", ',')
let s:afters = tr(globpath(s:bundles, 'after/.'), "\n", ',')
let &runtimepath = join([s:bundles, &runtimepath, s:afters], ',')
"-----------------------------------------------------------------------------
"" interaction
"-----------------------------------------------------------------------------
colorscheme vividchalk
set background=dark
set history=1000 " remember this many commands & searches
set ignorecase " make searching case insensitive
set smartcase " ... unless the query has capital letters
set incsearch " highlight searches as you go
"-----------------------------------------------------------------------------
"" formatting
"-----------------------------------------------------------------------------
set autoindent " automatically indent new lines
set tabstop=8 " render TABs using this many spaces
set expandtab " insert spaces when TAB is pressed
set softtabstop=2 " ... this many spaces
set shiftwidth=2 " indentation amount for < and > commands
"-----------------------------------------------------------------------------
"" file types
"-----------------------------------------------------------------------------
autocmd FileType gitcommit setlocal textwidth=72 nofoldenable
autocmd FileType html,php setlocal sw=4 sts=4
"-----------------------------------------------------------------------------
"" saving
"-----------------------------------------------------------------------------
" keep backup & swap files in Vim config dir
set backupdir=~/.vim/tmp
"---------------------------------------------------------------------------
"" Spell checking
"---------------------------------------------------------------------------
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>