Created
October 31, 2017 16:09
-
-
Save arnlaugsson/b4a7abd5fb5b7bdac35328cc7a98338b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " Vundle | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'tpope/vim-fugitive' " Git (Gstatus and more) | |
| Plugin 'git://git.wincent.com/command-t.git' " Auto complete | |
| Plugin 'scrooloose/nerdtree' " NERDTree | |
| Plugin 'vim-airline/vim-airline' " Powerline | |
| Plugin 'vim-airline/vim-airline-themes' " --||-- | |
| Plugin 'elzr/vim-json' " JSON syntax | |
| Plugin 'Lokaltog/vim-distinguished' " Colorscheme | |
| Plugin 'godlygeek/tabular' " For markdown syntax | |
| Plugin 'plasticboy/vim-markdown' " For markdown syntax | |
| Plugin 'nvie/vim-flake8' " Flake8 (F7) checker for py files | |
| Plugin 'editorconfig/editorconfig-vim' " Editor config niceties | |
| Plugin 'fisadev/vim-isort' " Sort python imports (:Isort/ ctrl+i) | |
| Plugin 'tfnico/vim-gradle' " Gradle syntax highlighter | |
| Plugin 'vim-syntastic/syntastic' " Syntastic syntax checker | |
| Plugin 'MarcWeber/vim-addon-mw-utils' " Snippets | |
| Plugin 'tomtom/tlib_vim' " -- | |
| Plugin 'garbas/vim-snipmate' " -- | |
| " Plugin 'jelera/vim-javascript-syntax' " Javascript Syntax for Vim | |
| " Plugin 'mxw/vim-jsx' " JSX syntax | |
| " No Vundle plugins below here | |
| call vundle#end() " required | |
| filetype plugin indent on " required | |
| " Put your non-Plugin stuff after this line | |
| set expandtab " spaces instead of tabs | |
| set tabstop=4 " a tab = four spaces | |
| set shiftwidth=4 " number of spaces for auto-indent | |
| set softtabstop=4 " a soft-tab of four spaces | |
| set autoindent " set on the auto-indent | |
| set laststatus=2 | |
| set encoding=utf-8 | |
| set t_Co=256 | |
| set pastetoggle=<f6> | |
| set ruler " Show line and column number | |
| set showcmd " Show (partial) command in status line | |
| " Spell checker | |
| :map <F5> :setlocal spell! spelllang=en_us<CR> | |
| " Powerline / airline settings | |
| set noshowmode | |
| let g:airline_theme='powerlineish' | |
| let g:airline_powerline_fonts=1 | |
| let g:airline#extensions#branch#enabled = 1 | |
| let g:airline#extensions#whitespace#enabled = 1 | |
| let g:airline#extensions#hunks#non_zero_only = 1 | |
| syntax on | |
| syntax enable | |
| colorscheme distinguished | |
| set history=1000 | |
| set undofile | |
| set undoreload=1000000 | |
| " Stop using arrow keys! | |
| nnoremap <up> <nop> | |
| nnoremap <down> <nop> | |
| nnoremap <left> <nop> | |
| nnoremap <right> <nop> | |
| inoremap <up> <nop> | |
| inoremap <down> <nop> | |
| inoremap <left> <nop> | |
| inoremap <right> <nop> | |
| " Config folding | |
| set foldmethod=syntax | |
| nnoremap \ za | |
| vnoremap \ za | |
| set foldmethod=indent | |
| set foldlevel=99 | |
| " Shortcuts | |
| :let mapleader = " " | |
| map <Leader>v :vsplit<CR> | |
| map <Leader>h :split<CR> | |
| map <Leader>e :Explore<CR> | |
| imap jk <Esc> | |
| imap jj <Esc> | |
| noremap ss :w<CR> | |
| noremap qq :q<CR> | |
| " Python dev | |
| let NERDTreeIgnore = ['\.pyc$'] | |
| let g:netrw_list_hide= '.*\.swp$,.*\.pyc,.*\.un\~' | |
| nnoremap <leader>p oimport pdb; pdb.set_trace()<Esc> | |
| " Custom goodies | |
| com! FormatJSON %!python -m json.tool | |
| " Javascript goodies | |
| " let g:jsx_ext_required = 0 " Allow JSX in normal JS files | |
| " Syntastic settings | |
| set statusline+=%#warningmsg# | |
| set statusline+=%{SyntasticStatuslineFlag()} | |
| set statusline+=%* | |
| let g:syntastic_always_populate_loc_list = 1 | |
| let g:syntastic_auto_loc_list = 1 | |
| let g:syntastic_check_on_open = 1 | |
| let g:syntastic_check_on_wq = 0 | |
| let g:syntastic_python_checkers=['python', 'flake8', 'pep8'] | |
| "isort | |
| let g:vim_isort_map = '<C-i>' | |
| let g:vim_isort_python_version = 'python2.7' | |
| " Alert on 80 characters or more | |
| highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
| match OverLength /\%81v.\+/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment