info.vim icon indicating copy to clipboard operation
info.vim copied to clipboard

Additional optional mapping

Open nkh opened this issue 2 years ago • 3 comments

I added these mappings:

nmap gg K

"use fzf for the menu nmap gm :call fzf#vim#buffer_lines('* ', 0)<CR>

There's probably a much better way to find the nodes names than just searching for "* "

nkh avatar Jun 27 '23 06:06 nkh

The b:info variable contains all known information about the current node, including the menu. See :h b:info['Menu'].

HiPhish avatar Jun 28 '23 21:06 HiPhish

Note  The menu is built lazily, it will not exists until executing a menu-related command.

Doesn't the above mean it's empty when I need the info? or is there some silent menu-related command which could be called before filling the fzf buffer?

I must admit that I'm not a fan of vimscript. On the other hand I'm so found of info.vim that I've decided to write some info files for my project (although I want to generate them from some markdown I already have).

nkh avatar Jun 28 '23 22:06 nkh

Doesn't the above mean it's empty when I need the info?

I don't think this is accurate anymore. At least when I open the Bash manual and execute echo b:info the entry is there.

I must admit that I'm not a fan of vimscript.

This plugin predates Lua in Neovim. Honestly, it's very much a hackjob that leverages the standalone info binary to render the text and uses regular expressions to parse the result. Very brittle. I would love to rewrite it from scratch in Lua to parse the Info files directly. Vim script is fine for configuration (and I prefer it over Lua), but when it comes to plugins Lua is king.

The upcoming Neovim 0.10 will have lpeg included, so it might be viable to write a proper parser.

On the other hand I'm so found of info.vim that I've decided to write some info files for my project (although I want to generate them from some markdown I already have).

Info files are generated from Texinfo files. It might not be the nicest markup language, but it's not bad either. For any manual which warrants the complexity of the Info format I would never use Markdown in the first place.

HiPhish avatar Jun 28 '23 22:06 HiPhish