Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/gui.txt`
feeca5c9101a79392f8bc56d7dfb3b971a8225e1ecb8a2a80000000100000fa0
 UIs. But if a UI isn't expecting
                the channel to be closed, it may be (incorrectly) reported as
                an error.

                Note: Not supported on Windows yet.

------------------------------------------------------------------------------
Restart Nvim

                                                *:restart*
:restart
                Restarts the Nvim server with the same startup arguments
                |v:argv| and reattaches the current UI to the new server.
                All other UIs will detach.

                This fails when changes have been made and Vim refuses to
                |abandon| the current buffer.

                Note: If the current UI hasn't implemented the "restart" UI
                event, this command is equivalent to `:qall`.
                Note: Only works if the UI and server are on the same system.
                Note: Not supported on Windows yet.

:restart!
                Force restarts the Nvim server, abandoning unsaved buffers.

------------------------------------------------------------------------------
GUI commands

                                                *:winp* *:winpos* *E188*
:winp[os]
                Display current position of the top left corner of the GUI vim
                window in pixels.  Does not work in all versions.
                Also see |getwinpos()|, |getwinposx()| and |getwinposy()|.

:winp[os] {X} {Y}                                                       *E466*
                Put the GUI vim window at the given {X} and {Y} coordinates.
                The coordinates should specify the position in pixels of the
                top left corner of the window.
                When the GUI window has not been opened yet, the values are
                remembered until the window is opened.  The position is
                adjusted to make the window fit on the screen (if possible).

                                            *:wi* *:win* *:winsize* *E465*
:win[size] {width} {height}
                Set the window height to {width} by {height} characters.
                Obsolete, use ":set lines=11 columns=22".

==============================================================================
Using the mouse                                         *mouse-using*

                                        *mouse-mode-table* *mouse-overview*
Overview of what the mouse buttons do, when 'mousemodel' is "extend":

               *<S-LeftMouse>* *<A-RightMouse>* *<S-RightMouse>* *<RightDrag>*
                                                 *<RightRelease>* *<LeftDrag>*
Normal Mode: >
  event         position     selection        change  action
                 cursor                       window
  ---------------------------------------------------------------------------
  <LeftMouse>     yes          end              yes
  <C-LeftMouse>   yes          end              yes    "CTRL-]" (2)
  <S-LeftMouse>   yes       no change           yes    "*" (2)
  <LeftDrag>      yes     start or extend (1)   no
  <LeftRelease>   yes     start or extend (1)   no
  <MiddleMouse>   yes       if not active       no     put
  <MiddleMouse>   yes       if active           no     yank and put
  <RightMouse>    yes     start or extend       yes
  <A-RightMouse>  yes start or extend blockw.   yes
  <S-RightMouse>  yes        no change          yes    "#" (2)
  <C-RightMouse>  no         no change          no     "CTRL-T"
  <RightDrag>     yes         extend            no
  <RightRelease>  yes         extend            no

Insert or Replace Mode: >
  event         position     selection        change  action
                 cursor                       window
  ---------------------------------------------------------------------------
  <LeftMouse>     yes     (cannot be active)    yes
  <C-LeftMouse>   yes     (cannot be active)    yes    "CTRL-O^]" (2)
  <S-LeftMouse>   yes     (cannot be active)    yes    "CTRL-O*" (2)
  <LeftDrag>      yes   

Title: GUI Commands and Using the Mouse
Summary
This section details GUI commands like `:winpos` to display or set the GUI window's position and `:winsize` to set the window dimensions (though it suggests using `:set lines` and `:set columns` instead). It also provides an overview of mouse button actions in Normal, Insert, and Replace modes when 'mousemodel' is set to "extend", including actions for left, middle, and right mouse buttons, as well as drag and release events.