add 'setlocal' for directory specific options (#1381)
* add 'setlocal' for option 'sortby' * save each local option separately * add 'setlocal' for option 'reverse' * add 'setlocal' for option 'dirfirst' * add 'setlocal' for option 'hidden' * add 'setlocal' for option 'dironly' * add 'setlocal' for option 'info' * add boolean toggling for 'setlocal' options * check if the path is absolute for 'setlocal' * add 'setlocal' options to completion * add tests for 'setlocal' * add 'setlocal' to the documentation * use trailing '/' in 'setlocal' for subdir matching * cleanup * add 'setlocal' subdirs to the documentation
This commit is contained in:
1 parent
990cea7e04
commit
8d013c9375
10 files changed
+486
-31
No files matched your search
@@ -1125,7 +1125,7 @@ Characters from '#' to newline are comments and ignored:
|
||||
|
||||
# comments start with '#'
|
||||
|
||||
There are four special commands ('set', 'map', 'cmap', and 'cmd') for configuration.
|
||||
There are five special commands ('set', 'setlocal', 'map', 'cmap', and 'cmd') for configuration.
|
||||
|
||||
Command 'set' is used to set an option which can be boolean, integer, or string:
|
||||
|
||||
@@ -1139,6 +1139,21 @@ Command 'set' is used to set an option which can be boolean, integer, or string:
|
||||
set sortby 'time' # string value with single quotes (whitespaces)
|
||||
set sortby "time" # string value with double quotes (backslash escapes)
|
||||
|
||||
Command 'setlocal' is used to set a local option for a directory which can be boolean or string.
|
||||
Currently supported local options are 'dirfirst', 'dironly', 'hidden', 'info', 'reverse', and 'sortby'.
|
||||
Adding a trailing path separator (i.e. '/' for Unix and '\' for Windows) sets the option for the given directory along with its subdirectories:
|
||||
|
||||
setlocal /foo/bar hidden # boolean enable
|
||||
setlocal /foo/bar hidden true # boolean enable
|
||||
setlocal /foo/bar nohidden # boolean disable
|
||||
setlocal /foo/bar hidden false # boolean disable
|
||||
setlocal /foo/bar hidden! # boolean toggle
|
||||
setlocal /foo/bar sortby time # string value w/o quotes
|
||||
setlocal /foo/bar sortby 'time' # string value with single quotes (whitespaces)
|
||||
setlocal /foo/bar sortby "time" # string value with double quotes (backslash escapes)
|
||||
setlocal /foo/bar hidden # for only '/foo/bar' directory
|
||||
setlocal /foo/bar/ hidden # for '/foo/bar' and its subdirectories (e.g. '/foo/bar/baz')
|
||||
|
||||
Command 'map' is used to bind a key to a command which can be builtin command, custom command, or shell command:
|
||||
|
||||
map gh cd ~ # builtin command
|
||||
|
||||
Reference in new issue
Block a user