如何使用 Cream 提高 Vim 的用户友好性
Vim Cream

> 
> Cream 附加包通过把一个更加熟悉的“面孔”置于 Vim 文本编辑器之上，同时保留 Vim 的功能，使其更加容易使用
> 
> 
> 


![How to make Vim user-friendly with Cream](/data/attachment/album/201705/25/161055s6ewwhospwflorv6.png "How to make Vim user-friendly with Cream")


大约 10 年前，我既使用 Emacs 进行文本编辑，也使用 Vim 进行文本编辑。说到底，我的确是一个热衷于 Emacs 的家伙。尽管 Emacs 在我的心里占据了很重要的地位，但我知道， Vim 也不赖。


一些人，或者像我一样的人，在技术方面有些笨手笨脚。多年来，我和一些 Linux 新手交流，了解到他们想使用 Vim，但是却失望的发现， Vim 编辑器和他们在其它操作系统上使用过的编辑器不一样。


但是，当我把 Cream 介绍给他们以后，他们的失望就变成了满意。Cream 是 Vim 的一个附加包，它使得 Vim 更加容易使用。Cream 让这些 Linux 新手变成了 Vim 的坚决拥护者和忠心用户。


让我们来看一看 Cream 是什么以及它是如何让 Vim 变得更加容易使用的。


### Cream 的安装


在安装 Cream 之前，你需要先在你的电脑上安装好 Vim 和 GVim 的 GUI 组件。我发现最容易完成这件事的方法是使用 Linux 版本的包管理器。


安装好 Vim 以后，便可[下载 Cream 的安装程序](http://cream.sourceforge.net/download.html)，或者你也可以再次使用 Linux 发行版的包管理器进行安装。


安装好 Cream 以后，你可以从应用菜单选择它（比如，**Applications**->**Cream**）或者在程序启动器中输入 `Cream`，从而启动 Cream 。


![Cream’s main window](/data/attachment/album/201705/25/161056qipbe79nreitkttd.png "Cream’s main window")


### Cream 的使用


如果你之前已经使用过 Gvim，那么你会注意到， Cream 几乎没改变该编辑器的外观和感觉。最大的不同是 Cream 的菜单栏和工具栏，它们取代了 Gvim 陈旧的菜单栏和工具栏，新的菜单栏和工具栏的外观和功能分组看起来和其它编辑器的一样。


Cream 的菜单栏对用户隐藏了更多的技术选项，比如指定一个编译器的能力，以及运行 `make` 命令的能力。当你通过使用 Cream 更加熟悉 Vim 以后，你只需要从 **Setting**->**Preferences**->**Behavior** 选择选项，就可以更容易地访问这些特性。有了这些选项，你可以（如果你想）体验到一个兼有 Cream 和传统 Vim 二者优点的强大编辑器。


Cream 并不是仅由菜单驱动。尽管编辑器的功能仅有单击或双击两种方式，但是你也可以使用常见的键盘快捷键来执行操作，比如 `CTRL-O`（打开一个文件），`CTRL-C`（复制文本）。你不需要在几种模式之间切换，也不需要记住一些很难记住的命令。


Cream 开始运行以后，打开一个文件，或者新建一个文件，然后就可以开始输入了。几个我向他们介绍过 Cream 的人说，虽然 Cream 保留了 Vim 的许多典型风格，但是 Cream 使用起来更加舒服。


![Cream add-on for VIM in action](/data/attachment/album/201705/25/161057fvh3v3vo4kkku4zv.png "Cream add-on for VIM in action")


并不是说 Cream 是 Vim 的简化版，远远不是。事实上， Cream 保留了 Vim 的全部特性，同时，它还有[一系列其他有用的特性](http://cream.sourceforge.net/featurelist.html)。我发现的 Cream 的一些有用的特性包括：


* 一个标签式界面
* 语法高亮（特别是针对 Markdown、LaTeX 和 HTML）
* 自动修正拼写错误
* 字数统计
* 内建文件浏览器


Cream 本身也有许多附加包，可以给编辑器增加一些新的特性。这些特性包括文本加密、清理电子邮件内容，甚至还有一个使用教程。老实说，我还没有发现哪一个附加包是真正有用的，不过你的感受可能会有所不同。


我曾听过一些 Vi/Vim 的狂热分子谴责 Cream “降低”（这是他们的原话）了 Vi/Vim 编辑器的水准。的确，Cream 并不是为他们设计的。它是为那些想快速使用 Vim ，同时保留他们曾经使用过的编辑器的外观和感觉的人准备的。在这种情况下， Cream 是值得赞赏的，它使得 Vim 更加容易使用，更加广泛的被人们使用。


（题图 : opensource.com）




---


via: <https://opensource.com/article/17/5/stir-bit-cream-make-vim-friendlier>


作者：[Scott Nesbitt](https://opensource.com/users/scottnesbitt) 译者：[ucasFL](https://github.com/ucasFL) 校对：[jasminepeng](https://github.com/jasminepeng)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
About 10 years ago, I split my text editing time between Emacs and Vim. That said, I was and definitely still am an Emacs guy. But while Emacs has always had an edge in my affections, I know that Vim is no slouch.

So do other people—even those who, like me, are all thumbs technically. Over the years, I've talked to a few new Linux users who wanted to use Vim but were a bit disappointed that it doesn't act like the text editors they've used on other operating systems.

That disappointment changed to satisfaction when I introduced them to Cream, an add-on for Vim that makes it easier to use. Cream turned each of them into diehard Vim users.

Let's take a look at Cream and how it makes Vim easier to use.

## Getting going with Cream

Before you can install Cream, you'll need Vim and GVim GUI components installed on your computer. I find the easiest way to do that is to use your Linux distribution's package manager.

Once you have Vim installed, grab [the installer](http://cream.sourceforge.net/download.html) for Cream or, again, turn to your distribution's package manager.

Once Cream is installed, you can fire it up by selecting the entry from the application menu (for example, **Applications > Cream**) or by typing **cream** into your program launcher.

## Using Cream

If you've used GVim before, you'll notice that Cream doesn't change the editor's look and feel too much. The biggest cosmetic differences are Cream's menu bar and toolbar, which replace the stock GVim menu bar and toolbar with ones that look and group functions like their counterparts in other applications.

Cream's menus hide a lot of the more techie options—like the ability to specify a compiler and the **Make** command—from the user. As you get more familiar with Vim by using Cream, however, you can make more of those features more easily accessible by selecting an option from the **Settings > Preferences > Behavior** menu. With those options, you could (if you want to) wind up with an editor that behaves as a hybrid of Cream and traditional Vim.

Cream isn't only driven by its menus. While the editor's functions are only a click or two away, you can also use common keyboard shortcuts to perform actions—for example, **CTRL-O** (to open a file) or **CTRL-C** (to copy text). There's no need to shift between modes or remember Vim's somewhat cryptic commands.

With Cream running, get to work by opening a file or creating a new one. Then start typing. A couple or three of the people I've introduced to Cream have said that while it retains much of the classic styling of Vim, Cream feels more comfortable to use.

That's not to say Cream dumbs down or waters down Vim. Far from it. You still retain all of Vim's features, along with [a long list of others](http://cream.sourceforge.net/featurelist.html). Some of the features of Cream that I find useful include:

- A tabbed interface
- Syntax highlighting (especially when working with Markdown, LaTeX, and HTML)
- Auto correction of spelling mistakes
- Word count
- Built-in file explorer

Cream also comes with a number of add-ons that give the editor some additional features. Those features include the ability to encrypt text and to clean up the body of emails, and there's even a typing tutor. To be honest, I haven't found any of the add-ons to be all that useful. Your mileage might vary, though.

I've heard a few Vi/Vim purists pooh-pooh Cream for "dumbing down*"* (their words) the editor. Let's be honest: Cream isn't for them. It's for someone who wants to quickly get up and running with Vim while retaining the look and feel of the editors they're used to. In that way, Cream succeeds admirably. It makes Vim a lot more accessible and usable to a wider range of people.

## 4 Comments