comparison runtime/doc/gui.txt @ 236:4707450c2b33

updated for version 7.0066
author vimboss
date Fri, 15 Apr 2005 21:00:38 +0000
parents 98435a8ddb09
children 250611b3068d
comparison
equal deleted inserted replaced
235:23d380e32c95 236:4707450c2b33
1 *gui.txt* For Vim version 7.0aa. Last change: 2005 Jan 14 1 *gui.txt* For Vim version 7.0aa. Last change: 2005 Apr 11
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
182 indicates the fraction of the buffer which can be seen in the window. 182 indicates the fraction of the buffer which can be seen in the window.
183 When the scrollbar is dragged all the way down, the last line of the file 183 When the scrollbar is dragged all the way down, the last line of the file
184 will appear in the top of the window. 184 will appear in the top of the window.
185 185
186 If a window is shrunk to zero height (by the growth of another window) its 186 If a window is shrunk to zero height (by the growth of another window) its
187 scrollbar disappears. It reappears when the window is restored. 187 scrollbar disappears. It reappears when the window is restored.
188 188
189 If a window is vertically split, it will get a scrollbar when it is the 189 If a window is vertically split, it will get a scrollbar when it is the
190 current window and when, taking the middle of the current window and drawing a 190 current window and when, taking the middle of the current window and drawing a
191 vertical line, this line goes through the window. 191 vertical line, this line goes through the window.
192 When there are scrollbars on both sides, and the middle of the current window 192 When there are scrollbars on both sides, and the middle of the current window
406 used - you should read whichever of these is appropriate now). 406 used - you should read whichever of these is appropriate now).
407 407
408 *clipboard* 408 *clipboard*
409 There is a special register for storing this selection, it is the "* 409 There is a special register for storing this selection, it is the "*
410 register. Nothing is put in here unless the information about what text is 410 register. Nothing is put in here unless the information about what text is
411 selected is about to change (eg with a left mouse click somewhere), or when 411 selected is about to change (e.g. with a left mouse click somewhere), or when
412 another application wants to paste the selected text. Then the text is put 412 another application wants to paste the selected text. Then the text is put
413 in the "* register. For example, to cut a line and make it the current 413 in the "* register. For example, to cut a line and make it the current
414 selection/put it on the clipboard: > 414 selection/put it on the clipboard: >
415 415
416 "*dd 416 "*dd
502 *:cme* *:cmenu* *:cnoreme* *:cnoremenu* 502 *:cme* *:cmenu* *:cnoreme* *:cnoremenu*
503 *E330* *E327* *E331* *E336* *E333* 503 *E330* *E327* *E331* *E336* *E333*
504 *E328* *E329* *E337* 504 *E328* *E329* *E337*
505 To create a new menu item, use the ":menu" commands. They are mostly like 505 To create a new menu item, use the ":menu" commands. They are mostly like
506 the ":map" set of commands but the first argument is a menu item name, given 506 the ":map" set of commands but the first argument is a menu item name, given
507 as a path of menus and submenus with a '.' between them. eg: > 507 as a path of menus and submenus with a '.' between them, e.g.: >
508 508
509 :menu File.Save :w<CR> 509 :menu File.Save :w<CR>
510 :inoremenu File.Save <C-O>:w<CR> 510 :inoremenu File.Save <C-O>:w<CR>
511 :menu Edit.Big\ Changes.Delete\ All\ Spaces :%s/[ ^I]//g<CR> 511 :menu Edit.Big\ Changes.Delete\ All\ Spaces :%s/[ ^I]//g<CR>
512 512
646 because the item will never be selected. Use a single colon to keep it 646 because the item will never be selected. Use a single colon to keep it
647 simple. 647 simple.
648 648
649 *gui-toolbar* 649 *gui-toolbar*
650 The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11), 650 The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
651 KDE and Photon GUI. It should turn up in other GUIs in due course. The default 651 KDE and Photon GUI. It should turn up in other GUIs in due course. The
652 toolbar is setup in menu.vim. 652 default toolbar is setup in menu.vim.
653 The display of the toolbar is controlled by the 'guioptions' letter 'T'. You 653 The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
654 can thus have menu & toolbar together, or either on its own, or neither. 654 can thus have menu & toolbar together, or either on its own, or neither.
655 The appearance is controlled by the 'toolbar' option. You can chose between 655 The appearance is controlled by the 'toolbar' option. You can chose between
656 an image, text or both. 656 an image, text or both.
657 657
658 *toolbar-icon* 658 *toolbar-icon*
659 The toolbar is defined as a special menu called ToolBar, which only has one 659 The toolbar is defined as a special menu called ToolBar, which only has one
660 level. Vim interprets the items in this menu as follows: 660 level. Vim interprets the items in this menu as follows:
661 1) If an "icon=" argument was specified, the file with this name is used. 661 1) If an "icon=" argument was specified, the file with this name is used.
662 The file can either be specified with the full path or with the base name. 662 The file can either be specified with the full path or with the base name.
663 In the last case it is searched for in the "bitmaps" directory in 663 In the last case it is searched for in the "bitmaps" directory in
664 'runtimepath', like in point 3). Examples: > 664 'runtimepath', like in point 3. Examples: >
665 :amenu icon=/usr/local/pixmaps/foo_icon.xpm ToolBar.Foo :echo "Foo"<CR> 665 :amenu icon=/usr/local/pixmaps/foo_icon.xpm ToolBar.Foo :echo "Foo"<CR>
666 :amenu icon=FooIcon ToolBar.Foo :echo "Foo"<CR> 666 :amenu icon=FooIcon ToolBar.Foo :echo "Foo"<CR>
667 < Note that in the first case the extension is included, while in the second 667 < Note that in the first case the extension is included, while in the second
668 case it is omitted. 668 case it is omitted.
669 If the file cannot be opened the next points are tried. 669 If the file cannot be opened the next points are tried.
670 A space in the file name must be escaped with a backslash. 670 A space in the file name must be escaped with a backslash.
671 A menu priority must come _after_ the icon argument: > 671 A menu priority must come _after_ the icon argument: >
672 :amenu icon=foo 1.42 ToolBar.Foo :echo "42!"<CR> 672 :amenu icon=foo 1.42 ToolBar.Foo :echo "42!"<CR>
673 2) An item called 'BuiltIn##', where ## is a number, is taken as number ## of 673 2) An item called 'BuiltIn##', where ## is a number, is taken as number ## of
674 the built-in bitmaps available in Vim. Currently there are 31 numbered 674 the built-in bitmaps available in Vim. Currently there are 31 numbered
675 from 0 to 30 which cover most common editing operations |builtin-tools|. > 675 from 0 to 30 which cover most common editing operations |builtin-tools|. >
676 :amenu ToolBar.BuiltIn22 :call SearchNext("back")<CR> 676 :amenu ToolBar.BuiltIn22 :call SearchNext("back")<CR>
677 3) An item with another name is first searched for in the directory 677 3) An item with another name is first searched for in the directory
678 "bitmaps" in 'runtimepath'. If found, the bitmap file is used as the 678 "bitmaps" in 'runtimepath'. If found, the bitmap file is used as the
679 toolbar button image. Note that the exact filename is OS-specific: For 679 toolbar button image. Note that the exact filename is OS-specific: For
745 745
746 To see what an existing menu is mapped to, use just one argument after the 746 To see what an existing menu is mapped to, use just one argument after the
747 menu commands (just like you would with the ":map" commands). If the menu 747 menu commands (just like you would with the ":map" commands). If the menu
748 specified is a submenu, then all menus under that hierarchy will be shown. 748 specified is a submenu, then all menus under that hierarchy will be shown.
749 If no argument is given after :menu at all, then ALL menu items are shown 749 If no argument is given after :menu at all, then ALL menu items are shown
750 for the appropriate mode (eg, Command-line mode for :cmenu). 750 for the appropriate mode (e.g., Command-line mode for :cmenu).
751 751
752 Special characters in the list, just before the rhs: 752 Special characters in the list, just before the rhs:
753 * The menu was defined with "nore" to disallow remapping. 753 * The menu was defined with "nore" to disallow remapping.
754 & The menu was defined with "<script>" to allow remapping script-local 754 & The menu was defined with "<script>" to allow remapping script-local
755 mappings only. 755 mappings only.
854 :tu[nmenu] {menupath} Remove a tip for a menu or tool. 854 :tu[nmenu] {menupath} Remove a tip for a menu or tool.
855 {only in X11 and Win32 GUI} 855 {only in X11 and Win32 GUI}
856 856
857 When a tip is defined for a menu item, it appears in the command-line area 857 When a tip is defined for a menu item, it appears in the command-line area
858 when the mouse is over that item, much like a standard Windows menu hint in 858 when the mouse is over that item, much like a standard Windows menu hint in
859 the status bar. (Except when Vim is in Command-line mode, when of course 859 the status bar. (Except when Vim is in Command-line mode, when of course
860 nothing is displayed.) 860 nothing is displayed.)
861 When a tip is defined for a ToolBar item, it appears as a tooltip when the 861 When a tip is defined for a ToolBar item, it appears as a tooltip when the
862 mouse pauses over that button, in the usual fashion. Use the |hl-Tooltip| 862 mouse pauses over that button, in the usual fashion. Use the |hl-Tooltip|
863 highlight group to change its colors. 863 highlight group to change its colors.
864 864
868 The tip is defined like this: > 868 The tip is defined like this: >
869 :tmenu MyMenu.Hello Displays a greeting. 869 :tmenu MyMenu.Hello Displays a greeting.
870 And delete it with: > 870 And delete it with: >
871 :tunmenu MyMenu.Hello 871 :tunmenu MyMenu.Hello
872 872
873 Tooltips are currently only supported for the X11 and Win32 GUI. However, they 873 Tooltips are currently only supported for the X11 and Win32 GUI. However, they
874 should appear for the other gui platforms in the not too distant future. 874 should appear for the other gui platforms in the not too distant future.
875 875
876 The ":tmenu" command works just like other menu commands, it uses the same 876 The ":tmenu" command works just like other menu commands, it uses the same
877 arguments. ":tunmenu" deletes an existing menu tip, in the same way as the 877 arguments. ":tunmenu" deletes an existing menu tip, in the same way as the
878 other unmenu commands. 878 other unmenu commands.
918 - Typing ^V followed by a special key in the GUI will insert "<Key>", since 918 - Typing ^V followed by a special key in the GUI will insert "<Key>", since
919 the internal string used is meaningless. Modifiers may also be held down to 919 the internal string used is meaningless. Modifiers may also be held down to
920 get "<Modifiers-Key>". 920 get "<Modifiers-Key>".
921 921
922 - In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within 922 - In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within
923 mappings of special keys and mouse events. eg: :map <M-LeftDrag> <LeftDrag> 923 mappings of special keys and mouse events. E.g.: :map <M-LeftDrag> <LeftDrag>
924 924
925 - In the GUI, several normal keys may have modifiers in mappings etc, these 925 - In the GUI, several normal keys may have modifiers in mappings etc, these
926 are <Space>, <Tab>, <NL>, <CR>, <Esc>. 926 are <Space>, <Tab>, <NL>, <CR>, <Esc>.
927 927
928 - To check in a Vim script if the GUI is being used, you can use something 928 - To check in a Vim script if the GUI is being used, you can use something