Nice function to open external tools.
This commit is contained in:
parent
b519bdd0ad
commit
c4e839289c
1 changed files with 14 additions and 0 deletions
14
vimrc
14
vimrc
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue