Skip to content

Commit 740a608

Browse files
committed
Use nroff filetype for man pages, closes #611
1 parent 2838800 commit 740a608

File tree

5 files changed

+6
-13
lines changed

5 files changed

+6
-13
lines changed

README.md

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

autoload/polyglot/sleuth.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ let s:globs = {
315315
\ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',
316316
\ 'mako': '*.mako,*.mao',
317317
\ 'mallard': '*.page',
318-
\ 'man': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc',
319318
\ 'manconf': 'man.config',
320319
\ 'map': '*.map',
321320
\ 'maple': '*.mv,*.mpl,*.mws',
@@ -361,7 +360,7 @@ let s:globs = {
361360
\ 'ninja': '*.ninja',
362361
\ 'nix': '*.nix',
363362
\ 'nqc': '*.nqc',
364-
\ 'nroff': '*.tr,*.nr,*.roff,*.tmac,*.mom,tmac.*',
363+
\ '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.*',
365364
\ 'nsis': '*.nsi,*.nsh',
366365
\ 'oasis': '_oasis',
367366
\ 'obj': '*.obj',

ftdetect/polyglot.vim

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ if !has_key(g:polyglot_is_disabled, 'xpm')
145145
au BufNewFile,BufRead *.xpm setf xpm
146146
endif
147147

148-
if !has_key(g:polyglot_is_disabled, 'man')
149-
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
150-
endif
151-
152148
if !has_key(g:polyglot_is_disabled, 'xf86conf')
153149
au BufNewFile,BufRead */xorg.conf.d/*.conf,xorg.conf,xorg.conf-4 setf xf86conf
154150
au BufNewFile,BufRead XF86Config-4* call s:StarSetf('xf86conf')
@@ -866,6 +862,7 @@ if !has_key(g:polyglot_is_disabled, 'nqc')
866862
endif
867863

868864
if !has_key(g:polyglot_is_disabled, 'nroff')
865+
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
869866
au BufNewFile,BufRead *.mom,*.nr,*.roff,*.tmac,*.tr setf nroff
870867
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
871868
endif

packages.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3863,6 +3863,8 @@ name: nroff
38633863
remote: vim/vim:runtime
38643864
glob: "**/nroff.vim"
38653865
filetypes:
3866+
- name: nroff
3867+
linguist: Roff Manpage
38663868
- name: nroff
38673869
patterns:
38683870
- pattern: "*.tr,*.nr,*.roff,*.tmac,*.mom"
@@ -5509,11 +5511,6 @@ filetypes:
55095511
patterns:
55105512
- pattern: "XF86Config-4*,XF86Config*,*/xorg.conf.d/*.conf,xorg.conf,xorg.conf-4"
55115513
---
5512-
name: man
5513-
filetypes:
5514-
- name: man
5515-
linguist: Roff Manpage
5516-
---
55175514
name: xpm
55185515
remote: vim/vim:runtime
55195516
glob: "**/xpm.vim"

tests/filetypes.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ call TestFiletype('netrc')
463463
call TestFiletype('ninja')
464464
call TestFiletype('ncf')
465465
call TestFiletype('nroff')
466+
call TestFiletype('nroff')
466467
call TestFiletype('nqc')
467468
call TestFiletype('nsis')
468469
call TestFiletype('occam')
@@ -638,7 +639,6 @@ call TestFiletype('svn')
638639
call TestFiletype('text')
639640
call TestFiletype('pullrequest')
640641
call TestFiletype('xf86conf')
641-
call TestFiletype('man')
642642
call TestFiletype('xpm')
643643
call TestFiletype('xpm2')
644644
call TestFiletype('context')

0 commit comments

Comments
 (0)