diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-12-25 21:10:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-25 21:10:44 -0500 |
commit | 1dcdf86849d58d6ff5c2ca6728657e7305226a36 (patch) | |
tree | 019021929437d1bae0d27cfb24d312e616f40102 /runtime | |
parent | 8bc7c6fab94a56f034ed459038fa17918886d22e (diff) | |
parent | a5d3dd9359cd727f7c2e89b9b3951d55df4acf5d (diff) | |
download | rneovim-1dcdf86849d58d6ff5c2ca6728657e7305226a36.tar.gz rneovim-1dcdf86849d58d6ff5c2ca6728657e7305226a36.tar.bz2 rneovim-1dcdf86849d58d6ff5c2ca6728657e7305226a36.zip |
Merge pull request #16618 from zeertzjq/vim-8.2.3780
vim-patch:8.2.{3780,3784}: ":cd" works differently on MS-Windows
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/editing.txt | 10 | ||||
-rw-r--r-- | runtime/doc/options.txt | 8 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 1 | ||||
-rw-r--r-- | runtime/optwin.vim | 4 |
4 files changed, 18 insertions, 5 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 4e3173cfa9..14df41e6c8 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1253,10 +1253,12 @@ working directory. If a local working directory (tab or window) does not exist, the next-higher scope in the hierarchy applies. *:cd* *E747* *E472* -:cd[!] On non-Unix systems: Print the current directory - name. On Unix systems: Change the current directory - to the home directory. Use |:pwd| to print the - current directory on all systems. +:cd[!] On non-Unix systems when 'cdhome' is off: Print the + current directory name. + Otherwise: Change the current directory to the home + directory. Clear any window-local directory. + Use |:pwd| to print the current directory on all + systems. :cd[!] {path} Change the current directory to {path}. If {path} is relative, it is searched for in the diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b75dd78b57..c929178f5a 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1159,6 +1159,14 @@ A jump table for the options with a short description can be found at |Q_op|. case mapping, the current locale is not effective. This probably only matters for Turkish. + *'cdhome'* *'cdh'* +'cdhome' 'cdh' boolean (default: off) + global + When on, |:cd|, |:tcd| and |:lcd| without an argument changes the + current working directory to the |$HOME| directory like in Unix. + When off, those commands just print the current directory name. + On Unix this option has no effect. + *'cdpath'* *'cd'* *E344* *E346* 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") global diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index a229c8742f..af8301f1a0 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -629,6 +629,7 @@ Short explanation of each option: *option-list* 'buflisted' 'bl' whether the buffer shows up in the buffer list 'buftype' 'bt' special type of buffer 'casemap' 'cmp' specifies how case of letters is changed +'cdhome' 'cdh' change directory to the home directory by ":cd" 'cdpath' 'cd' list of directories searched with ":cd" 'cedit' key used to open the command-line window 'charconvert' 'ccv' expression for character encoding conversion diff --git a/runtime/optwin.vim b/runtime/optwin.vim index d4c10f7afa..c873252909 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2020 Oct 27 +" Last Change: 2021 Dec 12 " If there already is an option window, jump to that one. let buf = bufnr('option-window') @@ -261,6 +261,8 @@ call <SID>OptionG("sect", §) call append("$", "path\tlist of directory names used for file searching") call append("$", "\t(global or local to buffer)") call <SID>OptionG("pa", &pa) +call <SID>AddOption("cdhome", ":cd without argument goes to the home directory") +call <SID>BinOptionG("cdh", &cdh) call append("$", "cdpath\tlist of directory names used for :cd") call <SID>OptionG("cd", &cd) if exists("+autochdir") |