From 45ab21f4f6a2fde2076ed0cb37c702528287ac97 Mon Sep 17 00:00:00 2001 From: Matthias Braendli Date: Thu, 22 Jan 2015 09:02:12 +0100 Subject: add undodir, cursorline, other updates --- dotvimrc | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'dotvimrc') diff --git a/dotvimrc b/dotvimrc index bae820f..5592c4a 100644 --- a/dotvimrc +++ b/dotvimrc @@ -1,9 +1,9 @@ +set nocompatible syn on set ignorecase set smartcase set modeline set modelines=5 -set nocompatible set wildmode=longest:full set wildmenu set hlsearch @@ -19,6 +19,10 @@ set path=$PWD/** set showcmd set scrolloff=3 +" persistent-undo +set undodir=~/.vim/undodir +set undofile + set runtimepath+=~/.vim/bundle/neobundle.vim/ " remove toolbar @@ -69,6 +73,8 @@ let g:clang_snippets = 1 let g:clang_snippets_engine = 'clang_complete' noremap c :call g:ClangUpdateQuickFix() +"NeoBundle 'Valloric/YouCompleteMe.git' + NeoBundle 'tpope/vim-surround.git' NeoBundle 'taglist.vim' NeoBundle 'ifdef-highlighting' @@ -100,6 +106,8 @@ if has("gui_running") endif nnoremap :call ToggleFullScreen() + + set cursorline else colorscheme desert endif @@ -120,6 +128,11 @@ set shiftwidth=4 set tabstop=4 set expandtab +"What highlighting group is the current cursor on ? +function! SyntaxItem() + return synIDattr(synID(line("."),col("."),1),"name") +endfunction + "Nice statusbar set laststatus=2 set statusline= @@ -128,8 +141,10 @@ set statusline+=%f\ " file name set statusline+=%h%m%r%w " flags set statusline+=\[%{strlen(&ft)?&ft:'none'}, " filetype set statusline+=%{&fileencoding}, " encoding -set statusline+=%{&fileformat}]\ " file format -set statusline+=%{strftime('%a\ %b\ %e\ %H:%M')} " hour +set statusline+=%{&fileformat}, " file format +set statusline+=%{((exists(\"+bomb\")\ &&\ &bomb)?\"B,\":\"\")}]\ " BOM +set statusline+=%{strftime('%a\ %b\ %e\ %H:%M')}\ " hour +"set statusline+=%{SyntaxItem()} " syntax highlight group under cursor set statusline+=%= " right align set statusline+=0x%-8B\ " current char set statusline+=%-14.(%l,%c%V%)\ %<%P " offset @@ -267,9 +282,6 @@ inoremap "very magic search noremap / /\v -"remove adding stars in comments -set formatoptions-=ro - call neobundle#end() filetype plugin indent on -- cgit v1.2.3