Closed ling-zhou closed 6 years ago
Weird, I just tried it and it works fine for me. What Vim version are you using? :version
Also, Try running :VinfoClean
to purge vinfo's repos and then try :Vinfo printf
again.
$ vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 21 2018 11:40:10) Included patches: 1-1625
Tried :VinfoClean, and still do not works for :Vinfo printf, :Vinfo scanf, etc.
I'm unable to reproduce the issue, but the only thing i can think of is that info
itself doesn't have the docs, does info printf
or info scanf
work?
Also, what is the output of info --version
?
$ info printf File: libc.info, Node: Formatted Output Functions, Next: Dynamic Output, Prev: Other Output Conversions, Up: Formatted Output
This section describes how to call printf' and related functions. Prototypes for these functions are in the header file
stdio.h'.
Because these functions take a variable number of arguments, you must
declare prototypes for them before using them. Of course, the easiest
way to make sure you have all the right prototypes is to just include
`stdio.h'.
-- Function: int printf (const char *TEMPLATE, ...)
The printf' function prints the optional arguments under the control of the template string TEMPLATE to the stream
stdout'.
It returns the number of characters printed, or a negative value
if there was an output error.
$ info scanf File: libc.info, Node: Formatted Input Functions, Next: Variable Arguments Input, Prev: Other Input Conversions, Up: Formatted Input
Here are the descriptions of the functions for performing formatted input. Prototypes for these functions are in the header file `stdio.h'.
-- Function: int scanf (const char *TEMPLATE, ...)
The scanf' function reads formatted input from the stream
stdin'
under the control of the template string TEMPLATE. The optional
arguments are pointers to the places which receive the resulting
values.
$ info --version info (GNU texinfo) 4.13
Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Error is triggered by command split
$ cat x
vim -c "Vinfo $1" -c 'silent only'
$ ./x libc info: Writing node (libc.info.gz)Variable Index... info: Writing node (libc.info.gz)File Index... info: Done. split: unrecognized option '--additional-suffix' Try `split --help' for more information.
$ grep -r '--additional-suffix' ./autoload/vinfo/repo.vim exe 'silent !split -l 5000 -d --additional-suffix .txt ' . l:doc . ' ' . l:doc_path . a:doc
$ split --help Usage: split [OPTION]... [INPUT [PREFIX]] Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input.
Mandatory arguments to long options are mandatory for short options too. -a, --suffix-length=N use suffixes of length N (default 2) -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file -d, --numeric-suffixes use numeric suffixes instead of alphabetic -l, --lines=NUMBER put NUMBER lines per output file --verbose print a diagnostic just before each output file is opened --help display this help and exit --version output version information and exit
SIZE may be (or may be an integer optionally followed by) one of following: KB 1000, K 1024, MB 10001000, M 10241024, and so on for G, T, P, E, Z, Y.
Report split bugs to bug-coreutils@gnu.org GNU coreutils home page: http://www.gnu.org/software/coreutils/ General help using GNU software: http://www.gnu.org/gethelp/ For complete documentation, run: info coreutils 'split invocation' [zsh-5.3.1:2061,0] 17:37:56 baozhou@10.123.15.21:/data/home/baozhou/.vim/plug/vinfo
$ split --version split (GNU coreutils) 8.4 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Torbjörn Granlund and Richard M. Stallman.
Oh you found it, cool! So it seems that you're using a quite outdated version of coreutils, 8.4 is from 8 years ago, and the current stable version from last year is 8.29. What OS/distribution/version/etc are you using? you think you could upgrade your OS? otherwise some workaround would be needed.
Yes, problem solved by upgrading coreutils to the newest version(8.29), it is not necessary to upgrading OS.
Vinfo split the Info file in various 'pages' so it's faster to read. You can traverse this pages by following the tags or by using on of the page traversing commands:
:VinfoN :VinfoNext
:VinfoN[ext] Go to the next Info documentation file page. Will fail if the last page is currently loaded.
:VinfoP :VinfoPrevious
:VinfoP[revious] Go to the previous Info documentation file page. Will fail if the last page is currently loaded.
It seems like 'Ctrl-]' does not work for the tags?
It seems like 'Ctrl-]' does not work for the tags?
ah! it happens to me as well, vim's help-tag mechanisms break sometimes, will figure it out.
Fixed by #4
:Vinfo libc works
but :Vinfo printf do not works, this is error message: [Vinfo] Invalid DOC: printf (No repo created)