some awesome vim tweaks :3
This commit is contained in:
parent
52423d6556
commit
7804e021e9
1 changed files with 14 additions and 4 deletions
18
vimrc
18
vimrc
|
@ -1,7 +1,6 @@
|
||||||
if &cp | set nocp | endif
|
if &cp | set nocp | endif
|
||||||
let s:cpo_save=&cpo
|
let s:cpo_save=&cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
map <S-Insert> <MiddleMouse>
|
|
||||||
let &cpo=s:cpo_save
|
let &cpo=s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
@ -25,6 +24,7 @@ set smartcase
|
||||||
set clipboard=exclude:.*
|
set clipboard=exclude:.*
|
||||||
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
|
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
|
||||||
set foldmethod=marker
|
set foldmethod=marker
|
||||||
|
" disable bell
|
||||||
set noerrorbells visualbell t_vb=
|
set noerrorbells visualbell t_vb=
|
||||||
|
|
||||||
set list
|
set list
|
||||||
|
@ -35,8 +35,16 @@ autocmd FileType ruby setlocal sts=2 sw=2 expandtab
|
||||||
autocmd FileType eruby setlocal sts=2 sw=2 expandtab
|
autocmd FileType eruby setlocal sts=2 sw=2 expandtab
|
||||||
autocmd FileType puppet setlocal sts=2 sw=2 expandtab
|
autocmd FileType puppet setlocal sts=2 sw=2 expandtab
|
||||||
autocmd FileType python setlocal sts=4 sw=4 expandtab
|
autocmd FileType python setlocal sts=4 sw=4 expandtab
|
||||||
"autocmd FileType lua setlocal sts=4 sw=4 expandtab
|
|
||||||
|
|
||||||
|
" maps
|
||||||
|
map <S-Insert> <MiddleMouse>
|
||||||
|
" map buffers to leader buffer number
|
||||||
|
for i in range(1,9)
|
||||||
|
execute 'nmap <C-W>' . i . ' :buffer ' . i . '<cr>'
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" nmaps
|
||||||
|
nmap <Space> <C-W>
|
||||||
" next line in wrapped lines
|
" next line in wrapped lines
|
||||||
nmap j gj
|
nmap j gj
|
||||||
nmap k gk
|
nmap k gk
|
||||||
|
@ -85,8 +93,10 @@ if v:version >= 703
|
||||||
let g:signify_vcs_list = [ 'svn', 'git' ]
|
let g:signify_vcs_list = [ 'svn', 'git' ]
|
||||||
let g:signify_sign_change = '~'
|
let g:signify_sign_change = '~'
|
||||||
|
|
||||||
elseif filereadable(expand("$HOME/.vim/autoload/pathogen.vim"))
|
" nerdtree options
|
||||||
execute pathogen#infect()
|
map <C-W>k :NERDTreeToggle<cr>
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue