set nocompatible "Needed by Vundle filetype off "Needed by Vundle set rtp+=~/.vim/bundle/Vundle.vim "Add Vundle to runtime path call vundle#begin() Plugin 'VundleVim/Vundle.vim' "Vundle Plugin 'vim-airline/vim-airline' "Cool statusline Plugin 'vim-airline/vim-airline-themes' "Airline themes " Plugin 'Shougo/neocomplete.vim' "Tab-complete code " Plugin 'Shougo/neosnippet.vim' "Snippet support " Plugin 'Shougo/neosnippet-snippets' "Snippet list Plugin 'Shougo/context_filetype.vim' "Allow neosnippet to switch filetype on context Plugin 'kien/ctrlp.vim' "Fuzzy file/buffer finding/switching Plugin 'ludovicchabant/vim-gutentags' "ctag management Plugin 'scrooloose/syntastic' "Syntax checker Plugin 'tpope/vim-fugitive' "Useful git commands Plugin 'notpratheek/vim-luna' "Nice theme call vundle#end() "Hide startup message set shortmess+=I "Store backups together set directory=~/.vim/backups// "Keep undo history between sessions set undofile set undodir=~/.vim/undo/ "Incremental search set incsearch "Autoindent with tab being 4 spaces "set autoindent "set tabstop=4 "set expandtab "[airline] Always show numbered listed of buffers let g:airline#extensions#tabline#enabled=1 let g:airline#extensions#tabline#buffer_nr_show=1 "[airline] Show bottom line always, hide vim mode set laststatus=2 set noshowmode "[airline] Remove pause after leaving insert mode set timeoutlen=50 "Background buffers (no force saving when switching) set hidden "[ctrlp] Don't split when opening a new file let g:ctrlp_open_new_file = 'r' "[gutentags] Don't pollute project dirs let g:gutentags_cache_dir = '~/.vim/tags/' "[neocomplete] Use tab to select a completion, Ctrl+K to expand a snippet, "Ctrl+H to close Neocomplete " let g:neocomplete#enable_at_startup = 1 " imap (neosnippet_expand_or_jump) " smap (neosnippet_expand_or_jump) " xmap (neosnippet_expand_target) " imap " \ pumvisible() ? "\" : " \ neosnippet#expandable_or_jumpable() ? " \ "\(neosnippet_expand_or_jump)" : "\" " inoremap pumvisible() ? "\" : "\" "Theming syntax enable colorscheme luna-term let g:airline_theme='luna' let g:airline_powerline_fonts=1 "Requires powerline fonts! set cursorline "Save as sudo with w!! (when lacking root) cmap w!! w !sudo tee % >/dev/null "Force use of 256 colours set t_Co=256 set term=xterm-256color "Display line at 80th character on a line set colorcolumn=80 "Buttons for going to previous/next file (buffer) map :bprevious map :bnext "Show a list of files (buffers) that are open map :buffers "Yank (copy) contents of current file (buffer) - also to X11 clipboard map :%y+ "Show name of file and path relative to current working directory map :echo @% "Show current working directory map :pwd "Close current buffer map :bd! nnoremap nnoremap nnoremap nnoremap nnoremap nnoremap nnoremap nnoremap " set ts=4 sw=4