Skip to content

Commit

Permalink
Add an option to prevent mappings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjl committed Aug 17, 2011
1 parent fd814c4 commit a0831b0
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions ftplugin/python_pydoc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,18 @@ function! Highlight(name)
endfunction

"mappings
au FileType python,man map <buffer> <leader>pw :call ShowPyDoc('<C-R><C-W>', 1)<CR>
au FileType python,man map <buffer> <leader>pW :call ShowPyDoc('<C-R><C-A>', 1)<CR>
au FileType python,man map <buffer> <leader>pk :call ShowPyDoc('<C-R><C-W>', 0)<CR>
au FileType python,man map <buffer> <leader>pK :call ShowPyDoc('<C-R><C-A>', 0)<CR>
" remap the K (or 'help') key
nnoremap <silent> <buffer> K :call ShowPyDoc(expand("<cword>"), 1)<CR>
if !exists('g:pydoc_perform_mappings')
let g:pydoc_perform_mappings = 1
endif
if g:pydoc_perform_mappings != 0
au FileType python,man map <buffer> <leader>pw :call ShowPyDoc('<C-R><C-W>', 1)<CR>
au FileType python,man map <buffer> <leader>pW :call ShowPyDoc('<C-R><C-A>', 1)<CR>
au FileType python,man map <buffer> <leader>pk :call ShowPyDoc('<C-R><C-W>', 0)<CR>
au FileType python,man map <buffer> <leader>pK :call ShowPyDoc('<C-R><C-A>', 0)<CR>
" remap the K (or 'help') key
nnoremap <silent> <buffer> K :call ShowPyDoc(expand("<cword>"), 1)<CR>
endif

"commands
command! -nargs=1 Pydoc :call ShowPyDoc('<args>', 1)
Expand Down

0 comments on commit a0831b0

Please sign in to comment.