dotfiles/.vimrc

80 lines
2 KiB
VimL
Raw Normal View History

2014-01-21 20:50:04 +01:00
" Pathogen must be loaded first
2014-01-21 21:39:04 +01:00
execute pathogen#infect()
2014-01-21 20:50:04 +01:00
2012-03-02 10:31:58 +01:00
syntax on
filetype on
2014-01-21 15:03:21 +01:00
filetype indent plugin on
set modeline
" use flake8 to ensure PEP-8 compliance for python
2014-01-21 21:56:20 +01:00
source ~/.vim/bundle/flake8/ftplugin/python_flake8.vim
2014-01-21 15:03:21 +01:00
let g:flake8_builtins="_,apply"
autocmd FileType python map <buffer> <F3> :call Flake8()<CR>
2017-07-24 13:36:00 +02:00
set background=light
2012-03-02 10:31:58 +01:00
set showcmd
2014-01-21 15:03:21 +01:00
" highlight searches
2012-03-02 10:31:58 +01:00
set hlsearch
2014-01-21 15:03:21 +01:00
" case insensitive searches
set incsearch
" Relative line numbers except the current line
" Both relativenumber with number works on vim 7.4+
2014-04-14 12:29:54 +02:00
"set relativenumber
set number
2014-01-21 15:03:21 +01:00
let g:solarized_termcolors=256
2014-01-21 15:03:21 +01:00
colorscheme solarized
" Highlight 80 column
set colorcolumn=80
2017-07-24 13:36:00 +02:00
highlight ColorColumn ctermbg=223
2012-03-02 10:31:58 +01:00
" Jump to last position in file when reopening
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" Switch between light/dark backgrounds
" F12 toggles between light and dark backgrounds
map <silent> <F12> :if &background == "light"<CR>
\set background=dark<CR>
\else<CR>
\set background=light<CR>
\endif<CR>
2012-03-02 10:31:58 +01:00
set t_Co=256
" always show vim-airline
set laststatus=2
2014-04-21 12:32:50 +02:00
2017-07-24 13:36:00 +02:00
let g:airline#extensions#branch#format = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = '␤'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = '☰'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
2014-04-21 12:32:50 +02:00
" Fix intendation
map <F5> mzgg=G`z<CR>
2017-07-24 13:36:00 +02:00
" editorconfig should not tamper with fugitive
let g:EditorConfig_exclude_patterns = ['fugitive://.*']