Parcourir la Source

~/.vimrc: Enable wildmenu (it's helpful) and have better mappings!

Lucas Stadler 14 ans auparavant
Parent
commit
51e5d743d5
1 fichiers modifiés avec 25 ajouts et 9 suppressions
  1. 25 9
      .vimrc

+ 25 - 9
.vimrc

8
8
9
" Some wildcard tweaking
9
" Some wildcard tweaking
10
set wildignore=*.hi,*.o
10
set wildignore=*.hi,*.o
11
set wildmenu
11
12
12
" Have tabs 3 chars long...
13
" Have tabs 3 chars long...
13
set tabstop=3
14
set tabstop=3
19
20
20
" Show whitespace
21
" Show whitespace
21
set list listchars=tab:»·,trail:·
22
set list listchars=tab:»·,trail:·
23
au BufNewFile,BufRead *.{c,h} set listchars=tab:\ \ ,trail:·
22
24
23
" Keep a longer history
25
" Keep a longer history
24
set history=100
26
set history=100
31
	" Capture new position
33
	" Capture new position
32
	let g:curTextPosition = synIDattr(synIDtrans(synID(line("."), col("."), 0)), "name")
34
	let g:curTextPosition = synIDattr(synIDtrans(synID(line("."), col("."), 0)), "name")
33
35
34
	if( g:curTextPosition == "Comment" )
36
	if( g:curTextPosition == "Comment" || &ft == "markdown" || &ft == "" )
35
		set textwidth=72
37
		set textwidth=72
36
	else
38
	else
37
		set textwidth=0
39
		set textwidth=0
59
61
60
set fileencodings=utf-8
62
set fileencodings=utf-8
61
63
64
" Automatically reread the file if it has been changed from the outside
65
set autoread
66
62
" Allow me to delete with backspace
67
" Allow me to delete with backspace
63
set backspace=indent,eol,start
68
set backspace=indent,eol,start
64
69
65
""" Mappin' stuff around a little bit (please :)
70
""" Mappin' stuff around a little bit (please :)
71
" remaps
72
noremap U <c-r>
73
noremap <c-r> q
74
"noremap j k
75
"noremap k j
66
map q :quit<CR>
76
map q :quit<CR>
67
map Q :quitall<CR>
77
map Q :quitall<CR>
68
" Note the space after ':tabnew' ;)
69
"map t :tabnew 
70
noremap <Space> :NERDTree<CR>
71
noremap <c-b> :make<CR>
72
noremap <c-t> :CommandT<CR>
73
noremap <c-n> :tabnew<CR>:CommandT<CR>
74
noremap <c-f> :!ack
78
" fancy maps
79
map <Space> :NERDTree<CR>
80
map <c-b> :make<CR> " build
81
if( has("ruby") )
82
	nmap <Leader>e :CommandT<CR> " edit
83
	nmap <Leader>T :tabnew<CR>:CommandT<CR> " tabedit
84
else
85
	nmap <Leader>e :edit 
86
	nmap <Leader>T :tabedit 
87
endif
88
map <c-f> :!ack
75
nmap <c-a> :w<CR>
89
nmap <c-a> :w<CR>
76
noremap <Leader>t :TagbarOpen<CR>
90
map <Leader>t :TagbarToggle<CR>
77
91
78
""" Filetype specific stuff comes now...
92
""" Filetype specific stuff comes now...
79
93
103
autocmd BufNewFile,BufRead *.arc set ft=lisp
117
autocmd BufNewFile,BufRead *.arc set ft=lisp
104
autocmd BufNewFile,BufRead *.md set ft=markdown
118
autocmd BufNewFile,BufRead *.md set ft=markdown
105
119
120
autocmd BufNewFile,BufRead *.{c,h} set tags=~/stdlib.tags,~/posix.tags
121
106
" Make folds a little more acceptable :)
122
" Make folds a little more acceptable :)
107
highlight Folded ctermbg=255
123
highlight Folded ctermbg=255
108
124