Created
April 20, 2017 14:51
-
-
Save badstreff/9061dddecda885bde737c9368d258d0c to your computer and use it in GitHub Desktop.
This file contains 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
let win_shell = (has('win32') || has('win64')) && &shellcmdflag =~ '/' | |
" if not on windows enable python2 and python3 support | |
if !win_shell | |
set pythonhome=$HOME/.pyenv/versions/2.7.11 | |
set pythondll=$HOME/.pyenv/versions/2.7.11/lib/libpython2.7.dylib | |
set pythonthreehome=$HOME/.pyenv/versions/3.6.0 | |
set pythonthreedll=$HOME/.pyenv/versions/3.6.0/lib/libpython3.6m.dylib | |
let g:python2_host_prog = '/usr/local/bin/python' | |
let g:python3_host_prog = '/usr/local/bin/python3' | |
endif | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
let vimDir = win_shell ? '$HOME/vimfiles' : '$HOME/.vim' | |
let &runtimepath .= ',' . expand(vimDir . '/bundle/Vundle.vim') | |
call vundle#rc(expand(vimDir . '/bundle')) | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'scrooloose/nerdcommenter' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'tpope/vim-surround' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'klen/python-mode' | |
Plugin 'mattn/webapi-vim' | |
Plugin 'mattn/gist-vim' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on | |
" map leader to comma | |
let mapleader="," | |
" show line number on cursor | |
set number | |
" Configure colorscheme | |
set termguicolors | |
colorscheme molokai | |
" Configure python settings | |
let g:pymode_options_colorcolumn = 0 | |
let g:pymode_rope_lookup_project = 0 | |
let g:pymode_rope = 0 | |
let g:pymode_python = 'python3' | |
let python_highlight_all=1 | |
syntax on | |
" configure airline | |
" sping_night theme needs installed along with the Meslo powerline font | |
set laststatus=2 | |
set ttimeoutlen=50 | |
set guifont=Meslo\ LG\ S\ Regular\ for\ Powerline:h12 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
let g:airline_theme = 'molokai' | |
" configure NERDTree | |
autocmd vimenter * NERDTree | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
map <C-n> :NERDTreeToggle<CR> | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
" configure vsplit to be more natural | |
set splitright | |
set splitbelow | |
" split navigations shortcuts | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" fast buffer switching binds from vim-unimpaired | |
map [b :bprevious<CR> | |
map ]b :bnext<CR> | |
" bind <space> for folding/unfolding a line | |
nnoremap <Space> za | |
" highlight current line | |
set cursorline | |
" keep buffers open | |
set hidden | |
" configure backspace to work correctly in insert mode | |
set backspace=indent,eol,start | |
" enable mousewheel scrolling | |
set mouse=a | |
" I HAVE HAD ENOUGH OF THESE F*CKING SWAP FILES | |
set nobackup | |
set nowritebackup | |
set noswapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment