Skip to content

Instantly share code, notes, and snippets.

@erbmicha
Last active October 5, 2015 10:47
Show Gist options
  • Save erbmicha/2795911 to your computer and use it in GitHub Desktop.
Save erbmicha/2795911 to your computer and use it in GitHub Desktop.
My .vimrc.after file for Janus
" bind control-l to hashrocket
imap <C-l> <Space>=><Space>
" convert word into Ruby symbol
imap <C-k> <C-o>b:<Esc>Ea
nmap <C-k> lbi:<Esc>E
" folding settings
set foldmethod=indent "fold based on indent
set foldnestmax=10 "deepest fold is 10 levels
set nofoldenable "dont fold by default
set foldlevel=1
" turn off whitespace indicators (too annoying)
set nolist
" set the Tags list toggle to the F5 key
nnoremap <silent> <F5> :TlistToggle<CR>
" Increase window size to 45 columns
let NERDTreeWinSize=45
" map <F6> to toggle NERDTree window
nmap <silent> <F6> :NERDTreeToggle<CR>
" set the Command-P settings I like
let g:ctrlp_dotfiles = 0
let g:ctrlp_regexp_search = 1
let g:ctrlp_by_filename = 1
let g:ctrlp_match_window_reversed = 0
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$|\tmp$\|\log$\|\doc$\|\.DS_Store\',
\ 'file': '\.pyc$\|\.pyo$\|\.rbc$|\.rbo$\|\.class$\|\.o$\|\~$\',
\ }
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']
" map Command-F to git-grep
"map <D-F> :silent Ggrep!<space>
"autocmd QuickFixCmdPost *grep* botright copen
" map <Leader>rct to reload the ctags cache
map <Leader>rct :!ctags --extra=+f -R *<CR><CR>
" set the color scheme
color Tomorrow-Night
" Change the trigger for SnipMate
ino <c-space> <c-r>=snipMate#TriggerSnippet()<cr>
snor <c-space> <esc>i<right><c-r>=snipMate#TriggerSnippet()<cr>
" map Leader+h to format the hashtags of the visual highlighted area
map <Leader>h :Tabularize /=><CR>
map <Leader>= :Tabularize /=<CR>
map <Leader> :Tabularize / :<CR>
" automatically reload the configuration upon change
augroup myvimrc
au!
au BufWritePost .vimrc.after,.gvimrc.after so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
augroup END
" ruby debugger
let g:ruby_debugger_progname = 'mvim'
" vroom plugin settings
let g:vroom_use_colors = 1
" set the statusline
set statusline=%t "tail of the filename
set statusline=%< "truncate after filename
set statusline+=\ %m "modified flag
set statusline+=%r "read only flag
set statusline+=%h "help file flag
set statusline+=%w "unknown flag
set statusline+=\ b\: "buffer label
set statusline+=%\n "buffer number
set statusline+=%= "left/right separator
set statusline+=[ "open bracket
set statusline+=%{Rbenv()} "get the rbenv version
set statusline+=] "close bracket
set statusline+=\ [ "open bracket
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %p%% "percent through file
set statusline+=] "close bracket
function! Rbenv()
return system("rbenv version | awk '{printf $1}'")
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment