⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui_w32.txt

📁 MSYS在windows下模拟了一个类unix的终端
💻 TXT
📖 第 1 页 / 共 2 页
字号:
Vim uses another window for external commands, to make it possible to run anycommand.  The external command gets its own environment for running, just likeit was started from a DOS prompt.							*win32-vimrun*Executing an external command is done indirectly by the "vimrun" command.  The"vimrun.exe" must be in the path for this to work.  Or it must be in the samedirectory as the Vim executable.  If "vimrun" cannot be found, the command isexecuted directly, but then the DOS window closes immediately after theexternal command has finished.WARNING: If you close this window with the "X" button, and confirm thequestion if you really want to kill the application, Vim may be killed too!(This does not apply to commands run asynchronously with ":!start".)In Windows 95, the window in which the commands are executed is always 25x80characters, to be as DOS compatible as possible (this matters!).  The defaultsystem font is used. On NT, the window will be the default you have set up for"Console" in Control Panel. On Win32s, the properties of the DOS box aredetermined by _default.pif in the windows directory.							*msdos-mode*If you get a dialog that says "This program is set to run in MS-DOS mode..."when you run an external program, you can solve this by changing theproperties of the associated shortcut:- Use a Windows Explorer to find the command.com that is used.  It can be  c:\command.com, c:\dos\command.com, c:\windows\command.com, etc.- With the right mouse button, select properties of this command.com.- In the Program tab select "Advanced".- Unselect "MS-DOS mode".- Click "OK" twice.							*win32-!start*Normally, Vim waits for a command to complete before continuing (this makessense for most shell commands which produce output for Vim to use).  If youwant Vim to start a program and return immediately, you can use the followingsyntax on W95 & NT:>	:!start {command}On Win32s, you will have to go to another window instead. Don't forget thatyou must tell Windows 3.1x to keep executing a DOS command in the backgroundwhile you switch back to Vim.==============================================================================5. Special colors					*win32-colors*On Win32, the normal DOS colors can be used.  See |dos-colors|.Additionally the system configured colors can also be used.  These are knownby the names Sys_XXX, where XXX is the appropriate system color name, from thefollowing list (see the Win32 documentation for full descriptions).  Case isignored. note: On Win32s not all of these colors are supported.Sys_3DDKShadow		Sys_3DFace			Sys_BTNFaceSys_3DHilight		Sys_3DHighlight			Sys_BTNHilightSys_BTNHighlight	Sys_3DLight			Sys_3DShadowSys_BTNShadow		Sys_ActiveBorder		Sys_ActiveCaptionSys_AppWorkspace	Sys_Background			Sys_DesktopSys_BTNText		Sys_CaptionText			Sys_GrayTextSys_Highlight		Sys_HighlightText		Sys_InactiveBorderSys_InactiveCaption	Sys_InactiveCaptionText		Sys_InfoBKSys_InfoText		Sys_Menu			Sys_MenuTextSys_ScrollBar		Sys_Window			Sys_WindowFrameSys_WindowTextProbably the most useful values are	Sys_Window	    Normal window background	Sys_WindowText      Normal window text	Sys_Highlight       Highlighted background	Sys_HighlightText   Highlighted textThese extra colors are also available:Gray, Grey, LightYellow, SeaGreen, Orange, Purple, SlateBlue, Violet,								*rgb.txt*Additionally, colors defined by a "rgb.txt" file can be used.  This file iswell known from X11.  A few lines from it:>  255 218 185		   peach puff>  205 133  63		   peru>  255 181 197		   pinkThis shows the layout of the file:  First the R, G and B value as a decimalnumber, followed by the name of the color.  The four fields are separated byspaces.You can get an rgb.txt file from any X11 distribution.  It is located in adirectory like "/usr/X11R6/lib/X11/".  For Vim it must be located in the$VIMRUNTIME directory.  Thus the file can be found with "$VIMRUNTIME/rgb.txt".==============================================================================						*gui-w32-dialogs* *dialog*6. Windows dialogs & browsersThe Win32 GUI can use familiar Windows components for some operations, as wellas the traditional interface shared with the console version.6.1 DialogsThe dialogs displayed by the "confirm" family (i.e. the 'confirm' option,|:confirm| command and |confirm()| function are GUI-based rather than theconsole-based ones used by other versions.  There is no option to change this.6.2 File BrowsersWhen prepending ":browse" before file editing commands, a file requester isused to allow you to select an existing file.  See |:browse|.6.3 Tearoff MenusThe Win32 GUI emulates Motif's tear-off menus.  At the top of each menu youwill see a small graphic "rip here" sign.  Selecting it will cause a floatingwindow to be created with the same menu entries on it.  The floating menu canthen be accessed just as if it was the original (including sub-menus), butwithout having to go to the menu bar each time.This is most useful if you find yourself using a command buried in a sub-menuover and over again.The tearoff menus can be positioned where you like, and always stay just abovethe Main Vim window. You can get rid of them by closing them as usual; theyalso of course close when you exit Vim.							*:tearoff* *:te*:te[aroff] {name}	Tear-off the menu {name}.  The menu named must have at			least one subentry, but need not appear on the			menu-bar (see |win32-hidden-menus|).Example:>	:tearoff Filewill make the "File" menu (if there is one) appear as a tearoff menu.>	:amenu ]Toolbar.Make	:make<CR>>	:tearoff ]ToolbarThis creates a floating menu that doesn't exist on the main menu-bar.Note that a menu that starts with ']' will not be displayed.==============================================================================7. Various						*gui-w32-various*							*gui-w32-printing*The "File/Print" menu uses Notepad to print the current buffer.  This is a bitclumsy, but it's portable.  If you want something else, you can define yourown print command.  For example, you could replace Notepad with Editpad(www.tornado.be/~johnfg).  See $VIMRUNTIME/menu.vim for how it works bydefault.Using this should also work:>	:w >>prnVim supports a number of standard MS Windows features. Some of these aredetailed elsewhere: see |'mouse'|, |win32-hidden-menus|.							*drag-n-drop-win32*You can drag and drop one or more files into the vim window, where they willbe opened as normal.  If you hold down Shift while doing this, Vim changes tothe (first) dropped file's directory.  If you hold Ctrl Vim will always splita new window for the file.  Otherwise it's only done if the current buffer hasbeen changed.You can also drop a directory's icon, but rather than open all files in thedirectory (which wouldn't usually be what you want) Vim instead changes tothat directory and begins a new file.If Vim happens to be editing a command line, the names of the dropped filesand directories will be inserted at the cursor.  This allows you to use thesenames with any Ex command.							*:simalt* *:si*:si[malt] {key}		simulate pressing {key} while holding Alt pressed.			{not in Vi} {only for Win32 versions}Normally, Vim takes control of all Alt-<Key> combinations, to increase thenumber of possible mappings. This clashes with the standard use of Alt as thekey for accessing menus.The quick way of getting standard behavior is to set the 'winaltkeys' optionto "yes".  This however prevents you from mapping Alt keys at all.Another way is to set 'winaltkeys' to "menu".  Menu shortcut keys are thenhandled by windows, other ALT keys can be mapped.  This doesn't allow adependency on the current state though.To get round this, the :simalt command allows Vim (when 'winaltkeys' is not"yes") to fake a Windows-style Alt keypress. You can use this to map Alt keycombinations (or anything else for that matter) to produce standard Windowsactions. Here are some examples:>	:map <M-f> :simalt f<CR>This makes Alt-F pop down the 'File' menu (with the stock Menu.vim) bysimulating the keystrokes Alt, F.>	:map <M-Space> :simalt ~<CR>This maps Alt-Space to pop down the system menu for the Vim window. Note that~ is used by simalt to represent the <Space> character.>	:map <C-n> :simalt ~n<CR>Maps Control-N to produce the keys Alt-Space followed by N. This minimises theVim window via the system menu.						*intellimouse-wheel-problems*When using the Intellimouse mouse wheel causes Vim to stop accepting input, goto:	ControlPanel - Mouse - Wheel - UniversalScrolling - ExceptionsAnd add gvim to the list of applications.  This problem only appears to happenwith the Intellimouse driver 2.2 and when "Universal Scrolling" is turned on. vim:tw=78:ts=8:sw=4

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -