Difference between revisions of "Quitting Vifm"

From Vifm Wiki
Jump to navigation Jump to search
(→‎Preserving runtime state across sessions: Fill in table of vifminfo values)
Line 9: Line 9:
 
# On startup Vifm loads reads <code>vifmrc</code>, which normally contains <code>set vifminfo=...</code> and restores from <code>vifminfo</code> only items that correspond to that values.
 
# On startup Vifm loads reads <code>vifmrc</code>, which normally contains <code>set vifminfo=...</code> and restores from <code>vifminfo</code> only items that correspond to that values.
  
''By default'' only bookmarks are stored.
+
By default only bookmarks are stored.
  
 
Below is the table of all possible values.  Note those marked as ''obsolete'', they might be removed
 
Below is the table of all possible values.  Note those marked as ''obsolete'', they might be removed
Line 15: Line 15:
 
to put commands that correspond to this items into <code>vifmrc</code>).
 
to put commands that correspond to this items into <code>vifmrc</code>).
  
'''TODO:''' table of things that can be stored (mark old-style things like commands and options as '''obsolete''').
 
 
{| class="wikitable"
 
{| class="wikitable"
|+Possible members of <code>vifminfo</code> value
+
|+Available elements of <code>vifminfo</code> value
! width="200px" | Value
+
! width="70px" | Value
! width="200px" | Default
+
! width="65px" | Default
! width="200px" | Obsolete
+
! width="600px" | Description
! width="525px" | Description
 
 
|-
 
|-
|  ||  ||  ||
+
| bookmarks ||! align="center" | Yes || Bookmarks, except special ones like <code>'&lt;</code> and <code>'&gt;</code>.
 +
|-
 +
| tui      ||! align="center" | No  || State of the user interface (sorting, number of windows, quick view state, active view).
 +
|-
 +
| dhistory  ||! align="center" | No  || Directory history.
 +
|-
 +
| state    ||! align="center" | No  || File name and dot filters and terminal multiplexers integration state.
 +
|-
 +
| cs        ||! align="center" | No  || Primary color scheme.
 +
|-
 +
| savedirs  ||! align="center" | No  || Save last visited directory (requires <code>dhistory</code>).
 +
|-
 +
| chistory  ||! align="center" | No  || Command line history.
 +
|-
 +
| shistory  ||! align="center" | No  || Search history (<code>/</code> and <code>?</code> commands).
 +
|-
 +
| phistory  ||! align="center" | No  || Prompt history.
 +
|-
 +
| fhistory  ||! align="center" | No || Local filter history.
 +
|-
 +
| dirstack ||! align="center" | No  || Directory stack overwrites previous stack, unless stack of current session is empty.
 +
|-
 +
| registers ||! align="center" | No  || Registers content.
 +
|-
 +
! colspan="4" align="center" font="bold" | Obsolete
 +
|-
 +
| options  ||! align="center" | No  || All options that can be set with the :set command.
 +
|-
 +
| filetypes ||! align="center" | No  || Associated programs and viewers.
 +
|-
 +
| commands  ||! align="center" | No || User defined commands.
 
|}
 
|}
  

Revision as of 20:55, 13 September 2014

Preserving runtime state across sessions

As described in Configuration model, Vifm can store some information between invocations in vifminfo file. What exactly is stored depends on the value of 'vifminfo' option. The option enumerates values elements of run-time state that can be saved on exit and restored on startup. It works this way:

  1. On exit Vifm stores all th is listed in vifminfo.
  2. On startup Vifm loads reads vifmrc, which normally contains set vifminfo=... and restores from vifminfo only items that correspond to that values.

By default only bookmarks are stored.

Below is the table of all possible values. Note those marked as obsolete, they might be removed in future versions (for a good reason: they don't fit into usual way configuration fails are used; it's better to put commands that correspond to this items into vifmrc).

Available elements of vifminfo value
Value Default Description
bookmarks Yes Bookmarks, except special ones like '< and '>.
tui No State of the user interface (sorting, number of windows, quick view state, active view).
dhistory No Directory history.
state No File name and dot filters and terminal multiplexers integration state.
cs No Primary color scheme.
savedirs No Save last visited directory (requires dhistory).
chistory No Command line history.
shistory No Search history (/ and ? commands).
phistory No Prompt history.
fhistory No Local filter history.
dirstack No Directory stack overwrites previous stack, unless stack of current session is empty.
registers No Registers content.
Obsolete
options No All options that can be set with the :set command.
filetypes No Associated programs and viewers.
commands No User defined commands.

TODO: merging of state.

Remembering last visited directories of panes

TODO: how it affects starting Vifm without arguments.

Quitting Vifm started in file picker mode (e.g. from Vim plugin)

TODO: -f command-line argument.

TODO: running commands store selection and quit.

TODO: selection storage.

TODO: example for shell.

Updating shell directory after leaving Vifm

See How to set shell working directory after leaving Vifm.