Comments (2)
I'm afraid I don't quite follow. Can you please give me an example (even if it is contrived) where my scheme could be a problem? The reason I went with for example info:make.info#Top
instead of info://make.info#Top
is that the former is the URI scheme proposed by GNU Texinfo for Info files without path. See info:texinfo.info#Info%20Files
(or :Info texinfo Info\ Files
).
I would prefer to remain compatible with this suggestion because it is supported by Emacs as well (principle of lease surprise). However, I think pragmatism trumps least surprise, Vim is not Emacs.
Truth be told, I don't like working on this plugin anymore. It is far too complicated for Vim script and it relies on standalone info
to render the text. I would prefer to just rewrite it in Lua for Neovim only and use lpeg (which will be included with Neovim 0.10) to parse the Info files directly and render them myself. But Info files are often compressed, I don't know how I would deal with those. So far standalone info has been giving me support for them for free.
from info.vim.
Can you please give me an example (even if it is contrived) where my scheme could be a problem?
For example, user may want to edit the file named info:info.vim
in the cwd.
touch info:info.vim
vim info:info.vim # shows the info page for info.vim
With the current scheme, info.vim cannot tell whether the user wants the file or the info page.
On the other hand, vim unambiguously interprets info://...
as an absolute path.
v:oldfiles
records the file names (among many other things) of the recently edited buffers.
For example, if you edit, ~/.vimrc
, :oldfiles
will display /home/user/.vimrc
(after you rerun vim).
In some cases, you may want to exclude some files from v:oldfiles
, especially when they are temporary files or not real files,
e.g. /tmp/*
, fugitive://*
(git commit, blob, ..), man://
(man page), and info pages.
This can be done with :h viminfo-r
(or :h shada-r
), but this only filters the filename by the prefix of the file name.
With info:info.vim
scheme, the filename recorded in v:oldfiles
will be /path/to/cwd/info:info.vim
.
Therefore, it cannot be ignored from :oldfiles
.
With info://info:info.vim
scheme, exactly info://info:info.vim
is recorded in v:oldfiles
, so you can filter it out with set viminfo+=rinfo://
.
So I think info://
scheme is more practical, but I do understand the advantage of info:
scheme's compatibility.
Truth be told, I don't like working on this plugin anymore. It is far too complicated for Vim script and it relies on standalone info to render the text.
Fair enough 🙃
from info.vim.
Related Issues (11)
- What should the command for 'next' and so on be called? HOT 4
- Missing InfoMenu
- `Info.vim: falling back to manpage`
- <Plug> mappings HOT 2
- propose shell function HOT 3
- Deprecated project HOT 4
- Using <C-o> to go back to the last jump point freezes Vim HOT 2
- Add support for looking up non-Node indices HOT 4
- Respect extra parameters for man fallback HOT 3
- Additional optional mapping HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from info.vim.