mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	mandoc may not handle quoted MANPAGER arguments correctly. E.g. with
    export MANPAGER='nvim -u NORC -c "set ft=man"'
mandoc treats `"set` and `ft=man"'` as separate tokens.
To workaround that, provide :Man! so that MANPAGER can avoid quoting.
closes #9120
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			429 B
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			429 B
		
	
	
	
		
			VimL
		
	
	
	
	
	
" Maintainer: Anmol Sethi <anmol@aubble.com>
 | 
						|
 | 
						|
if exists('g:loaded_man')
 | 
						|
  finish
 | 
						|
endif
 | 
						|
let g:loaded_man = 1
 | 
						|
 | 
						|
command! -bang -bar -range=0 -complete=customlist,man#complete -nargs=* Man
 | 
						|
      \ if <bang>0 | set ft=man |
 | 
						|
      \ else | call man#open_page(v:count, v:count1, <q-mods>, <f-args>) | endif
 | 
						|
 | 
						|
augroup man
 | 
						|
  autocmd!
 | 
						|
  autocmd BufReadCmd man://* call man#read_page(matchstr(expand('<amatch>'), 'man://\zs.*'))
 | 
						|
augroup END
 |