utils 0.0.67 → 0.0.68
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/edit +3 -1
- data/lib/utils/editor.rb +14 -0
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +3 -3
- metadata +3 -74
- data/lib/utils/config/vim/after/syntax/haml.vim +0 -9
- data/lib/utils/config/vim/after/syntax/html.vim +0 -11
- data/lib/utils/config/vim/autoload/Align.vim +0 -1029
- data/lib/utils/config/vim/autoload/AlignMaps.vim +0 -330
- data/lib/utils/config/vim/autoload/ctrlp/bookmarkdir.vim +0 -139
- data/lib/utils/config/vim/autoload/ctrlp/buffertag.vim +0 -238
- data/lib/utils/config/vim/autoload/ctrlp/changes.vim +0 -96
- data/lib/utils/config/vim/autoload/ctrlp/dir.vim +0 -90
- data/lib/utils/config/vim/autoload/ctrlp/line.vim +0 -63
- data/lib/utils/config/vim/autoload/ctrlp/mixed.vim +0 -83
- data/lib/utils/config/vim/autoload/ctrlp/mrufiles.vim +0 -119
- data/lib/utils/config/vim/autoload/ctrlp/quickfix.vim +0 -62
- data/lib/utils/config/vim/autoload/ctrlp/rtscript.vim +0 -49
- data/lib/utils/config/vim/autoload/ctrlp/tag.vim +0 -112
- data/lib/utils/config/vim/autoload/ctrlp/undo.vim +0 -154
- data/lib/utils/config/vim/autoload/ctrlp/utils.vim +0 -72
- data/lib/utils/config/vim/autoload/ctrlp.vim +0 -1772
- data/lib/utils/config/vim/autoload/rails.vim +0 -4570
- data/lib/utils/config/vim/autoload/rubycomplete.vim +0 -801
- data/lib/utils/config/vim/autoload/sqlcomplete.vim +0 -741
- data/lib/utils/config/vim/autoload/vimball.vim +0 -750
- data/lib/utils/config/vim/colors/flori.vim +0 -116
- data/lib/utils/config/vim/compiler/coffee.vim +0 -68
- data/lib/utils/config/vim/compiler/eruby.vim +0 -40
- data/lib/utils/config/vim/compiler/ruby.vim +0 -67
- data/lib/utils/config/vim/compiler/rubyunit.vim +0 -34
- data/lib/utils/config/vim/doc/Decho.txt +0 -372
- data/lib/utils/config/vim/doc/coffee-script.txt +0 -116
- data/lib/utils/config/vim/doc/ctrlp.txt +0 -1113
- data/lib/utils/config/vim/doc/fugitive.txt +0 -257
- data/lib/utils/config/vim/doc/rails.txt +0 -1022
- data/lib/utils/config/vim/doc/xml-plugin.txt +0 -226
- data/lib/utils/config/vim/ftdetect/coffee.vim +0 -8
- data/lib/utils/config/vim/ftdetect/eco.vim +0 -1
- data/lib/utils/config/vim/ftdetect/ragel.vim +0 -2
- data/lib/utils/config/vim/ftdetect/ruby.vim +0 -17
- data/lib/utils/config/vim/ftdetect/slim.vim +0 -2
- data/lib/utils/config/vim/ftplugin/coffee.vim +0 -221
- data/lib/utils/config/vim/ftplugin/eruby.vim +0 -100
- data/lib/utils/config/vim/ftplugin/ruby.vim +0 -260
- data/lib/utils/config/vim/ftplugin/xml.vim +0 -941
- data/lib/utils/config/vim/indent/IndentAnything_html.vim +0 -35
- data/lib/utils/config/vim/indent/coffee.vim +0 -338
- data/lib/utils/config/vim/indent/eruby.vim +0 -77
- data/lib/utils/config/vim/indent/javascript.vim +0 -116
- data/lib/utils/config/vim/indent/ruby.vim +0 -377
- data/lib/utils/config/vim/indent/slim.vim +0 -75
- data/lib/utils/config/vim/plugin/AlignMapsPlugin.vim +0 -242
- data/lib/utils/config/vim/plugin/AlignPlugin.vim +0 -41
- data/lib/utils/config/vim/plugin/Decho.vim +0 -592
- data/lib/utils/config/vim/plugin/IndentAnything.vim +0 -675
- data/lib/utils/config/vim/plugin/bufexplorer.vim +0 -1144
- data/lib/utils/config/vim/plugin/cecutil.vim +0 -508
- data/lib/utils/config/vim/plugin/ctrlp.vim +0 -61
- data/lib/utils/config/vim/plugin/fugitive.vim +0 -2041
- data/lib/utils/config/vim/plugin/lusty-explorer.vim +0 -1509
- data/lib/utils/config/vim/plugin/rails.vim +0 -339
- data/lib/utils/config/vim/plugin/rubyextra.vim +0 -193
- data/lib/utils/config/vim/plugin/surround.vim +0 -628
- data/lib/utils/config/vim/plugin/taglist.vim +0 -4546
- data/lib/utils/config/vim/plugin/test/IndentAnything/test.js +0 -131
- data/lib/utils/config/vim/plugin/vimballPlugin.vim +0 -40
- data/lib/utils/config/vim/syntax/Decho.vim +0 -101
- data/lib/utils/config/vim/syntax/coffee.vim +0 -217
- data/lib/utils/config/vim/syntax/eco.vim +0 -62
- data/lib/utils/config/vim/syntax/eruby.vim +0 -73
- data/lib/utils/config/vim/syntax/javascript.vim +0 -246
- data/lib/utils/config/vim/syntax/ragel.vim +0 -165
- data/lib/utils/config/vim/syntax/ruby.vim +0 -367
- data/lib/utils/config/vim/syntax/slim.vim +0 -117
- data/lib/utils/config/vimrc +0 -540
data/lib/utils/config/vimrc
DELETED
@@ -1,540 +0,0 @@
|
|
1
|
-
" Flori's vimrc
|
2
|
-
|
3
|
-
" General Settings
|
4
|
-
"set autochdir
|
5
|
-
"set wildmode=list:full
|
6
|
-
set autoindent
|
7
|
-
set autowrite
|
8
|
-
set backspace=indent,eol,start
|
9
|
-
if exists('&colorcolumn')
|
10
|
-
set colorcolumn=79
|
11
|
-
end
|
12
|
-
set textwidth=80
|
13
|
-
set dictionary=/usr/dict/words
|
14
|
-
set nodigraph
|
15
|
-
set encoding=utf8
|
16
|
-
set errorformat+=%f:%l
|
17
|
-
set expandtab shiftwidth=2 tabstop=2
|
18
|
-
set foldcolumn=0
|
19
|
-
set formatoptions=cqrt
|
20
|
-
set fsync
|
21
|
-
set hidden
|
22
|
-
set history=1000
|
23
|
-
set hlsearch
|
24
|
-
set laststatus=2
|
25
|
-
set makeprg=errf
|
26
|
-
set modelines=5
|
27
|
-
set mousehide
|
28
|
-
set mouse=nv
|
29
|
-
set nocindent
|
30
|
-
set nocompatible
|
31
|
-
set nocursorcolumn
|
32
|
-
set nocursorline
|
33
|
-
set nofoldenable
|
34
|
-
set noignorecase
|
35
|
-
set noincsearch
|
36
|
-
set nojoinspaces
|
37
|
-
set nopaste
|
38
|
-
set nosmartcase
|
39
|
-
set nosmartindent
|
40
|
-
set nowrap
|
41
|
-
set number
|
42
|
-
set ruler
|
43
|
-
set shortmess=atI
|
44
|
-
set showcmd
|
45
|
-
set showmatch
|
46
|
-
set showmode
|
47
|
-
set smarttab
|
48
|
-
set statusline=%<%f%m%r%=%(%Bh=%bd%)@%(%l:%c\%)%4P
|
49
|
-
set swapsync="fsync"
|
50
|
-
set termencoding=utf8
|
51
|
-
set tildeop
|
52
|
-
set title
|
53
|
-
set ttyfast
|
54
|
-
set viminfo='20,<50,s10,h,!
|
55
|
-
set visualbell t_vb=
|
56
|
-
set wildchar=<TAB>
|
57
|
-
set wildmenu
|
58
|
-
set winminheight=0
|
59
|
-
if has("persistent_undo")
|
60
|
-
set undofile
|
61
|
-
if has("win32") || has("win64")
|
62
|
-
set undodir=$TMP
|
63
|
-
else
|
64
|
-
set undodir=/tmp
|
65
|
-
end
|
66
|
-
end
|
67
|
-
if has("win32") || has("win64")
|
68
|
-
set directory=$TMP
|
69
|
-
else
|
70
|
-
set directory=/tmp
|
71
|
-
end
|
72
|
-
|
73
|
-
filetype on
|
74
|
-
filetype indent on
|
75
|
-
filetype plugin on
|
76
|
-
source $VIMRUNTIME/macros/matchit.vim
|
77
|
-
set t_Co=256
|
78
|
-
colorscheme flori
|
79
|
-
|
80
|
-
" Configure GUIs
|
81
|
-
if has("gui_running")
|
82
|
-
set guipty
|
83
|
-
hi Pmenu ctermbg=Grey guibg=DarkGrey
|
84
|
-
set guioptions-=r
|
85
|
-
set guioptions-=R
|
86
|
-
set guioptions-=l
|
87
|
-
set guioptions-=L
|
88
|
-
if exists("+guioptions")
|
89
|
-
set guioptions+=c
|
90
|
-
end
|
91
|
-
if has("gui_win32")
|
92
|
-
set guifont=DejaVu\ Sans\ Mono:h12
|
93
|
-
"set antialias
|
94
|
-
if exists("+guioptions")
|
95
|
-
set guioptions-=T
|
96
|
-
set guioptions-=m
|
97
|
-
set guioptions+=p
|
98
|
-
end
|
99
|
-
elseif has("gui_gtk2")
|
100
|
-
set guifont=DejaVu\ Sans\ Mono\ 12
|
101
|
-
if exists("+guioptions")
|
102
|
-
set guioptions-=T
|
103
|
-
set guioptions-=m
|
104
|
-
set guioptions+=p
|
105
|
-
end
|
106
|
-
set guiheadroom=0
|
107
|
-
set columns=80
|
108
|
-
set lines=59
|
109
|
-
elseif has("gui_mac") || has("gui_macvim")
|
110
|
-
set guifont=DejaVu\ Sans\ Mono:h14
|
111
|
-
if exists("+guioptions")
|
112
|
-
set guioptions-=T
|
113
|
-
set guioptions-=m
|
114
|
-
set guioptions+=p
|
115
|
-
end
|
116
|
-
set antialias
|
117
|
-
set guiheadroom=0
|
118
|
-
"set macatsui
|
119
|
-
set columns=160
|
120
|
-
set lines=86
|
121
|
-
elseif has("x11")
|
122
|
-
set guifont=-b&h-lucidatypewriter-*-*-normal-*-17-*-*-*-*-*-iso10646-*
|
123
|
-
if exists("+guioptions")
|
124
|
-
set guioptions-=T
|
125
|
-
set guioptions-=m
|
126
|
-
end
|
127
|
-
end
|
128
|
-
else
|
129
|
-
hi DiffAdd ctermbg=green
|
130
|
-
hi DiffChange ctermbg=blue
|
131
|
-
hi DiffText ctermbg=gray
|
132
|
-
hi DiffDelete ctermbg=red
|
133
|
-
end
|
134
|
-
|
135
|
-
" Syntax
|
136
|
-
let ruby_operators=1
|
137
|
-
if has("syntax")
|
138
|
-
syntax on
|
139
|
-
end
|
140
|
-
|
141
|
-
" Browsing
|
142
|
-
if has("browse")
|
143
|
-
let g:explVertical=0
|
144
|
-
" let g:explSplitRight=1
|
145
|
-
let g:explSplitBelow=0
|
146
|
-
" let g:explStartRight=0
|
147
|
-
let g:explStartBelow=1
|
148
|
-
let g:explDetailedList=1
|
149
|
-
let g:explDateFormat="%Y-%m-%d %H:%M:%S"
|
150
|
-
" let g:explHideFiles='^\.,\.gz$,\.exe$,\.zip$'
|
151
|
-
let g:explUseSeparators=1 " Use separator lines
|
152
|
-
end
|
153
|
-
|
154
|
-
let g:netrw_longlist=1
|
155
|
-
let g:netrw_use_noswf= 0
|
156
|
-
let g:netrw_hide=1
|
157
|
-
let g:netrw_list_hidee='\..*\.sw[pon]$'
|
158
|
-
|
159
|
-
let g:rails_statusline=0
|
160
|
-
let g:LustyJugglerSuppressRubyWarning=1
|
161
|
-
|
162
|
-
" CScope
|
163
|
-
if has("cscope")
|
164
|
-
" set csprg=/usr/local/bin/cscope
|
165
|
-
set cscopetagorder=0
|
166
|
-
set cscopetag
|
167
|
-
set nocsverb
|
168
|
-
" add any database in current directory
|
169
|
-
if filereadable("cscope.out")
|
170
|
-
cs add cscope.out
|
171
|
-
" else add database pointed to by environment
|
172
|
-
elseif $CSCOPE_DB != ""
|
173
|
-
cs add $CSCOPE_DB
|
174
|
-
end
|
175
|
-
set csverb
|
176
|
-
end
|
177
|
-
|
178
|
-
" Mappings
|
179
|
-
let mapleader=","
|
180
|
-
let maplocalleader=","
|
181
|
-
" open another file in this files directory
|
182
|
-
map <leader>e :e <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
|
183
|
-
map <leader>t :tabe <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
|
184
|
-
map <leader>s :split <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
|
185
|
-
map <leader>c :cd <C-R>=substitute(expand("%:p:h") . "/", " ", "\\\\ ", "g")<CR>
|
186
|
-
map <leader>h :call Csymbolhash()<CR>
|
187
|
-
map <leader>H :%call Csymbolhash()<CR>
|
188
|
-
map <leader>C :call Ccamelunderscore()<CR>
|
189
|
-
map <leader>f :!echo %\|pbcopy<CR><CR>
|
190
|
-
map <leader>n :new <cfile><CR>
|
191
|
-
|
192
|
-
" Switch of search highlighting
|
193
|
-
map <silent> <F9> :nohlsearch<CR>
|
194
|
-
if has("fullscreen")
|
195
|
-
set fuoptions=maxhorz,maxvert
|
196
|
-
function! Cfullscreen()
|
197
|
-
if &fullscreen == "1"
|
198
|
-
set nofullscreen
|
199
|
-
else
|
200
|
-
set fullscreen
|
201
|
-
end
|
202
|
-
endfunction
|
203
|
-
map <silent> <F11> :call Cfullscreen()<CR>
|
204
|
-
if has("gui_mac") || has("gui_macvim")
|
205
|
-
map <silent> <D-Enter> :call Cfullscreen()<CR>
|
206
|
-
end
|
207
|
-
au GUIEnter * set fullscreen
|
208
|
-
end
|
209
|
-
function! Ctoggle()
|
210
|
-
if &buftype == "quickfix"
|
211
|
-
cclose
|
212
|
-
else
|
213
|
-
copen
|
214
|
-
end
|
215
|
-
endfunction
|
216
|
-
nnoremap <silent> <F12> :call Ctoggle()<CR>
|
217
|
-
|
218
|
-
" Switch Windows
|
219
|
-
map <A-j> <C-W>j<C-W>_
|
220
|
-
map ∆ <C-W>j<C-W>_
|
221
|
-
map <A-k> <C-W>k<C-W>_
|
222
|
-
map ˚ <C-W>k<C-W>_
|
223
|
-
" Switch Buffers
|
224
|
-
map <A-l> <ESC>:bn<CR>
|
225
|
-
map ¬ <ESC>:bn<CR>
|
226
|
-
map <A-h> <ESC>:bp<CR>
|
227
|
-
map ˙ <ESC>:bp<CR>
|
228
|
-
map <A-=> <C-W>=
|
229
|
-
map ≠ <C-W>=
|
230
|
-
map <A-,> <C-W>+
|
231
|
-
map ≥ <C-W>+
|
232
|
-
map <A-.> <C-W>-
|
233
|
-
map ≤ <C-W>-
|
234
|
-
|
235
|
-
" Configure navigation keys
|
236
|
-
noremap <Up> <Nop>
|
237
|
-
noremap <Down> <Nop>
|
238
|
-
noremap <Left> <Nop>
|
239
|
-
noremap <Right> <Nop>
|
240
|
-
noremap <Ins> <Nop>
|
241
|
-
noremap <End> <Nop>
|
242
|
-
noremap <Home> <Nop>
|
243
|
-
noremap <End> <Nop>
|
244
|
-
noremap <PageUp> <Nop>
|
245
|
-
noremap <PageDown> <Nop>
|
246
|
-
cnoremap <C-0> <Home>
|
247
|
-
cnoremap <C-^> <Home>
|
248
|
-
cnoremap <C-$> <End>
|
249
|
-
cnoremap <C-h> <Left>
|
250
|
-
cnoremap <C-l> <Right>
|
251
|
-
cnoremap <C-k> <Up>
|
252
|
-
cnoremap <C-j> <Down>
|
253
|
-
vnoremap < <gv
|
254
|
-
vnoremap > >gv
|
255
|
-
" Marks
|
256
|
-
nnoremap ' `
|
257
|
-
nnoremap ` '
|
258
|
-
|
259
|
-
if has("autocmd")
|
260
|
-
" Auto Command - Hooks
|
261
|
-
augroup gzip
|
262
|
-
autocmd!
|
263
|
-
autocmd BufReadPre,FileReadPre *.gz setl bin
|
264
|
-
autocmd BufReadPost,FileReadPost *.gz '[,']!gzip -d
|
265
|
-
autocmd BufReadPost,FileReadPost *.gz setl nobin
|
266
|
-
autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r")
|
267
|
-
autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
|
268
|
-
autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
|
269
|
-
autocmd FileAppendPre *.gz !gzip -d <afile>
|
270
|
-
autocmd FileAppendPre *.gz !mv <afile>:r <afile>
|
271
|
-
autocmd FileAppendPost *.gz !mv <afile> <afile>:r
|
272
|
-
autocmd FileAppendPost *.gz !gzip <afile>:r
|
273
|
-
augroup END
|
274
|
-
|
275
|
-
augroup bzip2
|
276
|
-
autocmd!
|
277
|
-
autocmd BufReadPre,FileReadPre *.bz2 setl bin
|
278
|
-
autocmd BufReadPost,FileReadPost *.bz2 '[,']!bzip2 -d
|
279
|
-
autocmd BufReadPost,FileReadPost *.bz2 setl nobin
|
280
|
-
autocmd BufReadPost,FileReadPost *.bz2 execute ":doautocmd BufReadPost " . expand("%:r")
|
281
|
-
autocmd BufWritePost,FileWritePost *.bz2 !mv <afile> <afile>:r
|
282
|
-
autocmd BufWritePost,FileWritePost *.bz2 !bzip2 <afile>:r
|
283
|
-
autocmd FileAppendPre *.bz2 !bz2ip -d <afile>
|
284
|
-
autocmd FileAppendPre *.bz2 !mv <afile>:r <afile>
|
285
|
-
autocmd FileAppendPost *.bz2 !mv <afile> <afile>:r
|
286
|
-
autocmd FileAppendPost *.bz2 !bzip2 -d <afile>:r
|
287
|
-
augroup END
|
288
|
-
|
289
|
-
augroup tex
|
290
|
-
autocmd!
|
291
|
-
autocmd FileType tex map <buffer> <F1> <ESC>:!latex %<CR><CR>
|
292
|
-
autocmd FileType tex map <buffer> <F2> <ESC>:!dvips `echo %\|sed -e 's/tex/dvi/'`<CR><CR>
|
293
|
-
autocmd FileType tex map <buffer> <F3> <ESC><F1>:!xdvi -s 0 `echo %\|sed -e 's/tex/dvi/'` &<CR><CR>
|
294
|
-
autocmd FileType tex map <buffer> <F4> <ESC><F1><F2>:!gv `echo %\|sed -e 's/tex/ps/'` &<CR><CR>
|
295
|
-
autocmd FileType tex map <buffer> <F5> <ESC>:!pdflatex %<CR><CR><CR>
|
296
|
-
autocmd FileType tex map <buffer> <F6> <ESC><F1>:!acroread `echo %\|sed -e 's/tex/pdf/'`<CR><CR>
|
297
|
-
augroup END
|
298
|
-
|
299
|
-
augroup c
|
300
|
-
autocmd!
|
301
|
-
autocmd FileType c setl sw=4 ts=4 cinoptions= formatoptions=cqrol cindent
|
302
|
-
autocmd FileType c map <buffer> <F1> <ESC>:make<CR>
|
303
|
-
autocmd FileType c map <buffer> <F2> <ESC>:%!indent 2>/dev/null -kr -i 4<CR><CR>
|
304
|
-
autocmd FileType c map <buffer> <F3> <ESC>:make clean<CR>
|
305
|
-
autocmd FileType c map <buffer> <F4> <ESC><Home>i/* <ESC><End>a */<ESC>
|
306
|
-
augroup END
|
307
|
-
|
308
|
-
augroup pascal
|
309
|
-
autocmd!
|
310
|
-
autocmd FileType pascal setl et st=2 sw=2 autoindent
|
311
|
-
autocmd FileType pascal map <buffer> <F1> <ESC>:!gpc -o `echo %\|sed -e 's/\.pas//'` %<CR>
|
312
|
-
autocmd FileType pascal map <buffer> <F4> <ESC><Home>i{ <ESC><End>a }<ESC>
|
313
|
-
augroup END
|
314
|
-
|
315
|
-
augroup perl
|
316
|
-
autocmd!
|
317
|
-
autocmd Filetype perl setl et sw=4 ts=4 autoindent
|
318
|
-
autocmd FileType perl map <buffer> <F1> <ESC>:w<CR><ESC>:!perl -c %<CR>
|
319
|
-
autocmd FileType perl map <buffer> <F2> <ESC>:w<CR><ESC>:!perl -Tc %<CR>
|
320
|
-
autocmd FileType perl map <buffer> <F3> <ESC>:w<CR><ESC>:.!perl -lne '/^(sub\s+\S+\s*\([^)]*\))\s*\{/ and print "$1;"' %<CR>
|
321
|
-
autocmd FileType perl map <buffer> <F4> <ESC>:w<CR><ESC>:%!perl -pe 's/(sub \w+ *)\(.*\) */$1/'<CR>
|
322
|
-
autocmd FileType perl map <buffer> <F5> <ESC><Home>i#<ESC>
|
323
|
-
autocmd FileType perl map <buffer> <F6> <ESC>:w<CR><ESC>:!perl -I lib -I cfg %<CR>
|
324
|
-
augroup END
|
325
|
-
|
326
|
-
augroup ruby
|
327
|
-
autocmd!
|
328
|
-
autocmd FileType ruby setl et sw=2 ts=2 autoindent keywordprg=ri\ --no-pager
|
329
|
-
autocmd FileType ruby map <buffer> <F1> <ESC>:w<CR><ESC>:!RUBYOPT="$RUBYOPT -Iext:lib:test:tests" ruby -wc %<CR>
|
330
|
-
autocmd FileType ruby map <buffer> <F2> <ESC>:w<CR><ESC>:!RUBYOPT="$RUBYOPT -Iext:lib:test:tests" ruby % \| ruby -S decolor<CR>
|
331
|
-
autocmd FileType ruby map <buffer> <F3> <ESC>:w<CR><ESC>:!rcov -Iext:lib:test:tests %<CR>
|
332
|
-
autocmd FileType ruby map <buffer> <F4> <ESC><Home>i#<ESC>
|
333
|
-
autocmd FileType ruby map <buffer> <silent> <F5> !xmp ruby<cr>
|
334
|
-
autocmd FileType ruby nmap <buffer> <silent> <F5> V<F5>
|
335
|
-
autocmd FileType ruby imap <buffer> <silent> <F5> <ESC><F5>a
|
336
|
-
autocmd FileType ruby map <buffer> <silent> <F6> <ESC>:w<CR><ESC>:%!xmp ruby -Iext:lib -w<CR>
|
337
|
-
autocmd FileType ruby map <buffer> <silent> <F7> <ESC>:w<CR><ESC>:%!RUBYOPT="" xmp /usr/local/ruby-1.9/bin/ruby -Iext:lib -w <CR>
|
338
|
-
autocmd FileType ruby map <buffer> <silent> <F8> <ESC>:!exuberant-ctags 2>/dev/null -R .<CR>
|
339
|
-
autocmd FileType ruby setl suffixesadd=.rb,.h,.c
|
340
|
-
autocmd FileType ruby setl path+=lib/**
|
341
|
-
autocmd FileType ruby setl path+=test/**
|
342
|
-
autocmd FileType ruby setl path+=tests/**
|
343
|
-
autocmd FileType ruby setl path+=spec/**
|
344
|
-
augroup END
|
345
|
-
|
346
|
-
augroup javascript
|
347
|
-
autocmd!
|
348
|
-
autocmd BufNewFile,BufRead *.json setl filetype=javascript
|
349
|
-
autocmd FileType javascript setl et sw=2 ts=2 cindent
|
350
|
-
augroup end
|
351
|
-
|
352
|
-
augroup java
|
353
|
-
autocmd!
|
354
|
-
autocmd FileType java setl cindent et sw=4 ts=4
|
355
|
-
autocmd FileType java map <buffer> <F1> <ESC>:w<CR>:!javac -deprecation %<CR>
|
356
|
-
autocmd FileType java map <buffer> <F2> <ESC>:w<CR>:!javac %<CR>
|
357
|
-
autocmd FileType java map <buffer> <F3> <ESC>:!rm `echo %\|sed -e 's/java/class/'`<CR>
|
358
|
-
autocmd FileType java map <buffer> <F4> <ESC><Home>i//<ESC>
|
359
|
-
autocmd FileType java map <buffer> <F5> <ESC>:w<CR><ESC>:!astyle -j %<CR>:n %<CR>
|
360
|
-
autocmd FileType java nnoremap <buffer> <silent> <F8> :JavaBrowser<CR>
|
361
|
-
autocmd FileType java let JavaBrowser_Ctags_Cmd = '/usr/bin/exuberant-ctags'
|
362
|
-
autocmd FileType java let JavaBrowser_Sort_Type = "name"
|
363
|
-
autocmd FileType java let JavaBrowser_Display_Prototype = 1
|
364
|
-
autocmd FileType java let JavaBrowser_Use_SingleClick = 0
|
365
|
-
augroup END
|
366
|
-
|
367
|
-
augroup lisp
|
368
|
-
autocmd!
|
369
|
-
autocmd FileType lisp setl lisp autoindent
|
370
|
-
augroup END
|
371
|
-
|
372
|
-
augroup scheme
|
373
|
-
autocmd!
|
374
|
-
autocmd FileType scheme setl lisp autoindent
|
375
|
-
augroup END
|
376
|
-
|
377
|
-
augroup ocaml
|
378
|
-
autocmd!
|
379
|
-
autocmd FileType ocaml setl et sw=2 ts=2 autoindent
|
380
|
-
augroup END
|
381
|
-
|
382
|
-
augroup xml
|
383
|
-
autocmd!
|
384
|
-
autocmd BufNewFile,BufRead *.jsf,*.jsp,*.babel,*.konfetti,*.tag,*.tld setl filetype=xml
|
385
|
-
autocmd FileType xml setl et sw=2 ts=2 autoindent
|
386
|
-
autocmd FileType xml map <buffer> <F1> <ESC>:w<CR><ESC>:!tidy -xml -raw -e %<CR>
|
387
|
-
autocmd FileType xml map <buffer> <F2> <ESC>:%!tidy -xml -raw -i 2>/dev/null<CR><CR>
|
388
|
-
augroup END
|
389
|
-
|
390
|
-
augroup html
|
391
|
-
autocmd!
|
392
|
-
autocmd FileType xml setl et sw=2 ts=2 autoindent
|
393
|
-
autocmd FileType html map <buffer> <F1> <ESC>:w<CR><ESC>:!tidy -e %<CR>
|
394
|
-
autocmd FileType html map <buffer> <F2> <ESC>:%!tidy -wrap 72 -iu 2>/dev/null<CR><CR>
|
395
|
-
augroup END
|
396
|
-
|
397
|
-
augroup html2
|
398
|
-
autocmd!
|
399
|
-
autocmd BufReadPre,FileReadPre *.html.* map <buffer> <F1> <ESC>:w<CR><ESC>:!tidy -e %<CR>
|
400
|
-
autocmd BufReadPre,FileReadPre *.html.* map <buffer> <F2> <ESC>:%!tidy -wrap 72 -iu 2>/dev/null<CR><CR>
|
401
|
-
autocmd BufReadPre,FileReadPre *.html.* so $VIMRUNTIME/syntax/html.vim
|
402
|
-
augroup END
|
403
|
-
|
404
|
-
augroup misc
|
405
|
-
autocmd!
|
406
|
-
autocmd BufWritePost ~/.vimrc so ~/.vimrc
|
407
|
-
augroup END
|
408
|
-
|
409
|
-
augroup mutt
|
410
|
-
autocmd!
|
411
|
-
autocmd BufNewFile,BufRead mutt-* setl textwidth=72
|
412
|
-
augroup END
|
413
|
-
end
|
414
|
-
|
415
|
-
function! Cfind(...)
|
416
|
-
redraw
|
417
|
-
if a:0 == 0
|
418
|
-
let args = [ expand( '<cword>') ]
|
419
|
-
else
|
420
|
-
let args = copy(a:000)
|
421
|
-
end
|
422
|
-
let args_string = join(map(copy(args), 'shellescape(v:val)'), ' ')
|
423
|
-
echo 'Finding ' . args_string . '...'
|
424
|
-
set grepformat=%f
|
425
|
-
set grepprg=discover
|
426
|
-
let @/=args[0]
|
427
|
-
silent execute "silent gr -a 'a-zA-Z0-9' -c -i " . args_string
|
428
|
-
copen
|
429
|
-
redraw!
|
430
|
-
endfunction
|
431
|
-
|
432
|
-
function! Cgrep(...)
|
433
|
-
redraw
|
434
|
-
if a:0 == 0
|
435
|
-
let args = [ expand( '<cword>') ]
|
436
|
-
else
|
437
|
-
let args = copy(a:000)
|
438
|
-
end
|
439
|
-
let args_string = join(map(args, 'shellescape(v:val)'), ' ')
|
440
|
-
echo 'Grepping ' . args_string . '...'
|
441
|
-
set grepformat=%f:%l
|
442
|
-
set grepprg=search
|
443
|
-
set hlsearch
|
444
|
-
let @/=args[0]
|
445
|
-
silent execute "silent gr -c " . args_string
|
446
|
-
copen
|
447
|
-
redraw!
|
448
|
-
endfunction
|
449
|
-
|
450
|
-
function! Ctest(...)
|
451
|
-
execute 'w'
|
452
|
-
if a:0 == 0
|
453
|
-
let name = expand('<cword>')
|
454
|
-
else
|
455
|
-
let name = a:1
|
456
|
-
end
|
457
|
-
execute 'make ' . expand('%') . ' ' . name
|
458
|
-
endfunction
|
459
|
-
|
460
|
-
function! Cclassify(...)
|
461
|
-
if a:0 == 0
|
462
|
-
let args = [ expand( '<cword>') ]
|
463
|
-
else
|
464
|
-
let args = copy(a:000)
|
465
|
-
end
|
466
|
-
let output = system("classify -b " . join(map(copy(args), 'shellescape(v:val)'), ' '))
|
467
|
-
execute "normal a" . output
|
468
|
-
endfunction
|
469
|
-
|
470
|
-
function! CpathClassify(...)
|
471
|
-
if a:0 == 0
|
472
|
-
let args = [ expand( '<cword>') ]
|
473
|
-
else
|
474
|
-
let args = copy(a:000)
|
475
|
-
end
|
476
|
-
let output = system("classify " . join(map(copy(args), 'shellescape(v:val)'), ' '))
|
477
|
-
execute "normal a" . output
|
478
|
-
endfunction
|
479
|
-
|
480
|
-
function! Cdeclassify(...)
|
481
|
-
if a:0 == 0
|
482
|
-
let args = [ expand( '<cword>') ]
|
483
|
-
else
|
484
|
-
let args = copy(a:000)
|
485
|
-
end
|
486
|
-
let output = system("classify -s -d " . join(map(copy(args), 'shellescape(v:val)'), ' '))
|
487
|
-
execute "normal a" . output
|
488
|
-
endfunction
|
489
|
-
|
490
|
-
function! Ccamelunderscore(...)
|
491
|
-
execute 'w'
|
492
|
-
let name = expand('<cWORD>')
|
493
|
-
let output = system('classify -t ' . name)
|
494
|
-
execute "normal ciW" . output
|
495
|
-
endfunction
|
496
|
-
|
497
|
-
function! Csymbolhash() range
|
498
|
-
execute join([ 'silent ', a:firstline, ',', a:lastline, 's/\([^:]\):\([^:=!', "'", '" ]\{1,\}\) *=>/\1\2:/g' ])
|
499
|
-
endfunction
|
500
|
-
|
501
|
-
function! Ccreatetags()
|
502
|
-
call system("bundle execute create_tags")
|
503
|
-
endfunction
|
504
|
-
|
505
|
-
function! PrintGivenRange() range
|
506
|
-
echo "firstline ".a:firstline." lastline ".a:lastline
|
507
|
-
" Do some more things
|
508
|
-
endfunction
|
509
|
-
|
510
|
-
command! -bar -nargs=1 OpenURL :!open <args>
|
511
|
-
command! -bar -nargs=* -complete=file Find call Cfind(<f-args>)
|
512
|
-
command! -bar -nargs=* -complete=file Grep call Cgrep(<f-args>)
|
513
|
-
command! -bar -nargs=* -complete=file Test call Ctest(<f-args>)
|
514
|
-
command! -bar -nargs=* -complete=file Classify call Cclassify(<f-args>)
|
515
|
-
command! -bar -nargs=* -complete=file PathClassify call CpathClassify(<f-args>)
|
516
|
-
command! -bar -nargs=* -complete=file Declassify call Cdeclassify(<f-args>)
|
517
|
-
command! Createtags call Ccreatetags()
|
518
|
-
command! -range Symbolhash <line1>,<line2>call Csymbolhash()
|
519
|
-
command! -range PrintGivenRange <line1>,<line2>call PrintGivenRange()
|
520
|
-
|
521
|
-
function! Iexec(cmd)
|
522
|
-
let output = system(a:cmd)
|
523
|
-
execute "normal a" . output
|
524
|
-
endfunction
|
525
|
-
|
526
|
-
function! Itime(fmt)
|
527
|
-
execute "normal a" . strftime(a:fmt)
|
528
|
-
endfunction
|
529
|
-
|
530
|
-
" Abbreviations
|
531
|
-
iabclear
|
532
|
-
iabbrev I_MFG Mit freundlichen Grüssen,<CR><CR>Florian Frank
|
533
|
-
iabbrev I_DATE <ESC>:call Itime("%F")<CR>
|
534
|
-
iabbrev I_DATETIME <ESC>:call Itime("%F %T")<CR>
|
535
|
-
iabbrev I_TIME <ESC>:call Itime("%T")<CR>
|
536
|
-
iabbrev I_CLASS <ESC>:call Iexec("classify -b " . expand('%'))<CR>
|
537
|
-
iabbrev I_KLASS <ESC>:call Iexec("classify -b " . expand('%'))<CR>
|
538
|
-
iabbrev I_MODULE <ESC>:call Iexec("classify -b " . expand('%'))<CR>
|
539
|
-
iabbrev I_PATH_KLASS <ESC>:call Iexec("classify " . expand('%'))<CR>
|
540
|
-
iabbrev I_ENCODE # encoding: utf-8
|