diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2017-01-30 17:36:35 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2017-01-30 17:36:35 +0100 |
commit | 35fe620090133503b322f01beff7cfdcefe9422a (patch) | |
tree | bc19bee0e368688a029e5bdb107dfccb0cc5cb1b | |
parent | 5e40e2dfc8794ed4989255dc43591eb3699a6ab9 (diff) | |
download | vim-35fe620090133503b322f01beff7cfdcefe9422a.zip vim-35fe620090133503b322f01beff7cfdcefe9422a.tar.gz |
clean up vimrc, disable unused plugins
-rw-r--r-- | vimrc | 192 |
1 files changed, 78 insertions, 114 deletions
@@ -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'<q> +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 + +" <C-r> jump to definition, <C-t> to jump back to the call +set tags+=./.tags;/ +nmap <C-r> g<C-]> +" auto completion +inoremap <C-d> <C-X><C-]> + + +" 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("<F5>") -" map <F12> :let &background = ( &background == "dark" ? "light" : "dark" )<CR> - -" 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 <silent> <F6> :TlistToggle<CR> -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 <leader>l :set list!<CR> +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\+\%#\@<!$\|\%81v.*/ + -" CtrlP +" CtrlP ---------------------------------------------------------------------- nmap <leader>e :CtrlP<cr> nmap <leader>ep :CtrlPBuffer<cr> nmap <leader>em :CtrlPMixed<cr> -call ctrlp_bdelete#init() -" nerdtree -map <C-n> :NERDTreeToggle<CR> -" buffers : hidden -> can leave modified buffers hidden -set hidden -nmap <leader>l :ls<CR> -nmap <leader>N :enew<cr> -nmap <leader>n :bnext<CR> -nmap <leader>p :bprevious<CR> -" close and goto next -nmap <leader>bq :bp <BAR> bd #<CR> - -" <C-r> jump to definition, <C-t> to jump back to the call -nmap <C-r> g<C-]> +" localvimrc ----------------------------------------------------------------- +let g:localvimrc_ask=0 +let g:localvimrc_sandbox=0 -" code completion -inoremap <C-d> <C-X><C-]> -" \t : toggle view invisible -nmap <leader>l :set list!<CR> +" tagbar / taglist ----------------------------------------------------------- +nmap <F2> :TagbarToggle<CR> +" nnoremap <silent> <F2> :TlistToggle<CR> +" 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 \\ <Plug>Commentary -map <C-c> \\\ +" nerdtree ------------------------------------------------------------------- +nmap <F3> :NERDTreeToggle<CR> " 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\+\%#\@<!$\|\%81v.*/ - highlight ExtraOver ctermbg=red ctermfg=white guibg=#59292 - " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on gvim). |