" install vundle let iCanHazVundle=1 let vundle_readme=expand('~/.vim/bundle/vundle/README.md') if !filereadable(vundle_readme) echo "Installing Vundle..." echo "" silent !mkdir -p ~/.vim/bundle silent !git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle let iCanHazVundle=0 endif " load vundle filetype off set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Plugin 'gmarik/vundle' " change the mapleader from \ to , let mapleader="," " set theme for airline let g:airline_theme = "jellybeans" " load plugins Plugin 'vim-airline/vim-airline-themes' Plugin 'bling/vim-airline' Plugin 'ervandew/supertab' Plugin 'flazz/vim-colorschemes' Plugin 'godlygeek/tabular' Plugin 'regedarek/ZoomWin' Plugin 'rodjek/vim-puppet' Plugin 'scrooloose/syntastic' Plugin 'tpope/vim-commentary' Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-unimpaired' Plugin 'reedes/vim-textobj-sentence' Plugin 'kana/vim-textobj-user' Plugin 'glts/vim-textobj-comment' Plugin 'ctrlpvim/ctrlp.vim' Plugin 'ntpeters/vim-airline-colornum' Plugin 'python-mode/python-mode' Plugin 'airblade/vim-gitgutter' Plugin 'jamessan/vim-gnupg' Plugin 'tpope/vim-repeat' Plugin 'sjl/gundo.vim' Plugin 'evannook/matchit' Plugin 'jiangmiao/auto-pairs' Plugin 'AndrewRadev/splitjoin.vim' Plugin 'Yggdroot/indentLine' Plugin 'easymotion/vim-easymotion' Plugin 'pearofducks/ansible-vim' Plugin 'stephpy/vim-yaml' Plugin 'tpope/vim-vinegar' Plugin 'hashivim/vim-vagrant' filetype on " automatic reloading of vimrc autocmd! bufwritepost .vimrc source % autocmd! bufwritepost vimrc source % " dark background set bg=dark " change title of terminal set title " define color colorscheme PaperColor " activate systax highlight syntax on " show linenumbers set relativenumber set number " show linechanges with $ set cpoptions=$ " show commands in the lower right corner set showcmd " show searchterms always after search set hlsearch " No highlight after a search nnoremap :noh " insert a blank line with o and O nnoremap o o nnoremap O O " toggle paste-mode nnoremap p :set paste! " show matches while searching set incsearch " activate filetype plugin and indentation filetype plugin indent on " compile latex documents map :w! :!make show " set type to mail for mutt-tmp-files au BufNewFile,BufRead mutt-*-\w\+,mutt\w\{6\},ae\d setf mail au BufNewFile,BufRead neomutt-*-\w\+,mutt\w\{6\},ae\d setf mail " always show status line set laststatus=2 " show matches in menu set wildmenu " show special chars set listchars=tab:>-,trail:_,extends:>,precedes:< set list " no startup message and shorten some messages set shortmess=atI " use de and en for spellchecking set spelllang=de_de,en_us set spellfile=$HOME/.vim/de.add " check spelling in mails autocmd FileType mail set spell " set commandline to two lines height set cmdheight=1 " settings for tabs " tabs are two spaces width set tabstop=2 " number of space chars inserted for indentation set shiftwidth=2 " space instead of tab set expandtab " makes the tab-spaces feel like real tabs set softtabstop=2 " don't replace tabs in Makefiles au FileType make setlocal noexpandtab " special settings for python-files autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 commentstring=#\ %s let python_highlight_all=1 " allow breaks at special chars and indent breaklines set breakat="\ \ !@*-+_;:,./?" set breakindent " deactivate mouse set mouse= " don't cache gpg-passwords with gpg-agent let g:GPGUseAgent=0 " ignorecase on search except searching uppercase letters set ignorecase set smartcase " disable all folds set nofoldenable " disable arrowkeys in all modes noremap noremap noremap noremap inoremap inoremap inoremap inoremap " Quickly get out of insert mode without your fingers having to leave the " home row (either use 'jj' or 'jk') inoremap jj " allow simple search and replace noremap s :s//g noremap S :%s//g " show buffers in headline let g:airline#extensions#tabline#enabled = 1 " new buffer nmap T :enew " Move to the next buffer nmap l :bnext " Move to the previous buffer nmap h :bprevious " Close the current buffer and move to the previous one " This replicates the idea of closing a tab nmap bq :bp bd # " Show all open buffers and their status nmap bl :ls " don't show mode in statusline set noshowmode " allow buffers to be hidden set hidden " switch between the last two files nnoremap " Yank from the cursor to the end of the line, to be consistent with C and D. nnoremap Y y$ " open new splits below and on the right hand side set splitbelow set splitright " add shortcuts for fugitive commands nnoremap gb :Gblame nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gl :Glog nnoremap gc :Gcommit nnoremap gp :Git push " persist (g)undo tree between sessions set undodir=~/.vim/tmp/undo/ set undofile set history=100 set undolevels=100 " toggle scrollbind nnoremap sb :windo set invscrollbind " toggles without fn-keys nnoremap 1 :GundoToggle " map co to =o for old unimpaired syntax nmap co =o