mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
parent
ad6bbe4468
commit
9081cad514
@ -149,8 +149,9 @@ function! s:system(cmd, ...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_page(path) abort
|
function! s:get_page(path) abort
|
||||||
" Respect $MANWIDTH or default to window width.
|
" Disable hard-wrap by setting $MANWIDTH to a high value.
|
||||||
let manwidth = empty($MANWIDTH) ? winwidth(0) : $MANWIDTH
|
" Use soft wrap instead (ftplugin/man.vim sets 'wrap', 'breakindent').
|
||||||
|
let manwidth = 9999
|
||||||
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
" Force MANPAGER=cat to ensure Vim is not recursively invoked (by man-db).
|
||||||
" http://comments.gmane.org/gmane.editors.vim.devel/29085
|
" http://comments.gmane.org/gmane.editors.vim.devel/29085
|
||||||
" Set MAN_KEEP_FORMATTING so Debian man doesn't discard backspaces.
|
" Set MAN_KEEP_FORMATTING so Debian man doesn't discard backspaces.
|
||||||
|
@ -22,6 +22,8 @@ setlocal noexpandtab
|
|||||||
setlocal tabstop=8
|
setlocal tabstop=8
|
||||||
setlocal softtabstop=8
|
setlocal softtabstop=8
|
||||||
setlocal shiftwidth=8
|
setlocal shiftwidth=8
|
||||||
|
setlocal wrap
|
||||||
|
setlocal breakindent
|
||||||
|
|
||||||
setlocal nonumber
|
setlocal nonumber
|
||||||
setlocal norelativenumber
|
setlocal norelativenumber
|
||||||
@ -31,6 +33,8 @@ setlocal nolist
|
|||||||
setlocal nofoldenable
|
setlocal nofoldenable
|
||||||
|
|
||||||
if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
|
if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
|
||||||
|
nnoremap <silent> <buffer> j gj
|
||||||
|
nnoremap <silent> <buffer> k gk
|
||||||
nnoremap <silent> <buffer> gO :call man#show_toc()<CR>
|
nnoremap <silent> <buffer> gO :call man#show_toc()<CR>
|
||||||
nnoremap <silent> <buffer> <C-]> :Man<CR>
|
nnoremap <silent> <buffer> <C-]> :Man<CR>
|
||||||
nnoremap <silent> <buffer> K :Man<CR>
|
nnoremap <silent> <buffer> K :Man<CR>
|
||||||
|
Loading…
Reference in New Issue
Block a user