lsdr / vim-folder

My .vim folder, w/ plugins, color schemes and configurations

This URL has Read+Write access

lsdr (author)
Sun Jul 05 20:12:12 -0700 2009
commit  091c55cc8c7cecaa1077abc6aaa8398f0c9bce89
tree    c3c7f87f5ec4413c91a819d7fa876a4d14cc724c
parent  46b3975a0da8ef62f28933d6fb9d190663afe845
vim-folder / _vimrc
100644 144 lines (118 sloc) 3.436 kb
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
" lsdr .vimrc
" github.com/lsdr/.vim/tree
 
filetype on
filetype plugin on
filetype indent on
 
set nocompatible
set bs=2
set mousehide
set nu
set nuw=5
set wrap
set hidden
set ruler
set so=5
set history=750
set fileformats=unix,mac,dos
 
" Backup settings
set backup
set backupdir=~/.vim/backup
set directory=~/.vim/tmp
 
" Syntax highlight
syntax on
 
" Tab/indentation configuration
set softtabstop=2
set shiftwidth=2
set expandtab
set smarttab
set ai " autoindent
set si " smartindent
 
" Text width limited to 80 cols
set textwidth=80
 
" Make command line two lines high
set ch=2
 
" Make the status line more informative
set laststatus=2
set statusline=%<buf:[%n]\ %f\ %h%m%r " buffer, filename, flags
set statusline+=\ \ [
set statusline+=%{strlen(&ft)?&ft:'none'} " filetype
set statusline+=]\ "
set statusline+=%=
set statusline+=%(tag:[%{Tlist_Get_Tagname_By_Line()}]%)
set statusline+=\ [%3.(%c%)\ %-7.(%l/%L%)]\ %P
 
" Tab completion
set wildmenu
set wildmode=list:longest
set wildignore+=*.o,*~,.lo,*.swp
 
" Search pattern highlight/incremental
set ignorecase
set smartcase
set showmatch
set hlsearch
set incsearch
 
" Set <Leader> to comma
let mapleader = ','
 
" A few useful shortcuts
command! Rehash source ~/.vimrc
command! Color echo g:colors_name
command! Helptags helptags ~/.vim/doc
 
" home/end in a line
map H ^
map L $
 
" Use ack instead of grep
"set grepprg=ack
"set grepformat=%f:%l:%m
 
" Extended % matching
runtime macros/matchit.vim
 
" Python specifics
autocmd FileType python set softtabstop=4
autocmd FileType python set shiftwidth=4
autocmd FileType python set expandtab
 
" scroll viewpoint by 'n' lines
" source: http://items.sjbach.com/319/configuring-vim-right
nnoremap <C-e> 10<C-e>
nnoremap <C-y> 10<C-y>
 
" make the arrow keys switch between splits
map <up> <C-w>k
map <down> <C-w>j
map <right> <C-w>l
map <left> <C-w>h
 
" plugins
" ----------------------------------------------------------------------------
 
" autocomplpop
let g:AutoComplPop_BehaviorKeywordLength = 4
 
" FuzzyFinder
let g:fuzzy_ignore = '*.log;*.swp;*~;temp/*;log/*;tmp/*;coverage/*;README;*.jpg;*.png;*.gem'
let g:fuzzy_enumerating_limit = 15
let g:fuzzy_ceiling = 300000
map <leader>t :FuzzyFinderTextMate<CR>
map <leader>b :FuzzyFinderBuffer<CR>
map <leader>ff :FuzzyFinderFile<CR>
map <leader>rf :FuzzyFinderMruFile<CR>
map <leader>rc :FuzzyFinderMruCmd<CR>
 
" NERDTree
map <leader>d :NERDTreeToggle<CR>
map <leader>dd :NERDTreeMirror<CR>
let NERDTreeCaseSensitiveSort = 1
let NERDTreeChDirMode = 2
let NERDTreeIgnore = ['\~$','\.[ao]$','\.swp$','\.DS_Store','\.svn','\.CVS','\.git','\.pyc','\.pyo','log','tmp','coverage']
let NERDTreeMouseMode = 2
let NERDTreeShowLineNumbers = 0
let NERDTreeWinSize = 30
let NERDTreeHijackNetrw = 1
 
" plugin taglist
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
let Tlist_Display_Tag_Scope = 0
"let Tlist_Display_Prototype = 1
let Tlist_File_Fold_Auto_Close = 1
let Tlist_Show_Menu = 1
map <Leader>tt :TlistToggle<CR>
map <Leader>th :TlistHighlightTag<CR>
map <Leader>tp :TlistShowPrototype<CR>
map <Leader>tu :TlistUpdate<CR>
"map <leader>ts :TlistSessionSave ~/.tlistsession.vim.tag <CR>
"map <leader>tl :TlistSessionLoad ~/.tlistsession.vim.tag <CR>
 
" rails.vim
" small adjustment to handle html files better
autocmd User Rails if &filetype != 'ruby' | setlocal sw=4 sts=4 noexpandtab | endif
autocmd User Rails if &filetype == 'yaml' | setlocal sw=2 sts=2 expandtab | endif