From 35fe620090133503b322f01beff7cfdcefe9422a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 30 Jan 2017 17:36:35 +0100 Subject: clean up vimrc, disable unused plugins --- vimrc | 192 +++++++++++++++++++++++++++--------------------------------------- 1 file changed, 78 insertions(+), 114 deletions(-) diff --git a/vimrc b/vimrc index 32e34d1..24f03c0 100644 --- a/vimrc +++ b/vimrc @@ -1,165 +1,129 @@ " vimrc - " vundle set nocompatible " be iMproved, required filetype off " required -set mouse-=a " disable automatic visual mode using mouse - set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() +" :PluginInstall :PluginUpdate Plugin 'VundleVim/Vundle.vim' -" Bundle 'gmarik/vundle' -Plugin 'abudden/taghighlight-automirror' Plugin 'altercation/vim-colors-solarized' -Plugin 'embear/vim-localvimrc' -Plugin 'jwhitley/vim-matchit' +Plugin 'bling/vim-airline' " Status/Tab line +Plugin 'vim-airline/vim-airline-themes' " Status/Tab line Themes +Plugin 'ctrlpvim/ctrlp.vim' +Plugin 'embear/vim-localvimrc' " .lvimrc +Plugin 'tpope/vim-commentary' " gc[N][motion] +Plugin 'tpope/vim-surround' " cs' +Plugin 'tpope/vim-fugitive' " Gstatus Gdiff Gwrite (Git add %) +Plugin 'tpope/vim-repeat' " allows '.' to work with plugins Plugin 'majutsushi/tagbar' -Plugin 'msanders/snipmate.vim' -" Plugin 'Rip-Rip/clang_complete' +" Plugin 'vim-scripts/taglist.vim' Plugin 'scrooloose/nerdtree' -Plugin 'scrooloose/syntastic' -Plugin 'tpope/vim-commentary' -Plugin 'tpope/vim-git' -Plugin 'tpope/vim-fugitive' -Plugin 'tpope/vim-haml' -Plugin 'tpope/vim-markdown' -Plugin 'tpope/vim-repeat' -Plugin 'tpope/vim-surround' -Plugin 'vim-scripts/javacomplete' -Plugin 'vim-scripts/taglist.vim' -Plugin 'bling/vim-airline' -Plugin 'vim-airline/vim-airline-themes' -Plugin 'ctrlpvim/ctrlp.vim' -Plugin 'd11wtq/ctrlp_bdelete.vim' +" Plugin 'abudden/taghighlight-automirror' +" Plugin 'jwhitley/vim-matchit' +" Plugin 'msanders/snipmate.vim' +" Plugin 'Rip-Rip/clang_complete' +" Plugin 'scrooloose/syntastic' +" Plugin 'tpope/vim-git' +" Plugin 'tpope/vim-haml' +" Plugin 'tpope/vim-markdown' +" Plugin 'vim-scripts/javacomplete' call vundle#end() " required filetype plugin indent on " required -" color scheme -" set t_Co=256 -" if &t_Co >= 256 || has("gui_running") + +" Regular options ------------------------------------------------------------ +"set spell " spell checking +set mouse-=a " disable automatic visual mode using mouse +set nofsync " async I/O +set ff=unix " file format \n +set backup " keep a backup file +set autoindent " use autoindent" +set nocompatible " do not try to act like vi +set cursorline " show cursor line +set cursorcolumn " show curser column +set scrolloff=5 " number of context lines above and below the cursor +set laststatus=2 " alway add status line +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time +set showcmd " display incomplete commands +set incsearch " do incremental searching +set number " show line number +set showmode " show current mode +set colorcolumn=80 " add vertical bar +set foldmethod=marker " define folding method + +set tabstop=4 shiftwidth=4 softtabstop=4 expandtab +set backspace=indent,eol,start " allow backspacing over everything in insert mode + +" jump to definition, to jump back to the call +set tags+=./.tags;/ +nmap g +" auto completion +inoremap + + +" Theme ---------------------------------------------------------------------- syntax on set hlsearch set background=dark if !empty($DISPLAY) let g:solarized_termtrans=1 - colorscheme solarized - set listchars=tab:▸\ ,eol:¬ -else - colorscheme solarized endif - -call togglebg#map("") -" map :let &background = ( &background == "dark" ? "light" : "dark" ) - -" colorize extra whitespaces -highlight ExtraWhitespace ctermbg=red guibg=red -match ExtraWhitespace /\t\|\s\+$/ - -if has("vms") - set nobackupss " do not keep a backup file, use versions instead -else - set backup " keep a backup file -endif -"set spell -set autoindent " use autoindent" -set nocompatible " do not try to act like vi -set scrolloff=5 " number of context lines above and below the cursor -set laststatus=2 " alway add status line -set history=50 " keep 50 lines of command line history -set ruler " show the cursor position all the time -set showcmd " display incomplete commands -set incsearch " do incremental searching -set number " show line number -set showmode " show current mode -set colorcolumn=80 " add vertical bar - -" files -set ff=unix -set nofsync -filetype off " required by vundle - -" set list -" set cursorline -" set cursorcolumn -set foldmethod=marker -set tabstop=4 shiftwidth=4 softtabstop=4 expandtab -set backspace=indent,eol,start " allow backspacing over everything in insert mode - -" vim-airline +colorscheme solarized let g:airline_theme='dark' let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#fnamemod = ':t' +let g:airline#extensions#tabline#buffer_idx_mode = 1 -" localvimrc -let g:localvimrc_ask=0 -let g:localvimrc_sandbox=0 -" ctags -nnoremap :TlistToggle -set tags+=./.tags;/ -let Tlist_Ctags_Cmd = "/usr/bin/ctags" -let Tlist_WinWidth = 50 -let Tlist_Exit_OnlyWindow = 1 " exit if taglist is last window open -let Tlist_Show_One_File = 1 " Only show tags for current buffer -let Tlist_Enable_Fold_Column = 0 " no fold column (only showing one file) +" NonText, SpecialKey, ExtraWhitespace, ExtraOver ---------------------------- +nmap l :set list! +set list listchars=tab:▸\ ,trail:·,precedes:←,extends:→,eol:↲,nbsp:␣ +hi NonText ctermfg=16 guifg=#4a4a59 +"hi SpecialKey ctermfg=16 guifg=#4a4a59 +"highlight ExtraWhitespace ctermbg=red guibg=red +"match ExtraWhitespace /\t\|\s\+$/ +highlight ExtraOver ctermbg=red ctermfg=white guibg=#59292 +match ExtraOver /\s\+\%#\@e :CtrlP nmap ep :CtrlPBuffer nmap em :CtrlPMixed -call ctrlp_bdelete#init() -" nerdtree -map :NERDTreeToggle -" buffers : hidden -> can leave modified buffers hidden -set hidden -nmap l :ls -nmap N :enew -nmap n :bnext -nmap p :bprevious -" close and goto next -nmap bq :bp bd # - -" jump to definition, to jump back to the call -nmap g +" localvimrc ----------------------------------------------------------------- +let g:localvimrc_ask=0 +let g:localvimrc_sandbox=0 -" code completion -inoremap -" \t : toggle view invisible -nmap l :set list! +" tagbar / taglist ----------------------------------------------------------- +nmap :TagbarToggle +" nnoremap :TlistToggle +" let Tlist_Ctags_Cmd = "/usr/bin/ctags" +" let Tlist_WinWidth = 50 +" let Tlist_Exit_OnlyWindow = 1 " exit if taglist is last window open +" let Tlist_Show_One_File = 1 " Only show tags for current buffer +" let Tlist_Enable_Fold_Column = 0 " no fold column (only showing one file) -" remap vim-commentary : nmap \\ Commentary -map \\\ +" nerdtree ------------------------------------------------------------------- +nmap :NERDTreeToggle " replace current selection with content of "" buffer vmap p "_dP -" Don't use Ex mode, use Q for formatting -map Q gq - " Only do this part when compiled with support for autocommands. if has("autocmd") - " Enable file type detection. - " Use the default filetype settings, so that mail gets 'tw' set to 72, - " 'cindent' is on in C files, etc. - " Also load indent files, to automatically do language-dependent indenting. - filetype plugin indent on - " For all text files set 'textwidth' to 78 characters. autocmd FileType text setlocal textwidth=78 - " Set color over 80 chars - autocmd BufRead *.c,*.cpp,*.h match ExtraOver /\s\+\%#\@