Use nroff filetype for man pages, closes #611

This commit is contained in:
Adam Stankiewicz
2020-10-26 08:45:34 +01:00
parent 2838800832
commit 740a60811c
5 changed files with 6 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ A collection of language packs for Vim.
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
- It **installs and updates 120+ times faster** than the <!--Package Count-->598<!--/Package Count--> packages it consists of.
- It **installs and updates 120+ times faster** than the <!--Package Count-->597<!--/Package Count--> packages it consists of.
- It is also more secure (scripts loaded for every filetype are generated by vim-polyglot)
- Best syntax and indentation support (no other features). Hand-selected language packs.
- Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled)

View File

@@ -315,7 +315,6 @@ let s:globs = {
\ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',
\ 'mako': '*.mako,*.mao',
\ 'mallard': '*.page',
\ 'man': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc',
\ 'manconf': 'man.config',
\ 'map': '*.map',
\ 'maple': '*.mv,*.mpl,*.mws',
@@ -361,7 +360,7 @@ let s:globs = {
\ 'ninja': '*.ninja',
\ 'nix': '*.nix',
\ 'nqc': '*.nqc',
\ 'nroff': '*.tr,*.nr,*.roff,*.tmac,*.mom,tmac.*',
\ 'nroff': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc,*.tr,*.nr,*.roff,*.tmac,*.mom,tmac.*',
\ 'nsis': '*.nsi,*.nsh',
\ 'oasis': '_oasis',
\ 'obj': '*.obj',

View File

@@ -145,10 +145,6 @@ if !has_key(g:polyglot_is_disabled, 'xpm')
au BufNewFile,BufRead *.xpm setf xpm
endif
if !has_key(g:polyglot_is_disabled, 'man')
au BufNewFile,BufRead *.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc setf man
endif
if !has_key(g:polyglot_is_disabled, 'xf86conf')
au BufNewFile,BufRead */xorg.conf.d/*.conf,xorg.conf,xorg.conf-4 setf xf86conf
au BufNewFile,BufRead XF86Config-4* call s:StarSetf('xf86conf')
@@ -866,6 +862,7 @@ if !has_key(g:polyglot_is_disabled, 'nqc')
endif
if !has_key(g:polyglot_is_disabled, 'nroff')
au BufNewFile,BufRead *.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc setf nroff
au BufNewFile,BufRead *.mom,*.nr,*.roff,*.tmac,*.tr setf nroff
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
endif

View File

@@ -3863,6 +3863,8 @@ name: nroff
remote: vim/vim:runtime
glob: "**/nroff.vim"
filetypes:
- name: nroff
linguist: Roff Manpage
- name: nroff
patterns:
- pattern: "*.tr,*.nr,*.roff,*.tmac,*.mom"
@@ -5509,11 +5511,6 @@ filetypes:
patterns:
- pattern: "XF86Config-4*,XF86Config*,*/xorg.conf.d/*.conf,xorg.conf,xorg.conf-4"
---
name: man
filetypes:
- name: man
linguist: Roff Manpage
---
name: xpm
remote: vim/vim:runtime
glob: "**/xpm.vim"

View File

@@ -463,6 +463,7 @@ call TestFiletype('netrc')
call TestFiletype('ninja')
call TestFiletype('ncf')
call TestFiletype('nroff')
call TestFiletype('nroff')
call TestFiletype('nqc')
call TestFiletype('nsis')
call TestFiletype('occam')
@@ -638,7 +639,6 @@ call TestFiletype('svn')
call TestFiletype('text')
call TestFiletype('pullrequest')
call TestFiletype('xf86conf')
call TestFiletype('man')
call TestFiletype('xpm')
call TestFiletype('xpm2')
call TestFiletype('context')