diff --git a/vimrc b/vimrc index 8a7c6f8..bdc32c6 100644 --- a/vimrc +++ b/vimrc @@ -1,7 +1,5 @@ - set nocompatible -filetype off "required - +filetype off "required set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() @@ -20,7 +18,7 @@ Plugin 'VundleVim/Vundle.vim' Plugin 'shougo/neocomplete.vim' call vundle#end() -filetype plugin on " required +filetype plugin on " required " To ignore plugin indent changes, instead use: "filetype plugin on " @@ -33,8 +31,6 @@ filetype plugin on " required " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line -"""""""""""""""""""""""""""""""""""" - " Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplete. @@ -68,11 +64,11 @@ endfunction " : completion. inoremap pumvisible() ? "\" : "\" -" Close popup by . +" Close popup by . NO, this makes it slow af to type "inoremap pumvisible() ? "\" : "\" " AutoComplPop like behavior. -"let g:neocomplete#enable_auto_select = 1 +let g:neocomplete#enable_auto_select = 0 " Enable omni completion. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS @@ -87,10 +83,10 @@ if !exists('g:neocomplete#sources#omni#input_patterns') endif """""""""""""""""""""""""""""""""""" - -set softtabstop=2 -set tabstop=2 -set shiftwidth=2 +" Linux kernel style tabs +set softtabstop=8 +set tabstop=8 +set shiftwidth=8 set expandtab set smarttab @@ -99,9 +95,7 @@ set errorformat+=%.%#PHP:\ %m\ \(in\ %f\ on\ line\ %l\)%.%#, autocmd BufNewFile,BufRead svn-commit.*tmp :0r $SVN_COMMIT_TEMPLATE - set nocompatible - set tags=tags;/ set incsearch " incrimental search @@ -109,51 +103,72 @@ set hlsearch " highlighting when searching filetype indent plugin off set autoindent - set backspace=2 -set nolist " show/hide tabs and EOL chars -set nonumber " show/hide line numbers (nu/nonu) -set scrolloff=5 " scroll offsett, min lines above/below cursor +set nolist " show/hide tabs and EOL chars (hidden characters) +set number " show/hide line numbers (nu/nonu) +set scrolloff=5 " scroll offset, min lines above/below cursor "set scrolljump=5 " jump 5 lines when running out of the screen - NO -set sidescroll=10 " minumum columns to scroll horizontally +set sidescroll=10 " minimum columns to scroll horizontally set showcmd " show command status -set showmatch " flashes matching paren when one is typed +set showmatch " flashes matching parenthese when cursor over the other one set showmode " show editing mode in status (-- INSERT --) set ruler " show cursor position set nofen set foldmethod=indent " indent based folding -set errorbells " no bells in terminal +set errorbells " bells in terminal set undolevels=1000 " number of undos stored set viminfo='50,"50 " '=marks for x files, "=registers for x files - -au BufNewFile,BufRead *.py,*.pyw,*.c,*.h,*.pyx,%akefil* +au FileType c setl ofu=ccomplete#CompleteCpp +au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil* \ setlocal tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent \ textwidth=79 fileformat=unix +au BufNewFile,BufRead *.c,*.h,*.cpp + \ setlocal tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent + \ textwidth=79 fileformat=unix set encoding=utf-8 " important for powerline besides others - +set scs " override 'ignorecase' when pattern has upper case characters :vmap gb :!git blame % -L=line("'<") ,=line("'>") :nmap gb :!git blame % +:colo pablo " new fav highlighting +:set mouse=a " enable mouse in n,v,i,c,h modes + +":set cursorline " Enable cursor line position tracking +":highlight clear CursorLine " Remove the underline from enabling cursorline +":highlight CursorLineNR ctermbg=darkgrey " Set line numbering to red background + +" gvim bits +if (&t_Co > 2 || has("gui_running")) +"if has("gui_running") + if has("gui_gtk2") + :set guifont=Source\ Code\ Pro\ 11 + :syntax on + :set background=dark + :colo evening + elseif has("gui_gtk3") + :set guifont=Source\ Code\ Pro\ 11 + :set background=dark + :syntax on + :colo evening + endif -if &t_Co > 2 || has("gui_running") - :syntax on " Change the highlight color for Comment and Special " to Cyan. Blue is too dark for a black background. " - :highlight Comment term=bold ctermfg=cyan guifg=cyan - :highlight Special term=bold ctermfg=cyan guifg=cyan - :highlight Constant term=bold ctermfg=red guifg=cyan + ":highlight Comment term=bold ctermfg=cyan guifg=cyan + ":highlight Special term=bold ctermfg=cyan guifg=cyan + ":highlight Constant term=bold ctermfg=red guifg=cyan endif -:colo delek " new fav highlighting + :set laststatus=2 " show powerline status bar set t_Co=256 let g:Powerline_symbols = "fancy" " sth like this probably set as a default but won't hurt here