From 7804e021e9675fbf3f81f6986d335f427e182441 Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 12 Nov 2014 19:33:26 +0300 Subject: [PATCH] some awesome vim tweaks :3 --- vimrc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index 6189c7b..6431ebb 100644 --- a/vimrc +++ b/vimrc @@ -1,7 +1,6 @@ if &cp | set nocp | endif let s:cpo_save=&cpo set cpo&vim -map let &cpo=s:cpo_save unlet s:cpo_save set nocompatible @@ -25,6 +24,7 @@ set smartcase set clipboard=exclude:.* set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v][%p%%]\ [LEN=%L] set foldmethod=marker +" disable bell set noerrorbells visualbell t_vb= 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 puppet setlocal sts=2 sw=2 expandtab autocmd FileType python setlocal sts=4 sw=4 expandtab -"autocmd FileType lua setlocal sts=4 sw=4 expandtab +" maps +map +" map buffers to leader buffer number +for i in range(1,9) + execute 'nmap ' . i . ' :buffer ' . i . '' +endfor + +" nmaps +nmap " next line in wrapped lines nmap j gj nmap k gk @@ -85,8 +93,10 @@ if v:version >= 703 let g:signify_vcs_list = [ 'svn', 'git' ] let g:signify_sign_change = '~' - elseif filereadable(expand("$HOME/.vim/autoload/pathogen.vim")) - execute pathogen#infect() + " nerdtree options + map k :NERDTreeToggle + autocmd StdinReadPre * let s:std_in=1 + autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif endif endif