diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-01-10 20:27:17 -0300 |
---|---|---|
committer | Felipe Morales <hel.sheep@gmail.com> | 2015-04-28 23:08:30 -0300 |
commit | 86330fdd3f39a8975b25b7050a3d02b77a442057 (patch) | |
tree | 51f60759b67fec7740cc7a6adbb9c2bac4395b73 /runtime | |
parent | 6a8862ded4d6f1693ac591ac8e47d1acbd044c49 (diff) | |
download | rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.tar.gz rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.tar.bz2 rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.zip |
vim-patch:7.4.530-531
Specify different kinds of counts for commands.
Updated ex commands generator scripts.
Includes fixes to comments from patch 7.4.531
Original message:
Problem: Many commands take a count or range that is not using line
numbers.
Solution: For each command specify what kind of count it uses. For
windows, buffers and arguments have "$" and "." have a
relevant
meaning. (Marcin Szamotulski)
https://code.google.com/p/vim/source/detail?r=v7-4-530
https://code.google.com/p/vim/source/detail?r=v7-4-531
Add legacy tests for 7.4.530
https://code.google.com/p/vim/source/detail?r=1e6d87a36dcdca231721dde8cbbc26610fb3df27
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/tabpage.txt | 49 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 81 |
2 files changed, 98 insertions, 32 deletions
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index dd3a031020..479c2cb455 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -61,16 +61,25 @@ In the GUI tab pages line you can use the right mouse button to open menu. :[count]tabe[dit] *:tabe* *:tabedit* *:tabnew* :[count]tabnew Open a new tab page with an empty window, after the current - tab page. For [count] see |:tab| below. + tab page. If [count] is given the new tab page appears after + the tabpage [count] otherwise the new tab page will appear + after the current one. > + :tabnew " opens tabpage after the current one + :.tabnew " as above + :+tabnew " opens tabpage after the next tab page + " note: it is one further than :tabnew + :-tabnew " opens tabpage before the current + :0tabnew " opens tabpage before the first one + :$tabnew " opens tabpage after the last one :[count]tabe[dit] [++opt] [+cmd] {file} :[count]tabnew [++opt] [+cmd] {file} Open a new tab page and edit {file}, like with |:edit|. - For [count] see |:tab| below. + For [count] see |:tabnew| above. :[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind* Open a new tab page and edit {file} in 'path', like with - |:find|. For [count] see |:tab| below. + |:find|. For [count] see |:tabnew| above. {not available when the |+file_in_path| feature was disabled at compile time} @@ -110,12 +119,18 @@ something else. - When 'hidden' is not set, [!] is not used, a buffer has changes, and there is no other window on this buffer. Changes to the buffer are not written and won't get lost, so - this is a "safe" command. + this is a "safe" command. > + :tabclose " close the current tab page +:{count}tabc[lose][!] :tabc[lose][!] {count} Close tab page {count}. Fails in the same way as `:tabclose` - above. - + above. > + :-tabclose " close the previous tab page + :+tabclose " close the next tab page + :1tabclose " close the first tab page + :$tabclose " close the last tab page +< *:tabo* *:tabonly* :tabo[nly][!] Close all other tab pages. When the 'hidden' option is set, all buffers in closed windows @@ -124,7 +139,16 @@ something else. modified buffers are written. Otherwise, windows that have buffers that are modified are not removed, unless the [!] is given, then they become hidden. But modified buffers are - never abandoned, so changes cannot get lost. + never abandoned, so changes cannot get lost. > + :tabonly " close all tab pages except the current one + +:{count}tabo[nly][!] + Close all tab pages except the {count}th one. > + :.tabonly " one + :-tabonly " close all tab pages except the previous one + :+tabonly " close all tab pages except the next one + :1tabonly " close all tab pages except the first one + :$tabonly " close all tab pages except the last one. SWITCHING TO ANOTHER TAB PAGE: @@ -176,8 +200,15 @@ REORDERING TAB PAGES: :[N]tabm[ove] Move the current tab page to after tab page N. Use zero to make the current tab page the first one. Without N the tab - page is made the last one. - + page is made the last one. > + :-tabmove " move the tab page to the left + :tabmove " move the tab page to the right + :.tabmove " as above + :+tabmove " as above + :0tabmove " move the tab page to the beginning of the tab + " list + :$tabmove " move the tab page to the end of the tab list +< :tabm[ove] +[N] :tabm[ove] -[N] Move the current tab page N places to the right (with +) or to diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 0098e3e521..4c1ec0c0fd 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -263,28 +263,54 @@ left of the Vim window. Closing a window ---------------- +:q[uit] +:{count}q[uit] CTRL-W q *CTRL-W_q* CTRL-W CTRL-Q *CTRL-W_CTRL-Q* -:q[uit] Quit current window. When quitting the last window (not - counting a help window), exit Vim. - When 'hidden' is set, and there is only one window for the - current buffer, it becomes hidden. - When 'hidden' is not set, and there is only one window for the - current buffer, and the buffer was changed, the command fails. - (Note: CTRL-Q does not work on all terminals) + Without {count}: Quit the current window. If {count} is + given quit the {count} window -:q[uit]! Quit current window. If this was the last window for a buffer, - any changes to that buffer are lost. When quitting the last - window (not counting help windows), exit Vim. The contents of - the buffer are lost, even when 'hidden' is set. + When quitting the last window (not counting a help window), + exit Vim. + When 'hidden' is set, and there is only one window for the + current buffer, it becomes hidden. When 'hidden' is not set, + and there is only one window for the current buffer, and the + buffer was changed, the command fails. + (Note: CTRL-Q does not work on all terminals). + If [count] is greater than the last window number the last + window will be closed: > + :1quit " quit the first window + :$quit " quit the last window + :9quit " quit the last window + " if there are less than windows opened + :-quit " quit the previous window + :+quit " quit the next window + :+2quit " will also work as expected +< +:q[uit]! +:{count}q[uit]! + Without {count}: Quit the current window. If {count} is + given quit the {count} window + If this was the last window for a buffer, any changes to that + buffer are lost. When quitting the last window (not counting + help windows), exit Vim. The contents of the buffer are lost, + even when 'hidden' is set. + +:clo[se][!] +:{count}clo[se][!] CTRL-W c *CTRL-W_c* *:clo* *:close* -:clo[se][!] Close current window. When the 'hidden' option is set, or - when the buffer was changed and the [!] is used, the buffer - becomes hidden (unless there is another window editing it). + Without {count}: Close the current window. If given close the + {count} window. + + When 'hidden' is set, or when the buffer was changed and the + [!] is used, the buffer becomes hidden (unless there is another + window editing it). + When there is only one window in the current tab page and there is another tab page, this closes the current tab page. |tab-page|. + This command fails when: *E444* - There is only one window on the screen. - When 'hidden' is not set, [!] is not used, the buffer has @@ -297,29 +323,38 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* window, but that does not work, because the CTRL-C cancels the command. - *:hide* -:hid[e] Quit current window, unless it is the last window on the - screen. The buffer becomes hidden (unless there is another - window editing it or 'bufhidden' is "unload" or "delete"). - If the window is the last one in the current tab page the tab - page is closed. |tab-page| + *:hide* +:hid[e] +:{count}hid[e] + Quit the current window, unless it is the last window on the + screen. For {count} see |:quit|. + + The buffer becomes hidden (unless there is another window + editing it or 'bufhidden' is `unload` or `delete`). If the + window is the last one in the current tab page the tab page is + closed. |tab-page| + The value of 'hidden' is irrelevant for this command. Changes to the buffer are not written and won't get lost, so this is a "safe" command. -:hid[e] {cmd} Execute {cmd} with 'hidden' is set. The previous value of +:hid[e] {cmd} Execute {cmd} with 'hidden' set. The previous value of 'hidden' is restored after {cmd} has been executed. Example: > :hide edit Makefile < This will edit "Makefile", and hide the current buffer if it has any changes. +:on[ly][!] +:{count}on[ly][!] CTRL-W o *CTRL-W_o* *E445* CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only* -:on[ly][!] Make the current window the only one on the screen. All other - windows are closed. + Make the current window the only one on the screen. All other + windows are closed. For {count} see |:quit|. + When the 'hidden' option is set, all buffers in closed windows become hidden. + When 'hidden' is not set, and the 'autowrite' option is set, modified buffers are written. Otherwise, windows that have buffers that are modified are not removed, unless the [!] is |