diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-11-27 16:22:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-11-27 16:22:48 +0100 |
commit | b96a7f325c9047d6a65424d40e493d3e0eff26b5 (patch) | |
tree | e1ede3b804b7e235b967d5a607eaa2d4a916fc63 /runtime | |
parent | baf0344ed7031369a0f355beb062eb4c34e35261 (diff) |
updated for version 7.4.530v7.4.530
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)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/tabpage.txt | 49 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 87 |
2 files changed, 103 insertions, 33 deletions
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 3c7ad9fe28..b795dbe552 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 tab page [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 one + :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,17 @@ 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 + +:{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,7 +201,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 begining of the tab + " list + :$tabmove " move the tab page to the end of the tab list +< :tabm[ove] +[N] :tabm[ove] -[N] diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 0098e3e521..d116c9f6c5 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -263,28 +263,56 @@ 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) - -: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. + Without {count}: Quit the current window. If {count} is + given quit the {count} 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). 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 9 windows opened + :-quit " quit the previews 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 {count} is + given close the {count} 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). + 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 @@ -298,14 +326,19 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* 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| - 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] +:{count}hid[e] + Quit the current window, unless it is the last window on the + screen. For {count} see |:quit| command. + + 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 'hidden' is restored after {cmd} has been executed. @@ -314,12 +347,16 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C* < 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| command. + 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 |