forked from ingydotnet/misc-dots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
63 lines (54 loc) · 1.71 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
" Links for easy hopping (!!sh -v):
"ls" -1 ~/.vim/plugin | sort | perl -pe 's,^," ~/.vim/plugin/,'
" ~/.vim/plugin/basics.vim
" ~/.vim/plugin/cygwin-rxvt-broken-function-keys.vim
" ~/.vim/plugin/diff.vim
" ~/.vim/plugin/functionkeys.vim
" ~/.vim/plugin/gpg.vim
" ~/.vim/plugin/keymaps.vim
" ~/.vim/plugin/mail.vim
" ~/.vim/plugin/perl.vim
" ~/.vim/plugin/svn.vim
autocmd BufRead *.wiki set ft=wiki tw=0
au FileType vim set iskeyword+=. iskeyword+=/ iskeyword+=~
set splitright
set termencoding=utf-8
set encoding=utf-8
set fileencoding=utf-8
set pastetoggle=<F13>
set vb t_vb=
set exrc
" ============================================
" lookupfile.vim
" ============================================
nmap <unique> <silent> <C-S> :LUBufs ^.*<CR>
let g:LookupFile_AlwaysAcceptFirst=1
let g:LookupFile_PreserveLastPattern=0
let g:LookupFile_AllowNewFiles=0
let no_lookupfile_maps=1
" ============================================
" open perl module with gf
" ============================================
autocmd FileType perl set isfname-=-
" ============================================
" statusline
" ============================================
set statusline=%y%{GetFileEncoding()}%F%m%r%=%c:%l%5(\ %)%3p%%
function! GetFileEncoding()
let str = &fileformat . ']'
if has('multi_byte') && &fileencoding != ''
let str = &fileencoding . ':' . str
endif
let str = '[' . str
return str
endfunction
" ============================================
" surround.vim
" ============================================
" gettextnize texts
let g:surround_103 = "loc('\r')" " 103 = g
let g:surround_71 = "loc(\"\r\")" " 71 = G
nmap g' cs'g
nmap g" cs"G
" recognize .psgi files as perl
au BufNewFile,BufRead *.psgi set filetype=perl