Skip to content

Instantly share code, notes, and snippets.

@regedarek
Last active December 11, 2015 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regedarek/807735fb2dd4bd82656b to your computer and use it in GitHub Desktop.
Save regedarek/807735fb2dd4bd82656b to your computer and use it in GitHub Desktop.
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.015 000.015: --- VIM STARTING ---
000.111 000.096: Allocated generic buffers
000.353 000.242: locale set
000.359 000.006: clipboard setup
000.366 000.007: window checked
007.909 007.543: inits 1
007.919 000.010: parsing arguments
007.920 000.001: expanding arguments
010.714 002.794: shell init
011.105 000.391: Termcap init
011.126 000.021: inits 2
011.269 000.143: init highlight
011.659 000.070 000.070: sourcing /usr/local/share/vim/vim73/ftoff.vim
028.113 015.559 015.559: sourcing /usr/local/share/vim/vim73/filetype.vim
028.237 000.050 000.050: sourcing /usr/local/share/vim/vim73/ftplugin.vim
028.339 000.048 000.048: sourcing /usr/local/share/vim/vim73/indent.vim
028.555 000.131 000.131: sourcing /Users/rege/.vim/bundle/vundle/autoload/vundle.vim
028.796 000.132 000.132: sourcing /Users/rege/.vim/bundle/vundle/autoload/vundle/config.vim
056.619 000.248 000.248: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
056.863 000.682 000.434: sourcing /usr/local/share/vim/vim73/syntax/synload.vim
056.902 000.918 000.236: sourcing /usr/local/share/vim/vim73/syntax/syntax.vim
057.803 000.205 000.205: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
058.394 000.199 000.199: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
058.954 000.205 000.205: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
059.452 002.128 001.519: sourcing /Users/rege/.vim/bundle/vim-irblack/colors/ir_black.vim
059.873 048.427 029.391: sourcing $HOME/.vimrc
059.880 000.184: sourcing vimrc file(s)
060.282 000.232 000.232: sourcing /Users/rege/.vim/bundle/ack.vim/plugin/ack.vim
062.403 001.250 001.250: sourcing /Users/rege/.vim/bundle/nerdtree/autoload/nerdtree.vim
063.943 000.710 000.710: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/path.vim
064.186 000.180 000.180: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_controller.vim
064.352 000.109 000.109: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_item.vim
064.540 000.133 000.133: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/key_map.vim
064.877 000.281 000.281: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/bookmark.vim
065.348 000.413 000.413: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_file_node.vim
065.877 000.471 000.471: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_dir_node.vim
066.162 000.228 000.228: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/opener.vim
066.485 000.268 000.268: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/creator.vim
077.763 000.119 000.119: sourcing /Users/rege/.vim/bundle/nerdtree/nerdtree_plugin/exec_menuitem.vim
078.284 000.485 000.485: sourcing /Users/rege/.vim/bundle/nerdtree/nerdtree_plugin/fs_menu.vim
079.008 018.372 013.725: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/NERD_tree.vim
079.353 000.310 000.310: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/bookmark.vim
079.670 000.284 000.284: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/creator.vim
079.833 000.131 000.131: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/key_map.vim
080.043 000.179 000.179: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_controller.vim
080.183 000.109 000.109: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_item.vim
080.455 000.241 000.241: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/opener.vim
081.124 000.639 000.639: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/path.vim
081.673 000.517 000.517: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_dir_node.vim
082.144 000.436 000.436: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_file_node.vim
082.747 000.279 000.279: sourcing /Users/rege/.vim/bundle/ctrlp.vim/autoload/ctrlp/mrufiles.vim
082.955 000.696 000.417: sourcing /Users/rege/.vim/bundle/ctrlp.vim/plugin/ctrlp.vim
196.810 113.101 113.101: sourcing /Users/rege/.vim/bundle/ultisnips/plugin/UltiSnips.vim
196.939 000.053 000.053: sourcing /Users/rege/.vim/bundle/ultisnips/plugin/snipMate_compatibility.vim
198.275 001.206 001.206: sourcing /Users/rege/.vim/bundle/supertab/plugin/supertab.vim
198.678 000.282 000.282: sourcing /Users/rege/.vim/bundle/vim-rooter/plugin/rooter.vim
199.212 000.409 000.409: sourcing /Users/rege/.vim/bundle/vim-rails/plugin/rails.vim
199.680 000.360 000.360: sourcing /Users/rege/.vim/bundle/vim-eunuch/plugin/eunuch.vim
199.867 000.082 000.082: sourcing /Users/rege/.vim/bundle/vim-rvm/plugin/rvm.vim
200.325 000.352 000.352: sourcing /Users/rege/.vim/bundle/vim-endwise/plugin/endwise.vim
201.147 000.713 000.713: sourcing /Users/rege/.vim/bundle/vim-surround/plugin/surround.vim
205.413 004.155 004.155: sourcing /Users/rege/.vim/bundle/vim-fugitive/plugin/fugitive.vim
205.772 000.224 000.224: sourcing /Users/rege/.vim/bundle/vim-commentary/plugin/commentary.vim
207.541 001.657 001.657: sourcing /Users/rege/.vim/bundle/vim-bundler/plugin/bundler.vim
208.618 000.956 000.956: sourcing /Users/rege/.vim/bundle/vim-matchit/plugin/matchit.vim
208.855 000.124 000.124: sourcing /Users/rege/.vim/bundle/vim-bufonly/plugin/BufOnly.vim
211.092 002.129 002.129: sourcing /Users/rege/.vim/bundle/vim-bufexplorer/plugin/bufexplorer.vim
212.573 001.363 001.363: sourcing /Users/rege/.vim/bundle/bufkill.vim/plugin/bufkill.vim
212.809 000.089 000.089: sourcing /Users/rege/.vim/bundle/gist-vim/plugin/gist.vim
213.058 000.034 000.034: sourcing /Users/rege/.vim/bundle/nyancat-vim/plugin/nyancat.vim
213.469 000.092 000.092: sourcing /usr/local/share/vim/vim73/plugin/getscriptPlugin.vim
213.764 000.263 000.263: sourcing /usr/local/share/vim/vim73/plugin/gzip.vim
214.023 000.225 000.225: sourcing /usr/local/share/vim/vim73/plugin/matchparen.vim
214.671 000.612 000.612: sourcing /usr/local/share/vim/vim73/plugin/netrwPlugin.vim
214.734 000.025 000.025: sourcing /usr/local/share/vim/vim73/plugin/rrhelper.vim
214.809 000.042 000.042: sourcing /usr/local/share/vim/vim73/plugin/spellfile.vim
215.031 000.189 000.189: sourcing /usr/local/share/vim/vim73/plugin/tarPlugin.vim
215.195 000.128 000.128: sourcing /usr/local/share/vim/vim73/plugin/tohtml.vim
215.406 000.176 000.176: sourcing /usr/local/share/vim/vim73/plugin/vimballPlugin.vim
215.601 000.157 000.157: sourcing /usr/local/share/vim/vim73/plugin/zipPlugin.vim
216.003 000.196 000.196: sourcing /Users/rege/.vim/bundle/ultisnips/after/plugin/UltiSnips_after.vim
216.268 004.848: loading plugins
216.274 000.006: inits 3
216.535 000.261: reading viminfo
216.549 000.014: setting raw mode
216.564 000.015: start termcap
216.609 000.045: clearing screen
216.729 000.120: opening buffers
216.906 000.177: BufEnter autocommands
216.908 000.002: editing files in windows
219.169 000.014 000.014: sourcing /Users/rege/.vim/bundle/vim-rails/autoload/rails.vim
226.107 008.627 008.613: sourcing /Users/rege/.vim/bundle/vim-rails/autoload/rails.vim
1237.373 1011.838: VimEnter autocommands
1237.384 000.011: before starting main loop
1240.168 002.784: first screen update
1240.173 000.005: --- VIM STARTED ---
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.014 000.014: --- VIM STARTING ---
000.114 000.100: Allocated generic buffers
000.280 000.166: locale set
000.286 000.006: clipboard setup
000.294 000.008: window checked
007.865 007.571: inits 1
007.875 000.010: parsing arguments
007.877 000.002: expanding arguments
011.095 003.218: shell init
011.538 000.443: Termcap init
011.577 000.039: inits 2
011.737 000.160: init highlight
012.195 000.079 000.079: sourcing /usr/local/share/vim/vim73/ftoff.vim
027.737 015.467 015.467: sourcing /usr/local/share/vim/vim73/filetype.vim
027.933 000.088 000.088: sourcing /usr/local/share/vim/vim73/ftplugin.vim
028.118 000.087 000.087: sourcing /usr/local/share/vim/vim73/indent.vim
028.369 000.147 000.147: sourcing /Users/rege/.vim/bundle/vundle/autoload/vundle.vim
028.641 000.145 000.145: sourcing /Users/rege/.vim/bundle/vundle/autoload/vundle/config.vim
060.404 000.326 000.326: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
060.717 000.921 000.595: sourcing /usr/local/share/vim/vim73/syntax/synload.vim
060.770 001.264 000.343: sourcing /usr/local/share/vim/vim73/syntax/syntax.vim
061.884 000.258 000.258: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
062.631 000.261 000.261: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
063.221 000.206 000.206: sourcing /usr/local/share/vim/vim73/syntax/syncolor.vim
063.709 002.420 001.695: sourcing /Users/rege/.vim/bundle/vim-irblack/colors/ir_black.vim
064.105 052.144 032.447: sourcing $HOME/.vimrc
064.115 000.234: sourcing vimrc file(s)
064.540 000.236 000.236: sourcing /Users/rege/.vim/bundle/ack.vim/plugin/ack.vim
066.657 001.282 001.282: sourcing /Users/rege/.vim/bundle/nerdtree/autoload/nerdtree.vim
068.187 000.701 000.701: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/path.vim
068.431 000.177 000.177: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_controller.vim
068.603 000.112 000.112: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_item.vim
069.792 001.129 001.129: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/key_map.vim
070.138 000.286 000.286: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/bookmark.vim
070.613 000.413 000.413: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_file_node.vim
071.146 000.468 000.468: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_dir_node.vim
071.433 000.226 000.226: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/opener.vim
071.759 000.266 000.266: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/creator.vim
082.906 000.121 000.121: sourcing /Users/rege/.vim/bundle/nerdtree/nerdtree_plugin/exec_menuitem.vim
083.435 000.486 000.486: sourcing /Users/rege/.vim/bundle/nerdtree/nerdtree_plugin/fs_menu.vim
084.161 019.263 013.596: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/NERD_tree.vim
084.511 000.311 000.311: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/bookmark.vim
084.828 000.284 000.284: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/creator.vim
084.992 000.132 000.132: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/key_map.vim
085.203 000.179 000.179: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_controller.vim
085.344 000.109 000.109: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/menu_item.vim
085.618 000.242 000.242: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/opener.vim
086.283 000.633 000.633: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/path.vim
086.825 000.509 000.509: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_dir_node.vim
087.278 000.420 000.420: sourcing /Users/rege/.vim/bundle/nerdtree/plugin/nerdtree/tree_file_node.vim
087.905 000.276 000.276: sourcing /Users/rege/.vim/bundle/ctrlp.vim/autoload/ctrlp/mrufiles.vim
088.134 000.717 000.441: sourcing /Users/rege/.vim/bundle/ctrlp.vim/plugin/ctrlp.vim
203.374 114.482 114.482: sourcing /Users/rege/.vim/bundle/ultisnips/plugin/UltiSnips.vim
203.500 000.053 000.053: sourcing /Users/rege/.vim/bundle/ultisnips/plugin/snipMate_compatibility.vim
204.802 001.173 001.173: sourcing /Users/rege/.vim/bundle/supertab/plugin/supertab.vim
205.211 000.282 000.282: sourcing /Users/rege/.vim/bundle/vim-rooter/plugin/rooter.vim
205.767 000.430 000.430: sourcing /Users/rege/.vim/bundle/vim-rails/plugin/rails.vim
206.269 000.386 000.386: sourcing /Users/rege/.vim/bundle/vim-eunuch/plugin/eunuch.vim
206.471 000.086 000.086: sourcing /Users/rege/.vim/bundle/vim-rvm/plugin/rvm.vim
206.964 000.378 000.378: sourcing /Users/rege/.vim/bundle/vim-endwise/plugin/endwise.vim
207.853 000.768 000.768: sourcing /Users/rege/.vim/bundle/vim-surround/plugin/surround.vim
212.084 004.108 004.108: sourcing /Users/rege/.vim/bundle/vim-fugitive/plugin/fugitive.vim
212.435 000.220 000.220: sourcing /Users/rege/.vim/bundle/vim-commentary/plugin/commentary.vim
214.194 001.644 001.644: sourcing /Users/rege/.vim/bundle/vim-bundler/plugin/bundler.vim
215.275 000.962 000.962: sourcing /Users/rege/.vim/bundle/vim-matchit/plugin/matchit.vim
215.512 000.121 000.121: sourcing /Users/rege/.vim/bundle/vim-bufonly/plugin/BufOnly.vim
217.725 002.098 002.098: sourcing /Users/rege/.vim/bundle/vim-bufexplorer/plugin/bufexplorer.vim
219.288 001.444 001.444: sourcing /Users/rege/.vim/bundle/bufkill.vim/plugin/bufkill.vim
219.511 000.059 000.059: sourcing /Users/rege/.vim/bundle/gist-vim/plugin/gist.vim
219.679 000.033 000.033: sourcing /Users/rege/.vim/bundle/nyancat-vim/plugin/nyancat.vim
220.089 000.091 000.091: sourcing /usr/local/share/vim/vim73/plugin/getscriptPlugin.vim
220.391 000.264 000.264: sourcing /usr/local/share/vim/vim73/plugin/gzip.vim
220.654 000.225 000.225: sourcing /usr/local/share/vim/vim73/plugin/matchparen.vim
221.297 000.605 000.605: sourcing /usr/local/share/vim/vim73/plugin/netrwPlugin.vim
221.365 000.026 000.026: sourcing /usr/local/share/vim/vim73/plugin/rrhelper.vim
221.443 000.042 000.042: sourcing /usr/local/share/vim/vim73/plugin/spellfile.vim
221.668 000.189 000.189: sourcing /usr/local/share/vim/vim73/plugin/tarPlugin.vim
221.835 000.127 000.127: sourcing /usr/local/share/vim/vim73/plugin/tohtml.vim
222.049 000.177 000.177: sourcing /usr/local/share/vim/vim73/plugin/vimballPlugin.vim
222.248 000.157 000.157: sourcing /usr/local/share/vim/vim73/plugin/zipPlugin.vim
222.657 000.198 000.198: sourcing /Users/rege/.vim/bundle/ultisnips/after/plugin/UltiSnips_after.vim
222.919 004.941: loading plugins
222.925 000.006: inits 3
223.186 000.261: reading viminfo
223.202 000.016: setting raw mode
223.222 000.020: start termcap
223.267 000.045: clearing screen
223.393 000.126: opening buffers
223.567 000.174: BufEnter autocommands
223.570 000.003: editing files in windows
224.668 001.098: VimEnter autocommands
224.672 000.004: before starting main loop
226.968 002.296: first screen update
226.972 000.004: --- VIM STARTED ---
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vundle
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved
filetype off " required!
filetype plugin indent on " required!
set rtp+=~/.vim/bundle/vundle/ " Vundle required!
call vundle#rc() " Vundle required!
Bundle 'gmarik/vundle'
Bundle 'mileszs/ack.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'kien/ctrlp.vim'
Bundle 'SirVer/ultisnips'
Bundle 'ervandew/supertab'
Bundle 'airblade/vim-rooter'
Bundle 'vim-ruby/vim-ruby'
Bundle 'tpope/vim-rails'
Bundle 'tpope/vim-eunuch'
Bundle 'tpope/vim-rvm'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-commentary'
Bundle 'tpope/vim-bundler'
Bundle 'mmorearty/vim-matchit'
Bundle 'duff/vim-bufonly'
Bundle 'regedarek/vim-bufexplorer'
Bundle 'vim-scripts/bufkill.vim'
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
Bundle 'wgibbs/vim-irblack'
Bundle 'regedarek/vim-railscasts'
Bundle 'koron/nyancat-vim'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" BASIC EDITING CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set hidden " allow unsaved background buffers and remember marks/undo for them
set history=700 " remember more commands and search history
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set noswapfile " No swap files when editing please
set autoread " Set to auto read when a file is changed from the outside
set expandtab shiftwidth=2 " set tab
set softtabstop=2 tabstop=2 " set tab
set autoindent
set laststatus=2
set showmatch
let g:ruby_path = system('echo $HOME/.rbenv/shims')
set nofoldenable " disable folding
set clipboard+=unnamed
set incsearch
set hlsearch
set ignorecase smartcase " make searches case-sensitive only if they contain upper-case characters
set cursorline
set number
set switchbuf=useopen
set numberwidth=5
set winwidth=79
set shell=bash " This makes RVM work inside Vim. I have no idea why.
set t_ti= t_te= " Prevent Vim from clobbering the scrollback buffer. See
set scrolloff=3 " keep more context when scrolling off the end of a buffer
set backup " Store temporary files in a central spot
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set grepprg=ack
set tags=./tags;
set noesckeys
set ttimeout
set ttimeoutlen=1
set timeoutlen=500
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set showcmd " display incomplete commands
syntax on
set wildmode=longest,list " use emacs-style tab completion when selecting files, etc
set wildignore+=*.o,*.png,*.gif,*.obj
set wildignore+=.git,*/public/*,*/tmp/*
set wildignore+=*.so,*.swp,*.zip " MacOSX/Linux
set wildmenu " make tab completion for files/buffers act like bash
let mapleader=","
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CUSTOM AUTOCMDS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
augroup vimrcEx
" Clear all autocmds in the group
autocmd!
autocmd FileType text setlocal textwidth=78
" Jump to last cursor position unless it's invalid or in an event handler
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
"for ruby, autoindent with two spaces, always expand tabs
autocmd FileType ruby,haml,eruby,yaml,html,javascript,sass,cucumber set ai sw=2 sts=2 et
autocmd BufEnter *.rb :Rooter
autocmd BufEnter *.erb :Rooter
autocmd! BufRead,BufNewFile *.sass setfiletype sass
autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:&gt;
autocmd BufRead *.markdown set ai formatoptions=tcroqn2 comments=n:&gt;
" Indent p tags
autocmd FileType html,eruby if g:html_indent_tags !~ '\\|p\>' | let g:html_indent_tags .= '\|p\|li\|dt\|dd' | endif
" Don't syntax highlight markdown because it's often wrong
autocmd! FileType mkd setlocal syn=off
" Unbind <enter> nohl behaviour on quickfix
autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
autocmd CmdwinEnter * nnoremap <buffer> <CR> <CR>
augroup END
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" COLOR
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set t_Co=256
colorscheme ir_black
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" STATUS LINE
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set statusline=%<%f\ (%{&ft})\ %-4(%m%)%=%-19(%3l,%02c%03V%)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MISC KEY MAPS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <silent> <F1> :BufExplorer<CR>
map <silent> <F2> :Gstatus<CR>
map <space> :
imap jj <Esc>
nmap zz v$h
map <silent> rr :NERDTreeToggle<CR>
nmap <leader>b :Gbrowse<CR>
nmap <silent> <leader>d :BufOnly<CR>
nmap <silent> ff :BD<CR>
nmap <S-j> <<
nmap <S-k> >>
vnoremap < <gv
vnoremap > >gv
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
imap <c-c> <esc>
map <leader>p :bp<CR>
map <leader>n :bp<CR>
nnoremap <CR> :nohlsearch<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ARROW KEYS ARE UNACCEPTABLE
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <Left> <Nop>
map <Right> <Nop>
map <Up> <Nop>
map <Down> <Nop>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" OPEN FILES IN DIRECTORY OF CURRENT FILE
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
cnoremap %% <C-R>=expand('%:h').'/'<cr>
map <leader>e :edit %%
map <leader>v :view %%
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" TODO list
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! Todo()
:e ~/Dropbox/todo.markdown
endfunction
:command! Todo :call Todo()
:map <leader>tl :call Todo()<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PROMOTE VARIABLE TO RSPEC LET
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! PromoteToLet()
:normal! dd
" :exec '?^\s*it\>'
:normal! P
:.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/
:normal ==
endfunction
:command! PromoteToLet :call PromoteToLet()
:map <leader>l :PromoteToLet<cr>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" RUNNING TESTS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <leader>t :call RunTestFile()<cr>
map <leader>T :call RunNearestTest()<cr>
map <leader>a :call RunTests('spec')<cr>
function! RunTestFile(...)
if a:0
let command_suffix = a:1
else
let command_suffix = ""
endif
" Run the tests for the previously-marked file.
let in_test_file = match(expand("%"), '\(.feature\|_spec.rb\)$') != -1
if in_test_file
call SetTestFile()
elseif !exists("t:grb_test_file")
return
end
call RunTests(t:grb_test_file . command_suffix)
endfunction
function! RunNearestTest()
let spec_line_number = line('.')
call RunTestFile(":" . spec_line_number . " -b")
endfunction
function! SetTestFile()
" Set the spec file that tests will be run for.
let t:grb_test_file=@%
endfunction
function! RunTests(filename)
" Write the file and run tests for the given filename
:w
:silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo
:silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo
:silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo
:silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo
:silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo
:silent !echo;echo;echo;echo;echo;echo;echo;echo;echo;echo
if match(a:filename, '\.feature$') != -1
exec ":!script/features " . a:filename
else
if filereadable("script/test")
exec ":!script/test " . a:filename
elseif filereadable("Gemfile")
exec ":!bundle exec rspec --color " . a:filename
else
exec ":!rspec --format Fuubar --color " . a:filename
end
end
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGINS SETTINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Surround
vmap s S
"gist-vim
let g:gist_clip_command = 'pbcopy'
let g:gist_post_private = 1
let g:gist_detect_filetype = 1
let g:gist_show_privates = 1
let g:gist_get_multiplefile = 1
"ctrlp.vim
nnoremap <leader>r :CtrlPMRU<cr>
let g:ctrlp_custom_ignore = {
\ 'file': '\v\.(exe|so|dll|log|gif|jpg|jpeg|png)$'
\ }
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_map = '<c-p>'
let g:ctrlp_mruf_relative = 1
let g:ctrlp_working_path_mode = 0
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_mruf_last_entered = 1
let g:ctrlp_prompt_mappings = {
\ 'PrtSelectMove("j")': ['<s-j>', '<down>'],
\ 'PrtSelectMove("k")': ['<s-k>', '<up>'],
\ 'CreateNewFile()': ['<s-n>'],
\ 'ToggleFocus()': ['<tab>'],
\ 'ToggleByFname()': ['<c-d>'],
\ 'ToggleType(1)': ['<c-f>', '<c-j>', '<c-up>'],
\ 'ToggleType(-1)': ['<c-b>', '<c-k>', '<c-down>'],
\ 'MarkToOpen()': ['<s-l>'],
\ 'OpenMulti()': ['<s-D>'],
\ }
let g:ctrlp_open_new_file = 0
let g:ctrlp_open_multi = 'vr'
let g:ctrlp_arg_map = 0
let g:ctrlp_jump_to_buffer = 1
let g:ctrlp_dotfiles = 0
let g:ctrlp_match_window_reversed = 0
let g:ctrlp_extensions = ['tag', 'buffertag']
@regedarek
Copy link
Author

> echo $PATH
/usr/local/bin:/Users/rege/.rbenv/shims:/Users/rege/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/rege/.rbenv/versions/1.9.3-p327-perf/gemsets/global/bin:/Users/rege/.rbenv/libexec:/Users/rege/.rbenv/plugins/rbenv-gemset/bin:/Users/rege/.rbenv/plugins/rbenv-vars/bin:/Users/rege/.rbenv/plugins/ruby-build/bin:/Users/rege/.rbenv/shims:/Users/rege/.rbenv/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment