From 77408a620d99ed68f967e7a849e0cc1b59e858a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Wed, 11 Dec 2013 23:13:46 +0100 Subject: [PATCH] Some vim changes. --- vim/vimrc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index a6a34d5..41b75a3 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -59,8 +59,15 @@ Bundle 'bling/vim-airline' " date/time support for CTRL-x and CTRL-a Bundle 'tpope/vim-speeddating' +" git integration +Bundle 'tpope/vim-fugitive' + filetype plugin indent on +" setup for vim-airline +" enable tabline at the top showing all buffers +let g:airline#extensions#tabline#enabled = 1 + " setup for the solarized color theme set background=dark let g:solarized_termcolors=16 @@ -130,6 +137,7 @@ set encoding=utf-8 " set the encoding set showmode " show current mode in the status line set swapfile " use a swapfile +set directory=~/.vim-swap,/var/tmp,/tmp set updatecount=200 " default, number of characters that have " to be typed before the swapfile is " written to disk @@ -139,8 +147,6 @@ set updatetime=10000 " time in milliseconds after the swapfile set title " let vim set the title of the window set titlestring="" " use default titlestring - - set autoread " automatically reload a file when it was " changed outside of vim @@ -153,7 +159,6 @@ set shiftwidth=4 " one indent level equals 4 spaces set expandtab " expand tabs to spaces set autoindent " copy indent from current line when " starting a new one -set smartindent " smart indenting for C-like languages set smarttab " use shiftwidth when tabbing in front of " a line instead of tabsstop/softtabstop set shiftround " round indent to multiples of shiftwidth @@ -197,6 +202,8 @@ set wildignore=*.swp,*.bak,*.pyc " files to ignore when expanding wildcards set noerrorbells " do not beep on errors +set colorcolumn=80 " highlight the 80st column + "set list " show specific spectial characters "set listchars= " no trailing whitespace as '~' @@ -229,6 +236,15 @@ autocmd FilterWritePre * :call TrimWhiteSpace() autocmd BufWritePre * :call TrimWhiteSpace() " Start NERDTree when starting vim -"autocmd vimenter * NERDTree +autocmd vimenter * NERDTree +"autocmd VimEnter * wincmd p " close NERDTree when it's the only window left autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif + +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +nnoremap :NERDTreeToggle +