diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-26 08:45:34 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-26 08:45:34 +0100 |
commit | 740a60811c4647eecf3e2f82a24dccc1abbd686a (patch) | |
tree | bbd2f09772ccdbb9ee846522ac14779477917b53 | |
parent | 28388008327aacfc48db3c31f415564d93cd983f (diff) | |
download | vim-polyglot-740a60811c4647eecf3e2f82a24dccc1abbd686a.tar.gz vim-polyglot-740a60811c4647eecf3e2f82a24dccc1abbd686a.zip |
Use nroff filetype for man pages, closes #611
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | autoload/polyglot/sleuth.vim | 3 | ||||
-rw-r--r-- | ftdetect/polyglot.vim | 5 | ||||
-rw-r--r-- | packages.yaml | 7 | ||||
-rw-r--r-- | tests/filetypes.vim | 2 |
5 files changed, 6 insertions, 13 deletions
@@ -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) diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim index b5b30ab8..a23a2ab5 100644 --- a/autoload/polyglot/sleuth.vim +++ b/autoload/polyglot/sleuth.vim @@ -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', diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 19d459ca..22839535 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -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 diff --git a/packages.yaml b/packages.yaml index dc24c858..2e4cdb87 100644 --- a/packages.yaml +++ b/packages.yaml @@ -3864,6 +3864,8 @@ remote: vim/vim:runtime glob: "**/nroff.vim" filetypes: - name: nroff + linguist: Roff Manpage +- name: nroff patterns: - pattern: "*.tr,*.nr,*.roff,*.tmac,*.mom" description: Nroff/Troff (*.ms and *.t are checked below) @@ -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" diff --git a/tests/filetypes.vim b/tests/filetypes.vim index e9a88536..c3bb9931 100644 --- a/tests/filetypes.vim +++ b/tests/filetypes.vim @@ -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') |