`
javababy1
  • 浏览: 1168615 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

ubuntu上的vim

 
阅读更多

Windows下使用vim的朋友对gvim很熟悉,在ubuntugvim是一个虚拟的软件包,它由vim-gnomevim-gtk组成

$ aptitude show gvim

未发现 gvim 的已安装或候选版本

软件包: gvim

状态: 不是一个真实的软件包

提供者:: vim-gnome, vim-gtk

vim-gnome是一个带GNOME2图形界面的vim,并支持PerlPythonRubyTcl脚本编程。

$ aptitude show vim-gnome

软件包: vim-gnome

:

状态: 未安装

版本号: 2:7.2.245-2ubuntu2

优先级: 额外

部分: editors

维护者: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

未压缩尺寸: 2,212k

依赖于: vim-gui-common (= 2:7.2.245-2ubuntu2), vim-common (=

2:7.2.245-2ubuntu2), vim-runtime (= 2:7.2.245-2ubuntu2), libacl1 (>=

2.2.11-1), libbonoboui2-0 (>= 2.15.1), libc6 (>= 2.4), libglib2.0-0

(>= 2.12.0), libgnome2-0 (>= 2.17.3), libgnomeui-0 (>= 2.22.0),

libgpm2 (>= 1.20.4), libgtk2.0-0 (>= 2.17.11), libice6 (>= 1:1.0.0),

libncurses5 (>= 5.6+20071006-3), libpango1.0-0 (>= 1.14.0),

libperl5.10 (>= 5.10.0), libpython2.6 (>= 2.6), libruby1.8 (>=

1.8.7.174), libselinux1 (>= 2.0.85), libsm6, libx11-6, libxt6, tcl8.4

(>= 8.4.16)

建议: cscope, vim-doc, ttf-dejavu, gnome-icon-theme

提供: editor, gvim, vim, vim-perl, vim-python, vim-ruby, vim-tcl

描述: Vi IMproved - enhanced vi editor - with GNOME2 GUI

Vim 是一个与 UNIX 编辑器 Vi 几乎完全兼容的版本。

许多新特性已经加进来了:多次撤销, 语法高亮, 命令行历史, 在线帮助, 文件名补全, 块操作, 折叠, Unicode 支持等。

This package contains a version of vim compiled with a GNOME2 GUI and support

for scripting with Perl, Python, Ruby, and Tcl.

主页:http://www.vim.org/

vim-gtk是一个带有GTK2图形界面的vim,并支持PerlPythonRubyTcl脚本编程。

$ aptitude show vim-gtk

软件包: vim-gtk

:

状态: 未安装

版本号: 2:7.2.245-2ubuntu2

优先级: 额外

部分: universe/editors

维护者: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

未压缩尺寸: 2,208k

依赖于: vim-gui-common (= 2:7.2.245-2ubuntu2), vim-common (=

2:7.2.245-2ubuntu2), vim-runtime (= 2:7.2.245-2ubuntu2), libacl1 (>=

2.2.11-1), libc6 (>= 2.4), libglib2.0-0 (>= 2.12.0), libgpm2 (>=

1.20.4), libgtk2.0-0 (>= 2.17.11), libice6 (>= 1:1.0.0), libncurses5

(>= 5.6+20071006-3), libpango1.0-0 (>= 1.14.0), libperl5.10 (>=

5.10.0), libpython2.6 (>= 2.6), libruby1.8 (>= 1.8.7.174),

libselinux1 (>= 2.0.85), libsm6, libx11-6, libxt6, tcl8.4 (>= 8.4.16)

建议: cscope, vim-doc, ttf-dejavu, gnome-icon-theme

提供: editor, gvim, vim, vim-perl, vim-python, vim-ruby, vim-tcl

描述: Vi IMproved - enhanced vi editor - with GTK2 GUI

Vim is an almost compatible version of the UNIX editor Vi.

Many new features have been added: multi level undo, syntax highlighting,

command line history, on-line help, filename completion, block operations,

folding, Unicode support, etc.

This package contains a version of vim compiled with a GTK2 GUI and support for

scripting with Perl, Python, Ruby, and Tcl.

主页:http://www.vim.org/

那么vim-gnomevim-gtk有什么区别呢?通过Googlevim-gnome vim-gtk”,可以在linuxsir.orgubntuforums.org找到答案。两者几乎没有差别,只是依赖关系不同,vim-gnome 依赖于GNOME库,vim-gtk依赖于GTK库。另外vim-gnomeGNOME的集成度应该会更好一些。

安装vim-gnome

$ sudo aptitude install vim-gnome vim-gtk

使用vim-gnome

$ gvim

vimtutorvimdiff都有相应的gvim版本。

$ gvimtutor

$ gvimdiff

vimtutor会打开一个Vim教程。

vimtutor -ggvimtutor的效果是一样的,都是用givm而不是vim来打开Vim教程(如果已经安装了gvim就用gvim打开,如果没有安装gvim仍然用vim打开)

vimtutor en会打开英文版的Vim教程,当前版本是1.7vimtutor zh会打开中文版的vim教程,当前版本是1.5(而且是繁体中文),版本差异是由翻译进度造成的,英文版总是最新版本。

$ man vimtutor

NAME

vimtutor - the Vim tutor

SYNOPSIS

vimtutor [-g] [language]

DESCRIPTION

Vimtutor starts the Vim tutor.It copies the tutor file first, so that

it can be modified without changing the original file.

The Vimtutor is useful for people that want to learntheirfirstVim

commands.

Theoptional argument -g starts vimtutor with gvim rather than vim, if

the GUI version of vim is available, or falls back to Vimifgvimis

not found.

Theoptional [language] argument is the two-letter name of a language,

like "it" or "es".If the [language] argument is missing, the language

ofthecurrentlocalewill be used.If a tutor in this language is

available, it will be used.OtherwisetheEnglishversionwillbe

used.

Vim is always started in Vi compatible mode.

vimdiff除了正常启动vim,还会设定一些额外的参数,以方便查阅命令行参数指定的文件之间的不同之处。

vimdiff可以同时比较24个文件,文件的不同之处会高亮显示。它主要用于比较和移植同一个文件不同版本所做的更改。

gvimdiff会使用图形界面(如果可用)

vimdiff在启动vim时设定的额外参数包括:

diff:高亮显示文件的不同之处

wrapscrollbindwrap是自动折行,scrollbind是同步滚屏,让文本看起来更舒服

flodmethod:在折叠的情况下行数的范围不会改变。

foldcolumn:会被设置为2,这样可以更容易地识别折叠、打开或关上折叠。

NAME

vimdiff- edit two, three or four versions of a file with Vim and show

differences

SYNOPSIS

vimdiff [options] file1 file2 [file3 [file4]]

gvimdiff

DESCRIPTION

Vimdiff starts Vim on two (or three or four) files.Each file gets its

ownwindow. The differences between the files are highlighted.This

is a nice way to inspect changes and to move changes fromoneversion

to another version of the same file.

See vim(1) for details about Vim itself.

When started as gvimdiff the GUI will be started, if available.

Ineach window the 'diff' option will be set, which causes the differ

ences to be highlighted.

The 'wrap' and 'scrollbind' options are set to make the text look good.

The 'foldmethod' option is set to "diff", which putsrangesoflines

withoutchanges in a fold.'foldcolumn' is set to two to make it easy

to spot the folds and open or close them.

OPTIONS

Vertical splits are used to align the lines, as ifthe"-O"argument

was used.To use horizontal splits instead, use the "-o" argument.

For all other arguments see vim(1).

vim-doc是本地的vimHTML在线文档。

$ aptitude show vim-doc

软件包: vim-doc

:

状态: 未安装

版本号: 2:7.2.245-2ubuntu2

优先级: 可选

部分: editors

维护者: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

未压缩尺寸: 7,037k

描述: Vi IMproved - HTML documentation

Vim 是一个与 UNIX 编辑器 Vi 几乎完全兼容的版本。

许多新特性已经加进来了:多次撤销, 语法高亮, 命令行历史, 在线帮助, 文件名补全,

块操作, 折叠, Unicode 支持等。

This package contains the HTML version of the online documentation.

主页:http://www.vim.org/

安装vim-doc

$ sudo aptitude install vim-doc

vim-python是一个虚拟的软件包,它由vim-gnome, vim-gtk, vim-nox组成。

$ aptitude show vim-python

未发现 vim-python 的已安装或候选版本

软件包: vim-python

状态: 不是一个真实的软件包

提供者:: vim-gnome, vim-gtk, vim-nox

vim-nox是一个提供了Perl, Python, RubyTcl脚本编程支持的vim,它不提供图形界面。

aptitude show vim-nox

软件包: vim-nox

:

状态: 未安装

版本号: 2:7.2.245-2ubuntu2

优先级: 额外

部分: universe/editors

维护者: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>

未压缩尺寸: 1,888k

依赖于: vim-common (= 2:7.2.245-2ubuntu2), vim-runtime (= 2:7.2.245-2ubuntu2),

libacl1 (>= 2.2.11-1), libc6 (>= 2.4), libgpm2 (>= 1.20.4),

libncurses5 (>= 5.6+20071006-3), libperl5.10 (>= 5.10.0),

libpython2.6 (>= 2.6), libruby1.8 (>= 1.8.7.174), libselinux1 (>=

2.0.85), tcl8.4 (>= 8.4.16)

建议: cscope, vim-doc

提供: editor, vim, vim-perl, vim-python, vim-ruby, vim-tcl

描述: Vi IMproved - enhanced vi editor

Vim is an almost compatible version of the UNIX editor Vi.

Many new features have been added: multi level undo, syntax highlighting,

command line history, on-line help, filename completion, block operations,

folding, Unicode support, etc.

This package contains a version of vim compiled with support for scripting with

Perl, Python, Ruby, and Tcl but no GUI.

主页:http://www.vim.org/

vim-scripts是一些挑选出来的脚本的集合,有了它你可以不必自己去寻找脚本。

Vim是一个强大的编辑器,它的脚本编程支持使它能够通过使用插件来增强自己的功能。网上有很多Vim脚本,不过你也可以从核心资源库http://vim.sf.net开始寻找和使用他们。

$ aptitude show vim-scripts

软件包: vim-scripts

:

状态: 未安装

版本号: 20081206-1

优先级: 可选

部分: universe/editors

维护者: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>

未压缩尺寸: 4,080k

推荐: vim, vim-addon-manager

建议: perlsgml, libtemplate-perl

描述: plugins for vim, adding bells and whistles

Vim is a very capable editor. Its scripting support allows the use of plugins

that enhance the functionality of it. Many people have written scripts, they

are scattered all over the web; however, there's a central resource on

http://vim.sf.netto start with.

This is a collection of some of those scripts on a purely subjective and biased

basis.Users can thus have some nice scripts without having to go searching.

The scripts can be installed globally or on a per user basis.

主页:http://www.vim.org/scripts/

安装vim-scripts

$ sudo aptitude install vim-scripts

vim-addon-manager是一个Vim编辑器的插件管理工具。

使用vim-addons命令可以列出系统中安装的Vim插件,然后可以在用户配置文件目录中(~/.vim)安装或删除这些插件。

$ aptitude show vim-addon-manager

软件包: vim-addon-manager

:

状态: 已安装

自动安装:

版本号: 0.4

优先级: 额外

部分: universe/editors

维护者: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>

未压缩尺寸: 127k

依赖于: ruby, vim-common

推荐: vim-tiny | vim | gvim

描述: manager of addons for the Vim editor

vim-addon-manager is a tool for managing addons for the Vim editor.

Using the vim-addons command line the user can list the addons installed on its

system (i.e. which are registered in the vim addons registry) and install or

uninstall each of them in its per-user configuration directory (~/.vim).

Similar actions can be performed by the system administrator to affect all

system users.

Override of addons which are enabled per default on the system, so that they

are not enabled for the current user, is possible too.

$ vim-addons

# Name User StatusSystem Status

align removed removed

alternate removed removed

bufexplorer removed removed

calendar removed removed

closetag removed removed

colors sampler pack removed removed

cvsmenu removed removed

debPlugin removed removed

detectindent removed removed

doxygen-toolkit removed removed

editexisting removed removed

enhanced-commentify removed removed

git-commit removed removed

gnupg removed removed

info removed removed

justify removed removed

lbdbq removed removed

markdown-syntax removed removed

matchit removed removed

minibufexplorer removed removed

nerd-commenter removed removed

omnicppcomplete removed removed

po removed removed

project removed removed

python-indent removed removed

secure-modelines removed removed

snippetsEmu removed removed

sokoban removed removed

supertab removed removed

surround removed removed

taglist removed removed

tetris removed removed

utl removed removed

vcscommand removed removed

vimplate removed removed

whatdomain removed removed

winmanager removed removed

xmledit removed removed

源文档 <http://hi.baidu.com/tigercallme/blog/item/a27370fa997c121a6d22ebd7.html>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics