Some vim changes.

This commit is contained in:
2013-12-11 23:13:46 +01:00
parent 1da647ad11
commit 77408a620d

View File

@@ -59,8 +59,15 @@ Bundle 'bling/vim-airline'
" date/time support for CTRL-x and CTRL-a " date/time support for CTRL-x and CTRL-a
Bundle 'tpope/vim-speeddating' Bundle 'tpope/vim-speeddating'
" git integration
Bundle 'tpope/vim-fugitive'
filetype plugin indent on 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 " setup for the solarized color theme
set background=dark set background=dark
let g:solarized_termcolors=16 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 showmode " show current mode in the status line
set swapfile " use a swapfile set swapfile " use a swapfile
set directory=~/.vim-swap,/var/tmp,/tmp
set updatecount=200 " default, number of characters that have set updatecount=200 " default, number of characters that have
" to be typed before the swapfile is " to be typed before the swapfile is
" written to disk " 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 title " let vim set the title of the window
set titlestring="" " use default titlestring set titlestring="" " use default titlestring
set autoread " automatically reload a file when it was set autoread " automatically reload a file when it was
" changed outside of vim " changed outside of vim
@@ -153,7 +159,6 @@ set shiftwidth=4 " one indent level equals 4 spaces
set expandtab " expand tabs to spaces set expandtab " expand tabs to spaces
set autoindent " copy indent from current line when set autoindent " copy indent from current line when
" starting a new one " starting a new one
set smartindent " smart indenting for C-like languages
set smarttab " use shiftwidth when tabbing in front of set smarttab " use shiftwidth when tabbing in front of
" a line instead of tabsstop/softtabstop " a line instead of tabsstop/softtabstop
set shiftround " round indent to multiples of shiftwidth 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 noerrorbells " do not beep on errors
set colorcolumn=80 " highlight the 80st column
"set list " show specific spectial characters "set list " show specific spectial characters
"set listchars= " no trailing whitespace as '~' "set listchars= " no trailing whitespace as '~'
@@ -229,6 +236,15 @@ autocmd FilterWritePre * :call TrimWhiteSpace()
autocmd BufWritePre * :call TrimWhiteSpace() autocmd BufWritePre * :call TrimWhiteSpace()
" Start NERDTree when starting vim " Start NERDTree when starting vim
"autocmd vimenter * NERDTree autocmd vimenter * NERDTree
"autocmd VimEnter * wincmd p
" close NERDTree when it's the only window left " close NERDTree when it's the only window left
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <F3> :NERDTreeToggle<CR>