forked from filterfish/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
151 lines (110 loc) · 3.35 KB
/
.vimrc
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
145
146
147
148
149
150
151
nmap . .`[
set spelllang=en_gb
set spell
"noremap J F|noremap <C-w>J <C-w>F
"L & H is remaped to S & T so unmap L & H
"nnoremap L <Nop>
"nnoremap H <Nop>
"Remap ctrl-n to be save. I don't think :w<CR> is helping my rsi.
"nnoremap <C-n> :w<CR>
" set the various plugin paths
set runtimepath+=/home/jack/.vim/gnupg
set runtimepath+=/home/jack/.vim/commentary
set runtimepath+=/home/jack/.vim/gundo
set runtimepath+=/home/jack/.vim/puppet
set runtimepath+=/home/jack/.vim/repeat
set runtimepath+=/home/jack/.vim/surround
set runtimepath+=/home/jack/.vim/speeddating
set runtimepath+=/home/jack/.vim/solarized
set runtimepath+=/home/jack/.vim/utl
set runtimepath+=/home/jack/.vim/ack
source /home/jack/.vim/udev.vim
source /home/jack/.vim/autotag.vim
nnoremap <leader>s :%s/\s\+$//<cr>:let @/=''<cr>
nnoremap <leader>w :set nowrap!<cr>
nnoremap <leader>m :GundoToggle<cr>
nnoremap <leader>r :set filetype=ruby<cr>
syntax enable
syntax sync fromstart
filetype on
filetype plugin on
filetype indent on
map sb :se paste<cr>ggI#!/usr/bin/env ruby<cr># -*- encoding: utf-8 -*-<cr><cr><esc>`':se nopaste<cr>
map us :se paste<cr>ggI# -*- encoding: utf-8 -*-<cr><esc>`':se nopaste<cr>
highlight Pmenu ctermbg=238 gui=bold
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd BufWritePre * :%s/\s\+$//e
let g:solarized_termcolors=256
let g:solarized_bold=0
let g:solarized_underline=1
let g:solarized_termtrans=1
syntax enable
set background=dark
colorscheme solarized
runtime macros/matchit.vim
:nohlsearch
let g:allml_global_maps = 1
let loaded_matchparen = 1
" rails stuff.
"set nocompatible " We don't want vi compatibility.
if $USER != 'root'
set modeline
else
set nomodeline
endif
set tags=tags;
set pastetoggle=<c-v>
set viminfo^=!
set timeoutlen=250 " Time to wait after ESC (default causes an annoying delay)
set autoindent
" For vim/ctags to recognise methods with a ?
set iskeyword+=?
" Visual
set novisualbell " No blinking .
set noerrorbells " No noise.
set expandtab
set softtabstop=2
set tabstop=2
set shiftwidth=2
set nonumber
" See http://items.sjbach.com/319/configuring-vim-right for an
" explanation of the following:
set hidden
set wildmode=list:longest,full
set directory=~/.vim-tmp,~/tmp,/var/tmp,/tmp
" persistent undo.
if v:version >= 703
set undofile
set undodir=~/.vim-tmp,~/tmp,/var/tmp,/tmp
endif
" Shorten messages
set shortmess=aI
" Don't add two spaces when joining lines
set nojoinspaces
" Vi-style editing in the command-line
"nnoremap : q:a
"nnoremap / q/a
"nnoremap ? q?a
" Set the title in screen.
if $TERM=='screen' || $TERM=='screen-256color'
exe "set title titlestring=%f"
exe "set title t_ts=\<ESC>k t_fs=\<ESC>\\"
endif
if has("gui_running")
set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=l
set guioptions-=R
set guioptions-=b
colorscheme slate
endif
let g:ackprg="ack-grep -H --nocolor --nogroup --column"
call pathogen#infect()
" EJS highlight
au BufNewFile,BufRead *.ejs set filetype=html