Nice function to open external tools.

This commit is contained in:
Thomas Gideon 2015-04-17 14:52:17 -04:00
parent b519bdd0ad
commit c4e839289c

14
vimrc
View file

@ -99,4 +99,18 @@ nmap <F9> :TagbarToggle<CR>
" quickly toggle a left, vsplit for an insanely powerful file explorer " quickly toggle a left, vsplit for an insanely powerful file explorer
nmap <F8> :NERDTreeToggle<CR> nmap <F8> :NERDTreeToggle<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Open current file with app given
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! s:OpenWith(appname)
noautocmd silent execute "!open -a \"" . a:appname . "\" " . expand("%:p")
if v:shell_error
echohl Error
echon "Problem opening the file."
echohl Normal
endif
endfunction
command! -bar -nargs=1 OpenWith call s:OpenWith(<f-args>)
colorscheme solarized colorscheme solarized