gvim may be separate executables, linked with different libraries. It is possible to have one executable doing either interface (elvis and emacs do this for example). vim 4.0 in 1996 added a
-g option for telling it to use the GUI version (which in this case would be part of the same executable).
I did not find a copy of the announcement for 4.0 (which might have given some clues regarding the motivation for the
-g option (vim's announcements mailing list started in 1997), but see it mentioned in an old FAQ by Laurent Duperval:
7.3 How can I make Vim faster on a Unix station?
The GUI support in Vim 4.0 can slow down the startup time noticeably.
Until Vim supports dynamic loading, you can speed up the startup time
by compiling two different versions of Vim: one with the GUI and one
without the GUI and install both. Make sure you remove the link from
$bindir/gvim to $bindir/vim when installing the GUI version, though.
If screen updating is your problem, you can run Vim in screen. screen
is an ascii terminal multiplexer. The latest version can be found at
My recollection is that for quite a while, there were two executables (when that changed would require quite a lot of research into the actual packages used). But the capability was there starting in 1996.
Given either type of interface, there are ways to update the display. For gvim, that uses the X libraries, while terminal applications such as
vim) use escape sequences. Depending on the system, both of these are termcap applications, obtaining their repertoire of escape sequences using the termcap interface of ncurses, etc. (some versions of
top actually use ncurses for display, e.g.,
htop). vim augments that repertoire using builtin-tables (which often are redundant).
procps version of
top in Debian is (a relative rarity) a terminfo application as can be seen by inspecting its source-code.