Просмотр исходного кода

~/.vimrc: Filetype, listchars and hjkl evangelism.

Including using rcodetools, notmuch and some strange filetypes for
GLSL or Opa.
Lucas Stadler лет назад: 14
Родитель
Сommit
39f1f00981
1 измененных файлов с 20 добавлено и 2 удалено
  1. 20 2
      .vimrc

+ 20 - 2
.vimrc

19
set copyindent
19
set copyindent
20
20
21
" Show whitespace
21
" Show whitespace
22
set list listchars=tab:»·,trail:·
23
au BufNewFile,BufRead *.{c,h} set listchars=tab:\ \ ,trail:·
22
"set list listchars=tab:»·,trail:·
23
"au BufNewFile,BufRead *.{c,h} set listchars=tab:\ \ ,trail:·
24
24
25
" Keep a longer history
25
" Keep a longer history
26
set history=100
26
set history=100
44
44
45
au BufNewFile,BufRead *.{hs,lhs} set comments=:--,sr:{-,ex:-}
45
au BufNewFile,BufRead *.{hs,lhs} set comments=:--,sr:{-,ex:-}
46
au BufNewFile,BufRead *.rb set comments=:#,s:=begin,e:=end
46
au BufNewFile,BufRead *.rb set comments=:#,s:=begin,e:=end
47
au BufNewFile,BufRead *.{opa,trx} set filetype=opa shiftwidth=2 tabstop=2 expandtab
47
48
48
" Don't let me further than 1 line towards the end or the beginning.
49
" Don't let me further than 1 line towards the end or the beginning.
49
set scrolloff=1
50
set scrolloff=1
50
51
51
"""
52
"""
52
call pathogen#infect('~/t/vim/')
53
call pathogen#infect('~/t/vim/')
54
call pathogen#infect('~/t/notmuch/')
53
55
54
" Have syntax highlighting and non-vi features
56
" Have syntax highlighting and non-vi features
55
syntax on
57
syntax on
68
set backspace=indent,eol,start
70
set backspace=indent,eol,start
69
71
70
""" Mappin' stuff around a little bit (please :)
72
""" Mappin' stuff around a little bit (please :)
73
" disabling the arrow keys (maybe remap useful things to them later):
74
" http://jeetworks.org/node/89
75
inoremap  <Up>     <NOP>
76
inoremap  <Down>   <NOP>
77
inoremap  <Left>   <NOP>
78
inoremap  <Right>  <NOP>
79
noremap   <Up>     <NOP>
80
noremap   <Down>   <NOP>
81
noremap   <Left>   <NOP>
82
noremap   <Right>  <NOP>
71
" remaps
83
" remaps
72
noremap U <c-r>
84
noremap U <c-r>
73
noremap <c-r> q
85
noremap <c-r> q
111
123
112
au BufNewFile,BufRead *.{hs,lhs,chs} set ts=4 sw=4 expandtab
124
au BufNewFile,BufRead *.{hs,lhs,chs} set ts=4 sw=4 expandtab
113
125
126
au BufNewFile,BufRead *.{py} set ts=4 sw=4 expandtab nolist
127
114
" ZenCoding. Very fast tag structure creating and friends..
128
" ZenCoding. Very fast tag structure creating and friends..
115
autocmd BufNewFile,BufRead *.{html,css,xml} runtime plugin/zencoding.vim
129
autocmd BufNewFile,BufRead *.{html,css,xml} runtime plugin/zencoding.vim
116
130
117
autocmd BufNewFile,BufRead *.arc set ft=lisp
131
autocmd BufNewFile,BufRead *.arc set ft=lisp
118
autocmd BufNewFile,BufRead *.md set ft=markdown
132
autocmd BufNewFile,BufRead *.md set ft=markdown
119
133
134
autocmd BufNewFile,BufRead *.{vert,frag} set ft=glsl
135
120
autocmd BufNewFile,BufRead *.{c,h} set tags=~/stdlib.tags,~/posix.tags
136
autocmd BufNewFile,BufRead *.{c,h} set tags=~/stdlib.tags,~/posix.tags
121
137
122
" Make folds a little more acceptable :)
138
" Make folds a little more acceptable :)
123
highlight Folded ctermbg=255
139
highlight Folded ctermbg=255
124
140
141
source ~/ruby-1.9.4dev/lib/ruby/gems/1.9.1/gems/rcodetools-0.8.5.0/rcodetools.vim
142
125
" Local .vimrc files
143
" Local .vimrc files
126
if getcwd() != $HOME && filereadable('.vimrc')
144
if getcwd() != $HOME && filereadable('.vimrc')
127
	source .vimrc
145
	source .vimrc