diff --git a/ftplugin/rst/commons.vim b/ftplugin/rst/commons.vim index 5e09d9b..1c7ff9f 100644 --- a/ftplugin/rst/commons.vim +++ b/ftplugin/rst/commons.vim @@ -4,4 +4,19 @@ setlocal makeprg=rst2html.py\ \"%\"\ \"%:p:r.html\" setlocal spell setlocal smartindent setlocal autoindent -setlocal formatoptions=tcq "set VIms default +setlocal formatoptions=tcq "set VIms default + +function ShowInBrowser() + let l:uri = expand("%:p:r") . ".html" + silent make + call system(g:browser . " " . l:uri) + + echohl Statement + echo "Opened '" . l:uri ."' in " . g:browser + echohl None +endfunction + +if !exists(":ShowInBrowser") + command ShowInBrowser call s:ShowInBrowser() + map :ShowInBrowser +endif diff --git a/vimrc b/vimrc index a81a818..fa4d4bc 100644 --- a/vimrc +++ b/vimrc @@ -57,7 +57,7 @@ NeoBundle "vim-scripts/loremipsum" NeoBundle "vim-scripts/mako.vim" NeoBundle "vim-scripts/mako.vim--Torborg" NeoBundle "yegappan/grep" -NeoBundle "zhaocai/DirDiff.vim" +NeoBundle "will133/vim-dirdiff" NeoBundle "vim-scripts/JavaScript-Indent" let g:ctags_statusline=1 @@ -206,7 +206,7 @@ let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" nnoremap ff :call g:Jsbeautify():retab! "}}} "TagListToo {{{2 -nmap t :TlistToo +"nmap t :TlistToo "inherited from TagList let Tlist_Use_Right_Window = 1 "show menu in gvim. usefull to pop it up from kbd @@ -285,9 +285,12 @@ nnoremap oc :Occur nnoremap om :Moccur nnoremap 8 *:Moccur " }}} -" Pythonhelper {{{ +" Pythonhelper {{{2 let g:pythonhelper_updatetime = 1000 " }}} +"TagListToo {{{2 +nmap t :Tagbar +"}}} "}}} "KEYS: User defined keyboard shortcuts {{{