diff options
author | Colin Caine <colin.caine@manchester.ac.uk> | 2016-10-20 07:35:48 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-10-20 08:35:48 +0200 |
commit | e19234f391f7dc9259dbd1115a70868e3b54577d (patch) | |
tree | d10f1c6b281e6b80ecfba341c5fd0bd75444c150 | |
parent | 13262aef7a82d679f16e4160409caf82ba9e7a0e (diff) | |
download | rneovim-e19234f391f7dc9259dbd1115a70868e3b54577d.tar.gz rneovim-e19234f391f7dc9259dbd1115a70868e3b54577d.tar.bz2 rneovim-e19234f391f7dc9259dbd1115a70868e3b54577d.zip |
man.vim: silence `file` call (#5509)
When a file is opened by nvim with ft=man already set, and
"has('vim_starting')", ftplugin/man.vim calls
'execute 'file man://'.ref', this causes nvim to display something like
this:
````
"<name of original file>" 977, 41017C
"man://foo(1)" [Not edited] 977 lines --0%--
Press ENTER or type command to continue
````
This is annoying, because nothing of note has actually happened.
Use cases why you might want to read a man page from a file:
`MANPAGER='bash -c "nvim -c \"set ft=man\" </dev/tty <(col -bx)"' man git`
`nvim -c 'set ft=man' <(man -P cat git)`
-rw-r--r-- | runtime/ftplugin/man.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 02d2b4e557..f6fefd0155 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -21,7 +21,7 @@ if has('vim_starting') " all caps it is impossible to tell what the original capitilization was. let ref = tolower(matchstr(getline(1), '^\S\+')) let b:man_sect = man#extract_sect_and_name_ref(ref)[0] - execute 'file man://'.ref + execute 'silent file man://'.ref endif setlocal buftype=nofile |