Help things

This commit is contained in:
Mathieu Maret 2015-07-08 14:13:33 +02:00
parent bd2408812f
commit 8b3bbddb17

29
.vimrc
View File

@ -1,6 +1,9 @@
""""""""""""" """""""""""""
" SHORTCUTS " " SHORTCUTS "
""""""""""""" """""""""""""
" F1 help
" F2 open file in a new tab
" S-F2 Split and open file
" F3 autotags Update " F3 autotags Update
" S-F3 autotags Add " S-F3 autotags Add
" F8 view tag list " F8 view tag list
@ -133,6 +136,32 @@ endif
map <F2> :tabe <C-R>=expand("%:h") . "/"<CR> map <F2> :tabe <C-R>=expand("%:h") . "/"<CR>
nmap <S-F2> :split <C-R>=expand("%:h") . "/"<CR> nmap <S-F2> :split <C-R>=expand("%:h") . "/"<CR>
""""""""
" HELP "
""""""""
" allow embedded man page
runtime! ftplugin/man.vim
" show vimrc with shift+F1
nmap <silent> <S-F1> :tabe ~/.vimrc<CR>gg
imap <S-F1> <Esc><S-F1>
" show contextual help with F1
function Help()
try
if exists('b:current_syntax') && b:current_syntax == "python"
:call ShowPyDoc(expand("<cword>"), 1)
else
execute "Man " . expand("<cword>")
endif
catch /:E149:/
execute "help " . expand("<cword>")
endtry
endfunction
nmap <silent> <F1> :call Help()<CR>
imap <F1> <Esc><F1>
" show VIM help with alt+shift+F1
nmap <silent> <M-S-F1> :help <C-R>=expand("<cword>")<CR><CR>
imap <M-S-F1> <Esc><M-S-F1>
"""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""
"Omni-completion par CTRL-X_CTRL-O "Omni-completion par CTRL-X_CTRL-O
""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""