The API is experimental and having a change log is useful to have for
adjusting plugins as the implementation changes. During development of the
API things should stay fairly stable to not cause breakage too often, but
while stabilizing for v1.0 a bunch of breaking changes can happen at once. API
sections marked {deprecated} will be removed. After that all changes will be
documented in the regular ChangeLog.
0.13 to current
Upgraded Lua from 5.4.4 to 5.4.6.
Deprecated VifmView.currententry field in favour of VifmView.cursor.pos.
Patch by filterfalse.
Added VifmView.cursor.pos that provides an index of an entry under the
cursor. Patch by filterfalse.
Added VifmView.cursor:entry() that provides VifmEntry under the cursor.
This is a shortcut to VifmView:entry(VifmView.cursor.pos). Patch by
filterfalse.
Added ability to move the cursor within a view by assigning an integer to
VifmView.cursor.pos. Patch by filterfalse.
Added cursorpos field to selectors that moves the cursor within a view.
Patch by filterfalse.
Added vifm.abbrevs.add() that registers command-line abbreviations. Patch
by filterfalse.
Added vifm.stdout() to return stream to which Vifm's output was
redirected (if it was redirected, i.e. original output wasn't connected to
a TTY or character device on Windows). Thanks to gruvw.
Made VifmJob:errors() wait for receiving errors if the job has finished.
Fixed jobs created via vifm.startjob() being displayed with "UNKNOWN" for
description on the job bar.
0.13-beta to 0.13 (2023-04-04)
Added VifmView:select() and VifmView:unselect() that select and unselect
entries by indexes.
0.12.1 to 0.13-beta (2023-03-17)
Bumped API version to v0.1.0 due to bug fixes and various additions.
Additions to enabled standard libraries:
* os.getenv()
New things Lua can be used for:
* write a 'tabline' generator
* running code before exit and when a file operation is done
* starting background jobs to do something when they're over
Changed description of VifmTab:getview() without arguments to return
active pane of a global tab, which is what it was actually doing.
Added vifm.executable() that check for an executable file or command in
$PATH.
Added "onexit" callback for VifmJob.
Added vifm.input() that prompts user for input via command-line prompt.
Added events.listen() that registers a handler for an event.
Added "app.exit" event that occurs before Vifm exits normally.
Added "app.fsop" event that occurs after a successful execution of a
file-system operation.
Added VifmEntry.isdir field which is true if an entry is either a
directory or a symbolic link to a directory.
Added VifmView.custom table with information about custom file list.
Close Lua job streams when job is done.
Closed _G loophole a plugin could use to mess environment for other
plugins.
Protected against metatable manipulations in Lua.
Fixed incorrect path in Lua's editor handler on Windows.
Fixed VifmTab:getview() mistreating "pane" input field.
Fixed modules loaded via vifm.plugin.require() not having `vifm` defined.
0.12 to 0.12.1 (2022-09-21)
Upgraded Lua from 5.4.3 to 5.4.4.
Additions to enabled standard libraries:
* os.tmpname()
New things Lua can be used for:
* fully integrate an arbitrary editor by using a handler in 'vicmd' or
'vixcmd'
* defining custom keys and selectors
Added vifm.escape() that escapes input to make it suitable for use in an
external command for current value of the 'shell' option.
Added vifm.run() that runs an external command similar to :!.
Added vifm.keys.add() that registers a user-defined key or selector.
Added vifm.sessions.current() that retrieves name of the current session.
Added vifm.tabs.get() that retrieves a tab.
Added vifm.tabs.getcount() that retrieves number of open tabs.
Added vifm.tabs.getcurrent() that retrieves index of current tab.
Added VifmEntry:mimetype() that gets a MIME type.
Added VifmTab:getlayout() that retrieves layout of a global tab or shared
TUI state for a pane tab.
Added VifmTab:getname() that retrieves name of the tab if it was set.
Added VifmTab:getview() that returns view managed by the tab.
Completors of a Lua-defined :command can now provide descriptions of
completion items.
0.11 to 0.12 (2021-09-29)
The following standard libraries are enabled:
* basic (core global functions)
* table manipulation (`tbl` table)
* package library (`require` global and `package` table)
* string manipulation (`string` table)
* input and output (`io` table)
* mathematical functions (`math` table)
* time subset of OS facilities (`clock`, `date`, `difftime` and `time`
elements of `os` table)
This is what one can do by using Lua at the moment:
* commands with completion
* save and reset options (e.g., some kind of presets)
* custom columns
* filetype/filextype/fileviewer/%q handlers
* 'statusline' generator
* starting background jobs that appear on a job bar
Added vifm.addcolumntype() that registers a new view column type to be
used in 'viewcolumns' option.
Added vifm.addhandler() that registers a new handler that will be
accessible in viewers.
Added vifm.currview() that retrieves a reference to current view.
Added vifm.otherview() that retrieves a reference to other view.
Added vifm.errordialog() that displays error dialog.
Added vifm.expand() that expands environment variables and macros in a
string.
Added vifm.fnamemodify() that changes path according to modifiers.
Added vifm.exists() that checks existence of a path without resolving
symbolic links.
Added vifm.makepath() that creates target path and missing intermediate
directories.
Added vifm.startjob() that launches an external command.
Added vifm.cmds.add() that registers a new :command of a kind that's
equivalent to builtin commands.
Added vifm.cmds.command() that registers a new :command that works exactly
as those registered using :command builtin command.
Added vifm.cmds.delcommand() that removes :command added by
vifm.cmds.command(), basically being an equivalent of :delcommand builtin
command.
Added vifm.opts.global table that provides access to global options.
Added vifm.plugin.name field that provides name of the plugin.
Added vifm.plugin.path field that provides full path to plugin's root
directory.
Added vifm.plugin.require() that serves as plugin-specific `require`,
which loads Lua modules relative to plugin's root.
Added vifm.plugins.all table that contains all plugins indexed by their
names.
Added vifm.sb.info() that displays a regular message on statusbar.
Added vifm.sb.error() that displays an error message on statusbar.
Added vifm.sb.quick() that displays a quick message on statusbar.
Added vifm.version.app.str field that provides version of Vifm as a
string.
Added vifm.version.api.major field that provides major version of Lua API.
Added vifm.version.api.minor field that provides minor version of Lua API.
Added vifm.version.api.patch field that provides patch version of Lua API.
Added vifm.version.api.has() that will check presence of features some
day.
Added vifm.version.api.atleast() that checks version of Lua API.
Added VifmEntry.classify table that describes name decorations.
Added VifmEntry.name field that provides name of the file.
Added VifmEntry.location field that provides location of the file.
Added VifmEntry.size field that provides size of the file in bytes.
Added VifmEntry.atime field that provides file access time (e.g., read,
executed).
Added VifmEntry.ctime field that provides file change time (changes in
metadata, like mode).
Added VifmEntry.mtime field that provides file modification time (when
file contents is changed).
Added VifmEntry.type field that provides type of the entry.
Added VifmEntry.folded field that shows whether this entry is folded.
Added VifmEntry.selected field that shows whether this entry is selected.
Added VifmEntry.match field that shows whether this entry is a search
match.
Added VifmEntry.matchstart field that provides start position of a
substring found in file's name.
Added VifmEntry.matchend field that provides end position of a substring
found in file's name.
Added VifmEntry:gettarget() that gets target of a symbolic link (not to be
confused with real path resolution).
Added VifmJob:wait() that waits for the job to finish.
Added VifmJob:exitcode() that retrieves exit code of the job.
Added VifmJob:stdin() that retrieves stream associated with standard input
of the job.
Added VifmJob:stdout() that retrieves stream associated with standard
output of the job.
Added VifmJob:errors() that retrieves data collected from error stream of
the job.
Added VifmView.locopts table of location-specific values of view-specific
options.
Added VifmView.viewopts table of "global" values of view-specific options.
Added VifmView.currententry field that provides index of the current
entry.
Added VifmView.cwd field that provides location of the current view.
Added VifmView.entrycount field that provides number of entries in the
view.
Added VifmView:cd() that changes location of the view.
Added VifmView:entry() that retrieves an entry by index.
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master