Skip to content

Instantly share code, notes, and snippets.

@ryancharris
Created May 11, 2018 22:15
Show Gist options
  • Save ryancharris/bb8db07332d28d3446194ca9f3484b63 to your computer and use it in GitHub Desktop.
Save ryancharris/bb8db07332d28d3446194ca9f3484b63 to your computer and use it in GitHub Desktop.
Vim Config
" Plugins
" -------
" nerdtree
" vim-airline
" vim-multiple-cursors
" vim-sensible
" Start Pathogen
" --------------
execute pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" Auto open nerdtree w/ directories
" ---------------------------------
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' arg$
" Autoquit nerdtree
" -----------------
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Keymappings
" -----------
map <C-n> :NERDTreeToggle<CR>
" Vim Settings
" -----------
:set tabstop=2
:set shiftwidth=2
:set autoindent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment