""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " gvimrc " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Say neigh to UI cruft! set go-=T set go-=l set go-=L set go-=r set go-=R " No GUI tabs! set go-=e " Don't show dialogues, use text prompts set go+=c " Sets File>Open to start in current file's path set browsedir=buffer " Share a clipboard with OS and vim terminal sessions if has('unnamedplus') set clipboard=unnamedplus else set clipboard=unnamed endif " For macvim if has('gui_macvim') " j doesn't seem to work from terminal set formatoptions+=j " set guifont=Ubuntu\ Mono:h14 " set guifont=Monaco:h12 " set guifont=Ubuntu\ Mono:h14 set guifont=Terminus\ (TTF):h12 set noantialias " Replace some CMD shortcuts macmenu &File.Open\.\.\. key= macmenu &Tools.Make key= " Switching buffers nmap ]b nmap [b " Textmate-like CMD+Enter inoremap o inoremap O " Fast scrolling map 5j map 5k imap 5j imap 5k " Commenting using CMD+/" nmap gcc vmap gc " Tab navigation nmap 1gt nmap 2gt nmap 3gt nmap 4gt nmap 5gt nmap 6gt nmap 7gt nmap 8gt nmap 9gt map r " Replace :make map :Dispatch " Shortcuts to outside apps {{{ " Open in finder nnoremap f :silent !open "%:p:h" nnoremap F :silent !open . " Open in terminal nnoremap t :silent !open -a iTerm "%:p:h" nnoremap T :silent !open -a iTerm . " Send to transmit nnoremap u :silent !open -a Transmit "%" " Send to launchbar (project and file, respectively) nnoremap [ :call LaunchBarSelect(expand("%:p:h")) nnoremap ] :call LaunchBarSelect(expand("%:p")) func LaunchBarSelect(arg) silent! let l:arg = substitute(a:arg, '[^A-Za-z0-9_.~-/]','\="%".printf("%02X",char2nr(submatch(0)))','g') if l:arg ==# "" let l:arg = expand("%:p:h") endif exec 'silent !open "x-launchbar:select?file=' . l:arg . '"' endfunc " }}} else " For unix only inoremap * cnoremap * set go-=m set novisualbell " For gvim set guifont=Monospace\ 10 " Commenting using Ctrl+/ map gcc " Textmate-like CMD+Enter inoremap o inoremap O endif