Skip to content

Instantly share code, notes, and snippets.

@mgan59
Last active December 18, 2015 05:38
Show Gist options
  • Save mgan59/5733599 to your computer and use it in GitHub Desktop.
Save mgan59/5733599 to your computer and use it in GitHub Desktop.
morgans vimrc
" enable pathogeon plugin
call pathogen#infect()
" begin the great vim setup
set t_Co=256
set term=screen-256color
set autoindent
set ruler
set smarttab
set number
syntax on
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set hidden
filetype indent on
set background=dark
colorscheme lucius
LuciusBlackLowContrast
" gVim check, disables toolbar and sets different theme
if has('gui_running')
set guioptions-=T " no toolbar
colorscheme lucius
LuciusBlackLowContrast
endif
" Add shortcuts for moving up and down 10 lines at a time with capital J and capital K
nore J 10j
nore K 10k
" Since we re-mapped capital J, map Ctrl+J to the default J which is the join line operation
nore <C-J> J
" in ctrlp, set working directory to closest to .git
let g:ctrlp_working_path_mode=2
" Quick-add debug statements by pressing ctrl+i
nnoremap <c-i> :call InsertDebugTrace()<CR>
function! InsertDebugTrace()
if (&ft == 'python')
normal! Oimport ipdb; ipdb.set_trace()
elseif (&ft == 'javascript')
normal! Odebugger;
endif
:w
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment