Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by
edited by

Since this is my first post, I want to thank you for making vifm!

vifm version v0.13 uses json as the vifminfo file, which makes repetitive use of the same keys over and over again,

 gtabs = [ {
       panes = [ {
           ptabs = [ {
               history = [ {
                   dir = "/some/directory"
                   file = "file.png"
                   relpos = 28
                   ts = 1440801895 # timestamp (optional)
               } ]
               filters = {
                   dot = true
                   manual = ""
                   auto = ""
                   invert = false
               }
               name = "ptab-name"
               options = [ "opt1=val1", "opt2=val2" ]
             ....
             ...

Since I'm new here, I assume based on this issue that the viminfo format was used for storing history, marks and other things in the early days of vifm.

I'm studying the viminfo.c file in vim and at first glance seems like a more efficient way to store histories of many things vifm related. May I ask what prompted the change to json files?

And is the reintroduction of viminfo to vifm for potentially replacing the vifminfo.json files open for discussion?

1 Answer

0 votes
by
selected by
 
Best answer

Since this is my first post, I want to thank you for making vifm!

Appreciate that!

viminfo

While the format had some resemblance with Vim's info file, it was always specific to Vifm.

May I ask what prompted the change to json files?

Despite being a shitty format, JSON is extensible and has libraries to deal with. Storing per-tab information required good extensibility or some horrible and potentially problematic syntax. I looked at other formats too, but limited myself to plain text forms and now think it wasn't necessary.

And is the reintroduction of viminfo to vifm for potentially replacing the vifminfo.json files open for discussion?

I don't think so, coming up with a suitable format is just not practical. Using some binary form of JSON or compressing text JSON could be an option, using some better structured format is also not excluded.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...