当前位置: 首页>>技术教程>>正文


Gvim 和 Vim 有什么区别?

,

问题描述

有人可以向我解释一下 Gvim 和 Vim 之间的区别吗?

最佳思路

GVim 是带有 内置 GUI 的 Vim,而普通 Vim 需要终端模拟器(例如 GNOME 终端)才能运行。

内置 GUI 为 GVim 提供了一些额外的功能。从 a post in the Vi and Vim Stack Exchange 借用:

\\n

Some features that will only work with gVim:

\\n

    \\n

  • Supports a much wider range of colors (RGB), while the terminal only supports 256 colors (see this and this).
  • \\n

  • Some other more advanced graphical features, such as “wiggly lines” for spell checking, more flexible cursor shapes, etc. A terminal can\\n only do “blocks of monospaced characters”.
  • \\n

  • Enables mouse support, if otherwise left alone (including drag-and-drop for files). Terminal Vim can also handle the mouse\\n quite well, but not drag-and-drop.
  • \\n

  • Offers a nice, customizable menu system, where each option has the corresponding Vim command listed.
  • \\n

  • gVim can offer you scrollbars which scroll the Vim buffer (and not the Terminal scrollback).
  • \\n

  • You can have popup “balloons” (aka. “tooltips”).
  • \\n

  • Many terminals do not provide true italics like gVim does.
  • \\n

  • Has integrated font support.
  • \\n

\\n

Secondly, even if you prefer using Vim, installing a GUI version may\\n offer more compile-time features than the version without, at least in\\n some distros (such as clipboard and clientserver support on\\n Debian-based system in vim-nox vs vim-gnome).

\\n

Things gVim doesn’t do:

\\n

    \\n

  • gVim isn’t a (full) terminal emulator, so starting external programs that use a lot of terminal features won’t work very well. For example\\n try using :!vim, :!mutt, or :!irssi from gVim, or pressing K\\n over a word (which, by default, opens the manpage for that word). Also\\n see this.
  • \\n

\\n

次佳思路

GVim 和 Vim 是相同的,不同之处在于 Gvim 提供了一个不在终端窗口中运行的界面。基本上,Gvim 有 GUI-like 菜单和工具栏。

以下是 Quora 的引用,提供了更多信息:

\\n

VIM is designed for using the keyboard efficiently and not for using\\nthe mouse.

\\n

Functionally there is no difference between VIM and GVIM. They both\\nwork the same and have same keyboard sequences. VIM does not need a\\nGraphical User Interface (GUI) and uses terminal shell environment to\\nprovide text editing features. However GVIM (or MVIM on mac) uses X\\nwindowing system (like GTK+) to provide a desktop like window\\nappearance to vim with all text editing features. Performance wise\\nalso both vim and gvim behave almost identically.

\\n

Apart from this, there are few addition operations supported by GVIM\\nlike

\\n

    \\n

  • More font and better text rendering support in gvim.
  • \\n

  • GVIM has additional menu and tool bars which vim lacks
  • \\n

\\n

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/14165.html,未经允许,请勿转载。