diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/editing.txt | 52 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 42 |
2 files changed, 42 insertions, 52 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index ebf524fdbb..0ad917006f 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1216,20 +1216,18 @@ use has("browsefilter"): > ============================================================================== 7. The current directory *current-directory* -You may use the |:cd|, |:tcd| and |:lcd| commands to change to another -directory, so you will not have to type that directory name in front of the -file names. It also makes a difference for executing external commands, e.g. -":!ls". +You can use |:cd|, |:tcd| and |:lcd| to change to another directory, so you +will not have to type that directory name in front of the file names. It also +makes a difference for executing external commands, e.g. ":!ls" or ":te ls". -There are three levels of working directories: global, tab and window. The -local working directory of the current window takes precedence over the local -working directory of the tab, which in turn takes precedence over the global -working directory. If a local working directory, tab or window, does not -exist, the next one in the hierarchy applies. +There are three current-directory "scopes": global, tab and window. The +window-local working directory takes precedence over the tab-local +working directory, which in turn takes precedence over the global +working directory. If a local working directory (tab or window) does not +exist, the next-higher scope in the hierarchy applies. -All commands for changing the working directory can be suffixed with an -exclamation mark (e.g. |:cd!|). This is for compatibility with Vim and will be -ignored by Neovim. +Commands for changing the working directory can be suffixed with a bang "!" +(e.g. |:cd!|) which is ignored, for compatibility with Vim. *:cd* *E747* *E472* :cd[!] On non-Unix systems: Print the current directory @@ -1254,11 +1252,10 @@ ignored by Neovim. *:chd* *:chdir* :chd[ir][!] [path] Same as |:cd|. - *:tc* *:tcd* *E5000* *E5001* *E5002* + *:tc* *:tcd* *E5000* *E5001* *E5002* :tc[d][!] {path} Like |:cd|, but set the current directory for the - current tab. The current directory for other tabs - or the local directory of windows in this tab is not - changed, except for the current window. + current tab and window. The current directory for + other tabs and windows is not changed. *:tcd-* :tcd[!] - Change to the previous current directory (before the @@ -1284,19 +1281,20 @@ ignored by Neovim. Also see |getcwd()|. So long as no |:tcd| or |:lcd| command has been used, all windows share the -same current directory. Using a command to jump to another window doesn't +same "current directory". Using a command to jump to another window doesn't change anything for the current directory. -When a |:lcd| command has been used for a window, the specified directory -becomes the current directory for that window. Windows where the |:lcd| -command has not been used stick to the tab- or global current directory. When -jumping to another window the current directory will become the last specified -local current directory. If none was specified, the tab- or global current -directory is used. + +When |:lcd| has been used for a window, the specified directory becomes the +current directory for that window. Windows where the |:lcd| command has not +been used stick to the global or tab-local directory. When jumping to another +window the current directory will become the last specified local current +directory. If none was specified, the global or tab-local directory is used. + When changing tabs the same behaviour applies. If the current tab has no local working directory the global working directory is used. When a |:cd| command is used, the current window and tab will lose their local current -directories and will use the global current directory from now on. When a -|:tcd| command is used, only the current window will lose its local working +directories and will use the global current directory from now on. When +a |:tcd| command is used, only the current window will lose its local working directory. After using |:cd| the full path name will be used for reading and writing @@ -1346,9 +1344,7 @@ There are a few things to remember when editing binary files: 9. Encryption *encryption* *:X* *E817* *E818* *E819* *E820* -Support for editing encrypted files has been removed, but may be added back in -the future. See the following discussions for more information: - +Support for editing encrypted files has been removed. https://github.com/neovim/neovim/issues/694 https://github.com/neovim/neovim/issues/701 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3e1281a021..0fdf905bd3 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1886,7 +1886,7 @@ getcmdpos() Number return cursor position in command-line getcmdtype() String return current command-line type getcmdwintype() String return current command-line window type getcurpos() List position of the cursor -getcwd( [{scope}]) String the current working directory +getcwd( [{scope}]) String the current working directory getfontname( [{name}]) String name of font being used getfperm( {fname}) String file permissions of file {fname} getfsize( {fname}) Number size in bytes of file {fname} @@ -3559,21 +3559,17 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but MoveTheCursorAround call setpos('.', save_cursor) < -getcwd([{window}[, {tab}]]) *getcwd()* - With no argument the result is a String, which is the name of the - current effective working directory. If an arguments are provided for a - window or a tabpage the working directory of that scope is returned. - - Tabs and windows are identified using their respective number. If a - number is 0 the current tab or window is implied. If one is not given - it defaults to 0. Thus - +getcwd([{window}[, {tab}]]) *getcwd()* + With no arguments the result is a String, which is the name of + the current effective working directory. With {window} or + {tab} the working directory of that scope is returned. + Tabs and windows are identified by their respective numbers, + 0 means current tab or window. Missing argument implies 0. + Thus the following are equivalent: > getcwd() getcwd(0) getcwd(0, 0) - - are all equal. If {window} is -1 it will be ignored and only the tab - will be looked at. +< If {window} is -1 it is ignored, only the tab is resolved. getfsize({fname}) *getfsize()* @@ -3909,20 +3905,18 @@ has_key({dict}, {key}) *has_key()* The result is a Number, which is 1 if |Dictionary| {dict} has an entry with key {key}. Zero otherwise. -haslocaldir([{window}[, {tab}]]) *haslocaldir()* - The result is a Number, which is 1 when the specified tabpage or window - has a local path set via |:lcd| or |:tcd|, and 0 otherwise. - - Tabs and windows are identified using their respective number. If a - number is 0 the current tab or window is implied. If one is not given - it defaults to 0. Thus - +haslocaldir([{window}[, {tab}]]) *haslocaldir()* + The result is a Number, which is 1 when the specified tabpage + or window has a local path set via |:lcd| or |:tcd|, and + 0 otherwise. + + Tabs and windows are identified by their respective numbers, + 0 means current tab or window. Missing argument implies 0. + Thus the following are equivalent: > haslocaldir() haslocaldir(0) haslocaldir(0, 0) - - are all equal. If {window} is -1 it will be ignored and only the tab - will be looked at. +< If {window} is -1 it is ignored, only the tab is resolved. hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* The result is a Number, which is 1 if there is a mapping that |