docs: graduate gui.txt to "flow layout"

This commit is contained in:
Justin M. Keyes
2024-12-05 01:38:44 +01:00
parent 6586645d78
commit 5413c6475e
2 changed files with 230 additions and 227 deletions

View File

@@ -226,14 +226,15 @@ tooltips for menus. See |terminal-input|.
Special characters in a menu name:
*menu-shortcut*
& The next character is the shortcut key. Make sure each
shortcut key is only used once in a (sub)menu. If you want to
insert a literal "&" in the menu name use "&&".
- & The next character is the shortcut key. Make sure each shortcut key is
only used once in a (sub)menu. If you want to insert a literal "&" in the
menu name use "&&".
*menu-text*
<Tab> Separates the menu name from right-aligned text. This can be
used to show the equivalent typed command. The text "<Tab>"
can be used here for convenience. If you are using a real
tab, don't forget to put a backslash before it!
- <Tab> Separates the menu name from right-aligned text. This can be used to
show the equivalent typed command. The text "<Tab>" can be used here for
convenience. If you are using a real tab, don't forget to put a backslash
before it!
Example: >
:amenu &File.&Open<Tab>:e :browse e<CR>
@@ -246,14 +247,14 @@ is right aligned, and the "O" is underlined, to indicate it is the shortcut.
*:am* *:amenu* *:an* *:anoremenu*
The ":amenu" command can be used to define menu entries for all modes at once,
except for Terminal mode. To make the command work correctly, a character is
automatically inserted for some modes:
mode inserted appended ~
automatically inserted for some modes: >
mode inserted appended
Normal nothing nothing
Visual <C-C> <C-\><C-G>
Insert <C-\><C-O>
Cmdline <C-C> <C-\><C-G>
Op-pending <C-C> <C-\><C-G>
<
Example: >
:amenu File.Next :next^M
@@ -327,7 +328,7 @@ the right. The priority is given as a number before the ":menu" command.
Example: >
:80menu Buffer.next :bn<CR>
The default menus have these priorities:
The default menus have these priorities: >
File 10
Edit 20
Tools 40
@@ -335,7 +336,7 @@ The default menus have these priorities:
Buffers 60
Window 70
Help 9999
<
When no or zero priority is given, 500 is used.
The priority for the PopUp menu is not used.
@@ -386,7 +387,7 @@ the 'toolbar' option. You can choose between an image, text or both.
*toolbar-icon*
The toolbar is defined as a special menu called ToolBar, which only has one
level. Vim interprets the items in this menu as follows:
1) If an "icon=" argument was specified, the file with this name is used.
- 1 If an "icon=" argument was specified, the file with this name is used.
The file can either be specified with the full path or with the base name.
In the last case it is searched for in the "bitmaps" directory in
'runtimepath', like in point 3. Examples: >
@@ -398,11 +399,11 @@ level. Vim interprets the items in this menu as follows:
A space in the file name must be escaped with a backslash.
A menu priority must come _after_ the icon argument: >
:amenu icon=foo 1.42 ToolBar.Foo :echo "42!"<CR>
2) An item called 'BuiltIn##', where ## is a number, is taken as number ## of
- 2 An item called 'BuiltIn##', where ## is a number, is taken as number ## of
the built-in bitmaps available in Vim. Currently there are 31 numbered
from 0 to 30 which cover most common editing operations |builtin-tools|. >
:amenu ToolBar.BuiltIn22 :call SearchNext("back")<CR>
3) An item with another name is first searched for in the directory
- 3 An item with another name is first searched for in the directory
"bitmaps" in 'runtimepath'. If found, the bitmap file is used as the
toolbar button image. Note that the exact filename is OS-specific: For
example, under Win32 the command >
@@ -414,48 +415,49 @@ level. Vim interprets the items in this menu as follows:
The light grey pixels will be changed to the Window frame color and the
dark grey pixels to the window shadow color. More colors might also work,
depending on your system.
4) If the bitmap is still not found, Vim checks for a match against its list
- 4 If the bitmap is still not found, Vim checks for a match against its list
of built-in names. Each built-in button image has a name.
So the command >
:amenu ToolBar.Open :e
< will show the built-in "open a file" button image if no open.bmp exists.
All the built-in names can be seen used in menu.vim.
5) If all else fails, a blank, but functioning, button is displayed.
- 5 If all else fails, a blank, but functioning, button is displayed.
*builtin-tools*
nr Name Normal action ~
00 New open new window
01 Open browse for file to open in current window
02 Save write buffer to file
03 Undo undo last change
04 Redo redo last undone change
05 Cut delete selected text to clipboard
06 Copy copy selected text to clipboard
07 Paste paste text from clipboard
08 Print print current buffer
09 Help open a buffer on Vim's builtin help
10 Find start a search command
11 SaveAll write all modified buffers to file
12 SaveSesn write session file for current situation
13 NewSesn write new session file
14 LoadSesn load session file
15 RunScript browse for file to run as a Vim script
16 Replace prompt for substitute command
17 WinClose close current window
18 WinMax make current window use many lines
19 WinMin make current window use few lines
20 WinSplit split current window
21 Shell start a shell
22 FindPrev search again, backward
23 FindNext search again, forward
24 FindHelp prompt for word to search help for
25 Make run make and jump to first error
26 TagJump jump to tag under the cursor
27 RunCtags build tags for files in current directory
28 WinVSplit split current window vertically
29 WinMaxWidth make current window use many columns
30 WinMinWidth make current window use few columns
>
nr Name Normal action
00 New open new window
01 Open browse for file to open in current window
02 Save write buffer to file
03 Undo undo last change
04 Redo redo last undone change
05 Cut delete selected text to clipboard
06 Copy copy selected text to clipboard
07 Paste paste text from clipboard
08 Print print current buffer
09 Help open a buffer on Vim's builtin help
10 Find start a search command
11 SaveAll write all modified buffers to file
12 SaveSesn write session file for current situation
13 NewSesn write new session file
14 LoadSesn load session file
15 RunScript browse for file to run as a Vim script
16 Replace prompt for substitute command
17 WinClose close current window
18 WinMax make current window use many lines
19 WinMin make current window use few lines
20 WinSplit split current window
21 Shell start a shell
22 FindPrev search again, backward
23 FindNext search again, forward
24 FindHelp prompt for word to search help for
25 Make run make and jump to first error
26 TagJump jump to tag under the cursor
27 RunCtags build tags for files in current directory
28 WinVSplit split current window vertically
29 WinMaxWidth make current window use many columns
30 WinMinWidth make current window use few columns
<
*hidden-menus* *win32-hidden-menus*
In the Win32 GUI, starting a menu name with ']' excludes that menu from the
main menu bar. You must then use the |:popup| command to display it.
@@ -515,13 +517,13 @@ Executing Menus *execute-menus*
:emenu File.Exit
:[range]em[enu] {mode} {menu} Like above, but execute the menu for {mode}:
'n': |:nmenu| Normal mode
'v': |:vmenu| Visual mode
's': |:smenu| Select mode
'o': |:omenu| Operator-pending mode
't': |:tlmenu| Terminal mode
'i': |:imenu| Insert mode
'c': |:cmenu| Cmdline mode
- 'n': |:nmenu| Normal mode
- 'v': |:vmenu| Visual mode
- 's': |:smenu| Select mode
- 'o': |:omenu| Operator-pending mode
- 't': |:tlmenu| Terminal mode
- 'i': |:imenu| Insert mode
- 'c': |:cmenu| Cmdline mode
You can use :emenu to access useful menu items you may have got used to from
@@ -659,4 +661,4 @@ This creates a popup menu that doesn't exist on the main menu-bar.
Note that a menu that starts with ']' will not be displayed.
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
vim:tw=78:sw=4:ts=8:et:ft=help:norl:

View File

@@ -70,6 +70,7 @@ local new_layout = {
['dev_vimpatch.txt'] = true,
['editorconfig.txt'] = true,
['faq.txt'] = true,
['gui.txt'] = true,
['lua.txt'] = true,
['luaref.txt'] = true,
['news.txt'] = true,