Closed tbung closed 3 years ago
I just noticed it also sets other configuration values such as relative line numbers. I will change the title accordingly.
I updated the README yesterday:
The idea for Ataraxis and Minimalis is to have a centralized configuration, however, this was suggested by another issue like two days ago so I decided to implement it... From the README:
store_and_restore_settings
: (Boolean) if true, ignores values of all the UI
element's tables that have the shown_
prefix and stores the ones from the user config; it will also restore them when required. To avoid certain incrongruences and increase speed, the plugin stores this values only once, when any of the UI
related commands, :TZAtaraxis
, :TZMinimalist
and/or variants are called. If, for example, were to setlocal relativenumber
after already running any of the aforementioned commands, this won't be stored.show_vals_to_read
: (Table of strings) Depends on store_and_restore_settings
being set to true
. These strings must have the same name of their equivalent in the UI
tables that have the shown_
prefix (e.g: "shown_showtabline"
) and must be separated by commas. A great application for this is, for example, if your plugin for showing the bufferline had enabled a setting for hiding it when there is only one buffer. If you were to enter Minimalist or Ataraxis mode, the plugin will store the settings that correspond for when the bufferline is hidden (top
UI), and thus, if you opened new buffers the bufferline will not appear. For this you could simply add "shown_showtabline"
to this table and set the value of shown_showtabline
from the top = {}
table! Here is what this example looks likeminimalist = {
store_and_restore_settings = true,
show_vals_to_read = {
"shown_showtabline"
}
}
If you wanted to have the showtabline
setting to have a value centralized in TrueZen's config when exiting Ataraxis or Minimalist, add it to the show_vals_to_read = {}
.
Entering and then leaving Ataraxis and Minimalist mode sets
showtabline=2
instead of resetting it to the previous value (which in my case isshowtabline=0
). This can of course be circumvented using the event callbacks, but I think by default it should reset to the previous configuration instead of changing things permanently. If this is intended behaviour this issue can be closed.