Vim

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
第1行: 第1行:
Vim 和 GNU Emacs 作为开源世界最重要的编辑器,以其强大的功能和可定制能力被众多开发者所喜爱。Vim 和 GNU Emacs 是系统开发人员的至爱。
+
Vim 和 [[GNU Emacs]] 作为开源世界最重要的编辑器,以其强大的功能和可定制能力被众多开发者所喜爱。Vim 和 GNU Emacs 是系统开发人员的至爱。
  
 
http://www.vim.org/
 
http://www.vim.org/

2007年3月2日 (五) 12:14的版本

Vim 和 GNU Emacs 作为开源世界最重要的编辑器,以其强大的功能和可定制能力被众多开发者所喜爱。Vim 和 GNU Emacs 是系统开发人员的至爱。

http://www.vim.org/ Debian vim stable version: 6.3.82

#apt-get install vim-full // vim-full - Vi IMproved - full fledged version of the enhanced vi editor
#apt-get install vim-gtk // GTK2 Version, 将 remove vim-python , 安装 vim-python 将 remove vim-gtk
gvim 
#apt-get install vim-gnome // GNOME2 Version , 将 remove vim-gtk, 安装 vim-python 将 remove vim-gnome

Version 7.0

wget ftp://ftp.vim.org/pub/vim/unix/vim-7.0.tar.bz2
bunzip2 vim-7.0.tar.bz2
tar xvf vim-7.0.tar
cd vim70
./configure --with-tlib 
checking for linking with yes library... configure: error: FAILED 

目录

常用命令

:set nu! // 显示行号
:set cin! // c语言自动缩进

disable VIM swap and backup

在 .vimrc 文件中加入

set nobackup
set nowritebackup
set noswapfile

注意:Add these lines to the bottom ,要加到文件末尾

UTF-8

在 .vimrc 或 vimrc 文件中加入, /etc/vim/vimrc or /etc/vim/gvimrc

set encoding=utf-8
set fileencoding=chinese
set fileencodings=ucs-bom,utf-8,chinese
set ambiwidth=double

Vim Scripts

C/C++

Python

#apt-get install vim-python // vim-python - Vi IMproved, with python scripting support

python.vim : A set of menus/shortcuts to work with Python files

http://vim.sourceforge.net/scripts/script.php?script_id=30

将 python.vim 放在 C:\Program Files\Vim\vim70\plugin ,即在下次启动 vim 后,在菜单上就会显示Python菜单条目。

Perl

#apt-get install vim-perl // vim-perl - Vi IMproved, with perl scripting support

PHP

Ruby

#apt-get install vim-ruby // vim-ruby - Vi IMproved, with ruby scripting support

Tcl

#apt-get install vim-tcl // vim-tcl - Vi IMproved, with tcl scripting support

Docs

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱