Home Explore Blog CI



neovim

1st chunk of `runtime/doc/usr_09.txt`
897c7c1edc721cc14db6ec733e2b00a32b7346b05a1990760000000100000fa9
*usr_09.txt*	Nvim

		     VIM USER MANUAL - by Bram Moolenaar

				Using the GUI


Vim works in an ordinary terminal, while gVim has a Graphical User Interface
(GUI).  It can do the same things and a few more.  The GUI offers menus, a
toolbar, scrollbars and other items.  This chapter is about these extra things
that the GUI offers.

|09.1|	Parts of the GUI
|09.2|	Using the mouse
|09.3|	The clipboard
|09.4|	Select mode

     Next chapter: |usr_10.txt|  Making big changes
 Previous chapter: |usr_08.txt|  Splitting windows
Table of contents: |usr_toc.txt|

==============================================================================
*09.1*	Parts of the GUI

You might have an icon on your desktop that starts gvim.  Otherwise, one of
these commands should do it: >

	gvim file.txt
	vim -g file.txt

If this doesn't work you don't have a version of Vim with GUI support.  You
will have to install one first.
   Vim will open a window and display "file.txt" in it.  What the window looks
like depends on the version of Vim.  It should resemble the following picture
(for as far as this can be shown in ASCII!).

	+----------------------------------------------------+
	| file.txt + (~/dir) - VIM			   X |	<- window title
	+----------------------------------------------------+
	| File	Edit  Tools  Syntax  Buffers  Window  Help   |	<- menubar
	+----------------------------------------------------+
	| aaa  bbb  ccc  ddd  eee  fff	ggg  hhh  iii  jjj   |	<- toolbar
	| aaa  bbb  ccc  ddd  eee  fff	ggg  hhh  iii  jjj   |
	+----------------------------------------------------+
	| file text					 | ^ |
	| ~						 | # |
	| ~						 | # |	<- scrollbar
	| ~						 | # |
	| ~						 | # |
	| ~						 | # |
	|						 | V |
	+----------------------------------------------------+

The largest space is occupied by the file text.  This shows the file in the
same way as in a terminal.  With some different colors and another font
perhaps.


THE WINDOW TITLE

At the very top is the window title.  This is drawn by your window system.
Vim will set the title to show the name of the current file.  First comes the
name of the file.  Then some special characters and the directory of the file
in parens.  These special characters can be present:

	• -	The file cannot be modified (e.g., a help file)
	• +	The file contains changes
	• =	The file is read-only
	• =+	The file is read-only, contains changes anyway

If nothing is shown you have an ordinary, unchanged file.


THE MENUBAR

You know how menus work, right?  Vim has the usual items, plus a few more.
Browse them to get an idea of what you can use them for.  A relevant submenu
is Edit/Global Settings.  You will find these entries:

	Toggle Toolbar		make the toolbar appear/disappear
	Toggle Bottom Scrollbar	make a scrollbar appear/disappear at the bottom
	Toggle Left Scrollbar	make a scrollbar appear/disappear at the left
	Toggle Right Scrollbar	make a scrollbar appear/disappear at the right


THE TOOLBAR

This contains icons for the most often used actions.  Hopefully the icons are
self-explanatory.  There are tooltips to get an extra hint (move the mouse
pointer to the icon without clicking and don't move it for a second).

The "Edit/Global Settings/Toggle Toolbar" menu item can be used to make the
toolbar disappear.  If you never want a toolbar, use this command in your
vimrc file: >

	:set guioptions-=T

This removes the 'T' flag from the 'guioptions' option.  Other parts of the
GUI can also be enabled or disabled with this option.  See the help for it.


THE SCROLLBARS

By default there is one scrollbar on the right.  It does the obvious thing.
When you split the window, each window will get its own scrollbar.
   You can make a horizontal scrollbar appear with the menu item
Edit/Global Settings/Toggle Bottom Scrollbar.  This is useful in diff mode, or
when the 'wrap' option has been reset (more about that later).

When there are vertically split windows, only the windows on the right side
will have a scrollbar.  However,

Title: Using the GUI in Vim (gVim)
Summary
This chapter introduces the Graphical User Interface (GUI) version of Vim, gVim, highlighting its additional features compared to the terminal version. It covers the various parts of the GUI, including the window title, menubar, toolbar, and scrollbars, explaining their functions and how they can be customized.