欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Vim
来自开放百科 - 灰狐
(版本间的差异)
小 (→链接) |
|||
(未显示1个用户的39个中间版本) | |||
第1行: | 第1行: | ||
− | Vim | + | [[Image:Vim-90x90.gif|right]] |
− | + | Vim 和 [[GNU Emacs]] 作为开源世界最重要的编辑器,以其强大的功能和可定制能力被众多开发者所喜爱。Vim 和 GNU Emacs 是系统开发人员的至爱。 | |
+ | Vim 是 [[Vi]] 的基础上发展起来的. | ||
+ | |||
+ | ==新闻== | ||
+ | {{SeeWikipedia|Vim (text editor)}} | ||
+ | <rss>http://feed43.com/vim-scripts.xml|short|date|max=10</rss> | ||
+ | |||
+ | ==安装== | ||
+ | *源代码 | ||
+ | git clone https://github.com/vim/vim | ||
+ | cd vim/src | ||
+ | make | ||
+ | sudo make install | ||
+ | *[https://github.com/macvim-dev/macvim macvim] | ||
+ | *brew install vim | ||
+ | |||
+ | ==GTK== | ||
+ | apt-get install vim-gtk // enhanced vi editor - with GTK2 GUI | ||
+ | gvim & | ||
+ | |||
+ | 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-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 | #apt-get install vim-gtk // GTK2 Version, 将 remove vim-python , 安装 vim-python 将 remove vim-gtk | ||
gvim | gvim | ||
#apt-get install vim-gnome // GNOME2 Version , 将 remove vim-gtk, 安装 vim-python 将 remove vim-gnome | #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 nu! // 显示行号 | ||
:set cin! // c语言自动缩进 | :set cin! // c语言自动缩进 | ||
+ | 直接输入G,就是到文件末尾了 | ||
==disable VIM swap and backup== | ==disable VIM swap and backup== | ||
在 .vimrc 文件中加入 | 在 .vimrc 文件中加入 | ||
第17行: | 第46行: | ||
注意:Add these lines to the bottom ,要加到文件末尾 | 注意:Add these lines to the bottom ,要加到文件末尾 | ||
==UTF-8== | ==UTF-8== | ||
− | 在 .vimrc 或 vimrc 文件中加入, /etc/vim/vimrc | + | 在 .vimrc 或 vimrc 文件中加入, /etc/vim/vimrc or /etc/vim/gvimrc |
set encoding=utf-8 | set encoding=utf-8 | ||
set fileencoding=chinese | set fileencoding=chinese | ||
第25行: | 第54行: | ||
*[[Vim Taglist]] | *[[Vim Taglist]] | ||
==C/C++== | ==C/C++== | ||
+ | *[https://github.com/jeaye/color_coded color_coded] A vim plugin for libclang-based highlighting in [[C programming language|C]], [[C++]], [[Objective-C]] | ||
+ | *[https://github.com/octol/vim-cpp-enhanced-highlight vim.cpp] Additional Vim syntax highlighting for C++ (including C++11/14) | ||
+ | *[vim-clang-format] for C, C++ and Objective-C | ||
+ | |||
+ | ==Go== | ||
+ | apt-get install vim-syntax-go | ||
+ | |||
+ | ==Erlang== | ||
+ | apt-get install vim-vimerl // Erlang plugin for Vim | ||
+ | apt-get install vim-vimerl-syntax // Erlang syntax for Vim | ||
+ | |||
+ | mkdir -p ~/.vim/autoload ~/.vim/bundle | ||
+ | curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim | ||
+ | vim ~/.vimrc 加入 | ||
+ | execute pathogen#infect() | ||
+ | syntax on | ||
+ | filetype plugin indent on | ||
+ | let g:erlangManPath="/usr/local/lib/erlang/man" | ||
+ | cd ~/.vim/bundle | ||
+ | git clone https://github.com/jimenezrick/vimerl.git | ||
+ | or git clone git://github.com/tpope/vim-sensible.git | ||
+ | |||
+ | *[http://blog.erlware.org/how-to-use-vim-for-erlang-development/ How to use Vim for Erlang Development] | ||
==Python== | ==Python== | ||
第38行: | 第90行: | ||
==Ruby== | ==Ruby== | ||
− | + | apt-get install vim-rails // vim development tools for Rails development | |
+ | apt-get install vim-ruby // vim-ruby - Vi IMproved, with ruby scripting support | ||
==Tcl== | ==Tcl== | ||
第47行: | 第100行: | ||
*[http://www-128.ibm.com/developerworks/cn/linux/l-tip-vim3/ Vim 实用技术,第 3 部分: 定制 Vim] | *[http://www-128.ibm.com/developerworks/cn/linux/l-tip-vim3/ Vim 实用技术,第 3 部分: 定制 Vim] | ||
*Vim User Manual - http://www.huihoo.com/gnu/vim/vimum.html | *Vim User Manual - http://www.huihoo.com/gnu/vim/vimum.html | ||
+ | ==图集== | ||
+ | <gallery> | ||
+ | image:vim-go.png|vim-go | ||
+ | </gallery> | ||
+ | |||
+ | ==链接== | ||
+ | *[http://www.vim.org/ Vim官网] | ||
+ | *[http://docs.huihoo.com/vim/ Vim文档] | ||
+ | *[https://github.com/b4winckler/macvim vim @ github] | ||
+ | *[http://www.vimer.cn/ Vimer的程序世界] | ||
+ | *[https://www.zhihu.com/question/19870551 Vim 比起 IDE 的优势是什么?] | ||
+ | |||
+ | [[category:vim]] | ||
+ | [[category:editor]] | ||
+ | [[category:c programming language]] | ||
+ | [[category:huihoo]] |
2017年11月4日 (六) 15:56的最后版本
Vim 和 GNU Emacs 作为开源世界最重要的编辑器,以其强大的功能和可定制能力被众多开发者所喜爱。Vim 和 GNU Emacs 是系统开发人员的至爱。
Vim 是 Vi 的基础上发展起来的.
目录 |
[编辑] 新闻
您可以在Wikipedia上了解到此条目的英文信息 Vim Thanks, Wikipedia. |
自http://feed43.com/vim-scripts.xml加载RSS失败或RSS源被墙
[编辑] 安装
- 源代码
git clone https://github.com/vim/vim cd vim/src make sudo make install
- macvim
- brew install vim
[编辑] GTK
apt-get install vim-gtk // enhanced vi editor - with GTK2 GUI gvim &
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语言自动缩进 直接输入G,就是到文件末尾了
[编辑] 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++
- color_coded A vim plugin for libclang-based highlighting in C, C++, Objective-C
- vim.cpp Additional Vim syntax highlighting for C++ (including C++11/14)
- [vim-clang-format] for C, C++ and Objective-C
[编辑] Go
apt-get install vim-syntax-go
[编辑] Erlang
apt-get install vim-vimerl // Erlang plugin for Vim apt-get install vim-vimerl-syntax // Erlang syntax for Vim
mkdir -p ~/.vim/autoload ~/.vim/bundle curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim vim ~/.vimrc 加入 execute pathogen#infect() syntax on filetype plugin indent on let g:erlangManPath="/usr/local/lib/erlang/man" cd ~/.vim/bundle git clone https://github.com/jimenezrick/vimerl.git or git clone git://github.com/tpope/vim-sensible.git
[编辑] 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-rails // vim development tools for Rails development 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
- Vim 实用技术,第 1 部分: 实用技巧
- Vim 实用技术,第 2 部分: 常用插件
- Vim 实用技术,第 3 部分: 定制 Vim
- Vim User Manual - http://www.huihoo.com/gnu/vim/vimum.html
[编辑] 图集
[编辑] 链接
分享您的观点