dotfiles

andersuno dotfiles
git clone git://git.andersuno.nu/dotfiles.git
Log | Files | Refs | README

.vimrc (2807B)


      1 set nocompatible
      2 filetype off
      3 set rtp+=~/.vim/bundle/Vundle.vim
      4 call vundle#begin()
      5 Plugin 'gmarik/Vundle.vim'
      6 Plugin 'vim-scripts/indentpython.vim'
      7 Plugin 'vim-syntastic/syntastic'
      8 Plugin 'Valloric/YouCompleteMe'
      9 Plugin 'nvie/vim-flake8'
     10 Plugin 'vim-airline/vim-airline'
     11 Plugin 'vim-airline/vim-airline-themes'
     12 Plugin 'tpope/vim-fugitive'
     13 Plugin 'airblade/vim-gitgutter'
     14 "Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
     15 "plugins here-----
     16 call vundle#end()
     17 filetype plugin indent on
     18 
     19 let python_highlight_all=1
     20 
     21 "Ycm
     22 let g:ycm_add_preview_to_completeopt = 0
     23 let g:ycm_autoclose_preview_window_after_completion = 1
     24 let g:ycm_autoclose_preview_window_after_insertion = 1
     25 let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py"
     26 
     27 
     28 " Airline
     29 let g:airline_powerline_fonts = 1
     30 
     31 if !exists('g:airline_symbols')
     32 	let g:airline_symbols = {}
     33 endif
     34 
     35 " unicode symbols
     36 	let g:airline_left_sep = '»'
     37 	let g:airline_left_sep = '▶'
     38 	let g:airline_right_sep = '«'
     39 	let g:airline_right_sep = '◀'
     40 	let g:airline_symbols.linenr = '␊'
     41 	let g:airline_symbols.linenr = '␤'
     42 	let g:airline_symbols.linenr = '¶'
     43 	let g:airline_symbols.branch = '⎇'
     44 	let g:airline_symbols.paste = 'ρ'
     45 	let g:airline_symbols.paste = 'Þ'
     46 	let g:airline_symbols.paste = '∥'
     47 	let g:airline_symbols.notexists = 'Ɇ'
     48 	let g:airline_symbols.whitespace = 'Ξ'
     49 
     50 " airline symbols
     51 	let g:airline_left_sep = ''
     52 	let g:airline_left_alt_sep = ''
     53 	let g:airline_right_sep = ''
     54 	let g:airline_right_alt_sep = ''
     55 	let g:airline_symbols.branch = ''
     56 	let g:airline_symbols.readonly = '🔒🔒🔒🔒🔒'
     57 	let g:airline_symbols.linenr = ''
     58 
     59 " Powerline
     60 let g:Powerline_symbols = 'fancy'
     61 set laststatus=2
     62 
     63 syntax on
     64 set number
     65 set relativenumber
     66 set mouse=
     67 set ttymouse=
     68 set hlsearch
     69 set smartcase
     70 set scrolloff=2
     71 set wildmenu
     72 "set cursorline
     73 "set ruler
     74 :command Q q
     75 :command W w
     76 :command WQ wq
     77 inoremap "" ""<Left>
     78 inoremap '' ''<Left>
     79 inoremap () ()<Left>
     80 inoremap [] []<Left>
     81 inoremap {} {}<Left>
     82 inoremap <> <><Left>
     83 
     84 " Enable folding
     85 set foldmethod=indent
     86 set foldlevel=99
     87 
     88 " Enable folding with the spacebar
     89 nnoremap <space> za
     90 
     91 " Python PEP 8
     92 "au BufNewFile,BufRead *.py
     93 au Filetype python
     94     \setlocal tabstop=4
     95     \setlocal softtabstop=4
     96     \setlocal shiftwidth=4
     97     \setlocal textwidth=79
     98     \setlocal expandtab
     99     \setlocal autoindent
    100     \setlocal fileformat=unix
    101 
    102 " Other filespecific settings
    103 au BufNewFile,BufRead *.js, *.html, *.css
    104     \set tabstop=2
    105     \set softtabstop=2
    106     \set shiftwidth=2
    107 
    108 " Mark bad whitespace
    109 highlight ExtraWhitespace ctermbg=red guibg=red
    110 " Trailing whitespace
    111 au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match ExtraWhitespace /\s\+$/
    112 " Show tabs that are not at the start of a line:
    113 match ExtraWhitespace /[^\t]\zs\t\+/
    114 
    115