1
0
forked from aniani/vim

patch 9.1.0568: Cannot expand paths from 'cdpath' setting

Problem:  Cannot expand paths from 'cdpath' setting
          (Daniel Hahler)
Solution: Implement 'cdpath' completion, add the new 'dir_in_path'
          completion type (LemonBoy)

fixes #374
closes: #15205

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
LemonBoy
2024-07-11 22:35:53 +02:00
committed by Christian Brabandt
parent 764526e279
commit a20bf69a3b
14 changed files with 56 additions and 21 deletions

View File

@@ -4065,6 +4065,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
customlist,{func} custom completion, defined via {func}
diff_buffer |:diffget| and |:diffput| completion
dir directory names
dir_in_path directory names in |'cdpath'|
environment environment variable names
event autocommand events
expression Vim expression

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 9.1. Last change: 2024 May 05
*map.txt* For Vim version 9.1. Last change: 2024 Jul 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1631,6 +1631,7 @@ completion can be enabled:
-complete=compiler compilers
-complete=cscope |:cscope| suboptions
-complete=dir directory names
-complete=dir_in_path directory names in |'cdpath'|
-complete=environment environment variable names
-complete=event autocommand events
-complete=expression Vim expression

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.1. Last change: 2024 Jul 04
*todo.txt* For Vim version 9.1. Last change: 2024 Jul 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -539,7 +539,6 @@ SpellCap doesn't show below a closed fold. #12420
- Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
- Problem with 'cdpath' on MS-Windows when a directory is equal to $HOME.
(2006 Jul 26, Gary Johnson)
- Completion of ":cd" doesn't use 'cdpath'. #374.
Make "g>" and "g<" in Visual mode move the text right or left.
Also for a block selection. #8558

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2024 Jul 10
*version9.txt* For Vim version 9.1. Last change: 2024 Jul 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41583,6 +41583,9 @@ Changed~
- moving in the buffer list using |:bnext| and similar commands, behaves as
documented and skips help buffers (if not run from a help buffer, else
moves to the next/previous help buffer).
- allow to complete directories from 'cdpath' for |:cd| and similar commands,
add the "cd_in_path" completion type for e.g. |:command-complete| and
|getcompletion()|
*added-9.2*
Added ~

View File

@@ -400,7 +400,7 @@ endif
syn case ignore
syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister]
" GEN_SYN_VIM: vimUserAttrbCmplt, START_STR='syn keyword vimUserAttrbCmplt contained', END_STR=''
syn keyword vimUserAttrbCmplt contained arglist augroup behave buffer color command compiler cscope diff_buffer dir environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages syntax syntime option packadd runtime shellcmd sign tag tag_listfiles user var breakpoint scriptnames
syn keyword vimUserAttrbCmplt contained arglist augroup behave buffer color command compiler cscope diff_buffer dir environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages syntax syntime option packadd runtime shellcmd sign tag tag_listfiles user var breakpoint scriptnames dir_in_path
syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError
syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%([.#]\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError