LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gvim

GUI version of Vim

TLDR

Open file in GUI vim
$ gvim [file]
copy
Open multiple files in tabs
$ gvim -p [file1] [file2]
copy
Open in read-only mode
$ gvim -R [file]
copy
Open with diff mode
$ gvim -d [file1] [file2]
copy
Open at specific line
$ gvim +[42] [file]
copy
Open in foreground (do not fork)
$ gvim -f [file]
copy
Execute a command after opening a file
$ gvim -c "[%s/foo/bar/g]" [file]
copy

SYNOPSIS

gvim [options] [files]

DESCRIPTION

gvim is the GUI version of Vim. It provides all Vim functionality with graphical menus, mouse support, and system clipboard integration.The editor supports the same commands and plugins as terminal Vim. It offers visual features like toolbar, scrollbars, and configurable fonts. By default, gvim forks and detaches from the launching shell; use -f or --nofork to run in the foreground.

PARAMETERS

FILES

Files to edit.
-p
Open files in tabs.
-o
Open files in horizontal splits.
-O
Open files in vertical splits.
-R
Read-only mode.
-d
Diff mode.
+ NUM
Start at line number.
-c CMD
Execute command after start.
-f, --nofork
Run in foreground, do not fork and detach from the shell.
-g
Start in GUI mode (used when calling as vim -g).
-u FILE
Use specified vimrc file for initialization instead of default.
-U FILE
Use specified gvimrc file for GUI initialization.
-N
No-compatible mode. Resets the 'compatible' option.
-geometry GEOM
Set initial window geometry (e.g., 80x25+0+0).
--
End of options. Arguments after this are treated as file names.
--help
Display help information.

INSTALL

sudo pacman -S gvim
copy
sudo apk add gvim
copy
sudo zypper install gvim
copy

CAVEATS

Requires X11/Wayland or Windows GUI. Larger memory footprint than vim. GUI features configurable in .gvimrc.

HISTORY

gvim was developed as part of Vim by Bram Moolenaar to provide a graphical interface for the editor.

SEE ALSO

vim(1), vi(1), nvim(1), vimdiff(1)

Copied to clipboard
Kai