|
1 |
| -*builtin.txt* For Vim version 9.1. Last change: 2025 Aug 06 |
| 1 | +*builtin.txt* For Vim version 9.1. Last change: 2025 Aug 08 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -1783,16 +1783,23 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]])
|
1783 | 1783 | Return type: |Number|
|
1784 | 1784 |
|
1785 | 1785 |
|
1786 |
| -chdir({dir}) *chdir()* |
1787 |
| - Change the current working directory to {dir}. The scope of |
1788 |
| - the directory change depends on the directory of the current |
1789 |
| - window: |
1790 |
| - - If the current window has a window-local directory |
1791 |
| - (|:lcd|), then changes the window local directory. |
1792 |
| - - Otherwise, if the current tabpage has a local |
1793 |
| - directory (|:tcd|) then changes the tabpage local |
1794 |
| - directory. |
1795 |
| - - Otherwise, changes the global directory. |
| 1786 | +chdir({dir} [, {scope}]) *chdir()* |
| 1787 | + Changes the current working directory to {dir}. The scope of |
| 1788 | + the change is determined as follows: |
| 1789 | + If {scope} is not present, the current working directory is |
| 1790 | + changed to the scope of the current directory: |
| 1791 | + - If the window local directory (|:lcd|) is set, it |
| 1792 | + changes the current working directory for that scope. |
| 1793 | + - Otherwise, if the tab page local directory (|:tcd|) is |
| 1794 | + set, it changes the current directory for that scope. |
| 1795 | + - Otherwise, changes the global directory for that scope. |
| 1796 | + |
| 1797 | + If {scope} is present, changes the current working directory |
| 1798 | + for the specified scope: |
| 1799 | + "window" Changes the window local directory. |:lcd| |
| 1800 | + "tabpage" Changes the tab page local directory. |:tcd| |
| 1801 | + "global" Changes the global directory. |:cd| |
| 1802 | + |
1796 | 1803 | {dir} must be a String.
|
1797 | 1804 | If successful, returns the previous working directory. Pass
|
1798 | 1805 | this to another chdir() to restore the directory.
|
@@ -12353,6 +12360,11 @@ wildtrigger() *wildtrigger()*
|
12353 | 12360 | To retain normal history navigation (up/down keys): >
|
12354 | 12361 | cnoremap <Up> <C-U><Up>
|
12355 | 12362 | cnoremap <Down> <C-U><Down>
|
| 12363 | +< |
| 12364 | + To set an option specifically when performing a search, e.g. |
| 12365 | + to set 'pumheight': > |
| 12366 | + autocmd CmdlineEnter [/\?] set pumheight=8 |
| 12367 | + autocmd CmdlineLeave [/\?] set pumheight& |
12356 | 12368 | <
|
12357 | 12369 | Return value is always 0.
|
12358 | 12370 |
|
|
0 commit comments