vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 52402eb36bd6039dd648ff14876d28c285cc9ecf parent 6789e9f2c56bcaebfc62956d84dece8daf891bd1 Author: Christian Hesse <mail@eworm.de> Date: Thu, 2 Feb 2017 11:56:22 +0100 update comment and readme about lua path Commit ce21cefc removed the lexers sub directory from the Lua search path. Update the comment and readme to reflect this change. Diffstat:
| M | lua/lexers/README.md | | | 3 | ++- |
| M | vis-lua.c | | | 10 | +++++----- |
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/lua/lexers/README.md b/lua/lexers/README.md @@ -13,9 +13,10 @@ Vis searches the lexers in the following locations (check the end of the * `./lua/lexers` relative to the binary location (using `/proc/self/exe`) * `$XDG_CONFIG_HOME/vis/lexers` where `$XDG_CONFIG_HOME` refers to `$HOME/.config` if unset. + * `/etc/vis/lexers` * `/usr/local/share/vis/lexers` or `/usr/share/vis/lexers` depending on the build configuration - * `package.path` (standard lua search path) + * `package.path` the standard Lua search path is queried for `lexers/$name` At runtime a specific lexer can be loded by means of `:set syntax <name>` where `<name>` corresponds to the filename without the `.lua` extension. diff --git a/vis-lua.c b/vis-lua.c @@ -2183,11 +2183,11 @@ void vis_lua_init(Vis *vis) { vis_lua_path_strip(vis); /* extends lua's package.path with: - * - $VIS_PATH/{,lexers} - * - {,lexers} relative to the binary location - * - $XDG_CONFIG_HOME/vis/{,lexers} (defaulting to $HOME/.config/vis/{,lexers}) - * - /etc/vis/{,lexers} (for system-wide configuration provided by administrator) - * - /usr/local/share/vis/{,lexers} (or whatever is specified during ./configure) + * - $VIS_PATH + * - ./lua (relative path to the binary location) + * - $XDG_CONFIG_HOME/vis (defaulting to $HOME/.config/vis) + * - /etc/vis (for system-wide configuration provided by administrator) + * - /usr/(local/)?share/vis (or whatever is specified during ./configure) * - package.path (standard lua search path) */ char path[PATH_MAX];