Bladeren bron

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

Including using rcodetools, notmuch and some strange filetypes for
GLSL or Opa.
Lucas Stadler 14 jaren geleden
bovenliggende
commit
39f1f00981
1 gewijzigde bestanden met toevoegingen van 20 en 2 verwijderingen
  1. 20 2
      .vimrc

+ 20 - 2
.vimrc

@ -19,8 +19,8 @@ set smarttab
19 19
set copyindent
20 20
21 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 25
" Keep a longer history
26 26
set history=100
@ -44,12 +44,14 @@ autocmd CursorMoved * :call g:setTextWidthInComments()
44 44
45 45
au BufNewFile,BufRead *.{hs,lhs} set comments=:--,sr:{-,ex:-}
46 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 49
" Don't let me further than 1 line towards the end or the beginning.
49 50
set scrolloff=1
50 51
51 52
"""
52 53
call pathogen#infect('~/t/vim/')
54
call pathogen#infect('~/t/notmuch/')
53 55
54 56
" Have syntax highlighting and non-vi features
55 57
syntax on
@ -68,6 +70,16 @@ set autoread
68 70
set backspace=indent,eol,start
69 71
70 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 83
" remaps
72 84
noremap U <c-r>
73 85
noremap <c-r> q
@ -111,17 +123,23 @@ au BufNewFile,BufRead *.citrus set ft=citrus
111 123
112 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 128
" ZenCoding. Very fast tag structure creating and friends..
115 129
autocmd BufNewFile,BufRead *.{html,css,xml} runtime plugin/zencoding.vim
116 130
117 131
autocmd BufNewFile,BufRead *.arc set ft=lisp
118 132
autocmd BufNewFile,BufRead *.md set ft=markdown
119 133
134
autocmd BufNewFile,BufRead *.{vert,frag} set ft=glsl
135
120 136
autocmd BufNewFile,BufRead *.{c,h} set tags=~/stdlib.tags,~/posix.tags
121 137
122 138
" Make folds a little more acceptable :)
123 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 143
" Local .vimrc files
126 144
if getcwd() != $HOME && filereadable('.vimrc')
127 145
	source .vimrc