execute pathogen#infect() " Show number-line set number " Check syntax syntax on "set autoindent " Show right margin "set colorcolumn=80 "set textwidth=80 "set wrap " Higlight search set hlsearch " auto-indent filetype indent on " change tabwidth set tabstop=2 set shiftwidth=2 " remplace tab with spaces set expandtab set smarttab " Change vim theme "colorscheme slate "let g:gruvbox_contrast_dark='hard' colorscheme gruvbox set background=dark " vim-airline (plugin) theme let g:airline_theme = 'powerlineish' " powerline fonts (need to install powerline-fonts from repo) to show arrow let g:airline_powerline_fonts = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#branch#enabled = 1 " Show statusbar "set laststatus=2 " statusbar format "set statusline=%f " file name "set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding "set statusline+=%{&ff}] "file format "set statusline+=%y "filetype "set statusline+=%h "help file flag "set statusline+=%m "modified flag "set statusline+=%r "read only flag " statusbar color hi StatusLine ctermbg=White ctermfg=Black map :set paste \| insert map :set nopaste \| :set ruler map :tabe map :qall! map :g/^ *$/d map :noh set hl=l:Folded "map "map function InsertTabWrapper() let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\" else return "\" endif endfunction inoremap =InsertTabWrapper() iab exc except Exception, ss: iab bash #!/usr/bin/env bash noremap :set invnumber inoremap :set invnumber :set numberwidth=2 imap jli "imap kli imap hli imap la set pastetoggle= "Custom commands: " auto insert pdb (python debugger) when insert :Pdb :command Pdb :normal i import pdb; pdb.set_trace() map :Pdb map :tabnext map :tabprevious vmap S if has("autocmd") au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif endif au BufReadPost *.nginx set syntax=nginx autocmd BufEnter *.py set ai sw=2 ts=2 sta et fo=croql " Tell vim to remember certain things when we exit " " '10 : marks will be remembered for up to 10 previously edited files " " "100 : will save up to 100 lines for each register " " :20 : up to 20 lines of command-line history will be remembered " " % : saves and restores the buffer list " " n... : where to save the viminfo files set viminfo='10,\"100,:20,%,n~/.viminfo set backspace=indent,eol,start vnoremap // y/"