Skip to content

Instantly share code, notes, and snippets.

@tastycode
Last active December 14, 2015 09:39
Show Gist options
  • Save tastycode/5066417 to your computer and use it in GitHub Desktop.
Save tastycode/5066417 to your computer and use it in GitHub Desktop.
~/.vimrc.after for use with janus
if has("gui_running")
set guioptions=egmrt
endif
" so we don't have to use that extra key when we use commands
map ; :
" molokai colorscheme
colo molokai
" for ctrl+p, ignore certain directories from the fuzzy search indexing
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/system/*,*/.sass-cache/*
" really strong mouse support
if has('mouse')
set mouse=a
if &term =~ "xterm" || &term =~ "screen"
" for some reason, doing this directly with 'set ttymouse=xterm2'
" doesn't work -- 'set ttymouse?' returns xterm2 but the mouse
" makes tmux enter copy mode instead of selecting or scrolling
" inside Vim -- but luckily, setting it up from within autocmds
" works
autocmd VimEnter * set ttymouse=xterm2
autocmd FocusGained * set ttymouse=xterm2
autocmd BufEnter * set ttymouse=xterm2
endif
endif
set autoindent
" save the current view state when you leave the file
au BufWinLeave * mkview
au BufWinEnter * silent loadview
" C-y in visual mode will copy to system clipboard
vmap <C-y> y:call system("pbcopy", getreg("\""))<CR>
" Open potential function definitions in Ggrep
map <Leader>g :Ggrep "def.*<C-r><C-w>"<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment