[建议]集中整理使用VIM开发C/C++程序
-
- 帖子: 305
- 注册时间: 2006-04-13 13:53
[建议]集中整理使用VIM开发C/C++程序
只是知道VIM功能十分强大,可以搭建一个C/C++的IDE环境。
但是,很多新手(包括俺)都不知道该怎么搭这个环境。
我们多么希望高手不吝赐教,可以指点一下我们这些新手?
同时,我也希望,大家能够把使用VIM搭建C/C++IDE环境的过程经验汇集起来,做成精华帖或者是wiki。供大家学习交流使用。
不知道各位意下如何?
但是,很多新手(包括俺)都不知道该怎么搭这个环境。
我们多么希望高手不吝赐教,可以指点一下我们这些新手?
同时,我也希望,大家能够把使用VIM搭建C/C++IDE环境的过程经验汇集起来,做成精华帖或者是wiki。供大家学习交流使用。
不知道各位意下如何?
-
- 帖子: 305
- 注册时间: 2006-04-13 13:53
-
- 帖子: 305
- 注册时间: 2006-04-13 13:53
找到这个word_complete.vim还不错。
下载地址是:http://vim.sourceforge.net/scripts/down ... rc_id=5704
http://vim.sourceforge.net/scripts/scri ... ript_id=73
description
---------------------
Each time you type an alphabetic character, the script attempts
to complete the current word. The suggested completion is selected
in Select mode, so you can just type another character to keep going.
Other options: <Tab> to accept, <BS> to get rid of the completion,
<Esc> to leave Insert mode without accepting the completion, <C-N>
or <C-P> to cycle through choices, <C-X> to enter <C-X> mode.
Limitations:
The script works by :imap'ping each alphabetic character, and uses
Insert-mode completion (:help i_ctrl-p). It is far from perfect. For example, the :imap's mean that you are constantly switching out of Insert mode, which means that undo only works a few characters at a time. This also messes up any abbreviations you may have defined. Since Select mode uses the same mappings as Visual mode, the special keys mentioned above may conflict with what you are used to in Visual mode. I have received one report that mswin.vim interferes with this script.
Every second character you type is in Select mode, so with versions of vim before 6.2, completions are offered only half the time.
install details
---------------------------
:source it from your vimrc file or drop it in your plugin directory.
To activate, choose "Word Completion" from the Tools menu, or type
:call DoWordComplete()
To make it stop, choose "Tools/Stop Completion," or type
:call EndWordComplete()
If you want to activate word completion for every buffer, add the line
:autocmd BufEnter * call DoWordComplete()
to your vimrc file.
下载地址是:http://vim.sourceforge.net/scripts/down ... rc_id=5704
http://vim.sourceforge.net/scripts/scri ... ript_id=73
description
---------------------
Each time you type an alphabetic character, the script attempts
to complete the current word. The suggested completion is selected
in Select mode, so you can just type another character to keep going.
Other options: <Tab> to accept, <BS> to get rid of the completion,
<Esc> to leave Insert mode without accepting the completion, <C-N>
or <C-P> to cycle through choices, <C-X> to enter <C-X> mode.
Limitations:
The script works by :imap'ping each alphabetic character, and uses
Insert-mode completion (:help i_ctrl-p). It is far from perfect. For example, the :imap's mean that you are constantly switching out of Insert mode, which means that undo only works a few characters at a time. This also messes up any abbreviations you may have defined. Since Select mode uses the same mappings as Visual mode, the special keys mentioned above may conflict with what you are used to in Visual mode. I have received one report that mswin.vim interferes with this script.
Every second character you type is in Select mode, so with versions of vim before 6.2, completions are offered only half the time.
install details
---------------------------
:source it from your vimrc file or drop it in your plugin directory.
To activate, choose "Word Completion" from the Tools menu, or type
:call DoWordComplete()
To make it stop, choose "Tools/Stop Completion," or type
:call EndWordComplete()
If you want to activate word completion for every buffer, add the line
:autocmd BufEnter * call DoWordComplete()
to your vimrc file.
-
- 帖子: 305
- 注册时间: 2006-04-13 13:53
-
- 帖子: 305
- 注册时间: 2006-04-13 13:53
- lysting
- 帖子: 41
- 注册时间: 2006-07-13 11:43
- 来自: 深圳
- 联系:
Re: [建议]集中整理使用VIM开发C/C++程序
没必要那么麻烦吧,其实vim有其他IDE所具有的功能,到 vim.org看看,kuerbt 写了:只是知道VIM功能十分强大,可以搭建一个C/C++的IDE环境。
但是,很多新手(包括俺)都不知道该怎么搭这个环境。
我们多么希望高手不吝赐教,可以指点一下我们这些新手?
同时,我也希望,大家能够把使用VIM搭建C/C++IDE环境的过程经验汇集起来,做成精华帖或者是wiki。供大家学习交流使用。
不知道各位意下如何?
有什么问题google之都是可以解决的。
我的一般就是
$ cp /usr/share/vim/vim70/vimrc_example.vim ~/.vimrc
缩进
: set shiftwidth=4
显示中文:
:set fencs=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
下载
cppcomplete.vim bufexplorer.vim c.vim taglist.vim svncommand.vim 等都差不多够用了。
结合 ctags,subversion,gdb等,练多了coding的速度自然加快。
有空可以选择的翻看 vim 文档,减少一些不必要的重复蛮力工作。
that is all.
-
- 帖子: 18
- 注册时间: 2008-01-12 0:09
Re: [建议]集中整理使用VIM开发C/C++程序
太好了,本来就要学习vim,原来比想象中的还强大,mark后学习之
-
- 帖子: 26
- 注册时间: 2009-10-15 3:59
Re: [建议]集中整理使用VIM开发C/C++程序
楼主精神可嘉啊,佩服佩服,我一直用VIM,基本上不用插件,就是弄点syntax highlighting以几整一个好点得.vimrc。找东西就grep。。。傻是傻点,不过应付现在得工作也足够了。期待楼主整理啊。。
-
- 帖子: 31
- 注册时间: 2008-06-09 9:21
Re: [建议]集中整理使用VIM开发C/C++程序
期待中。。。。
- ChloeRei
- 帖子: 1021
- 注册时间: 2007-11-23 9:49
- mkailxr
- 帖子: 62
- 注册时间: 2009-10-20 13:13
-
- 论坛版主
- 帖子: 21308
- 注册时间: 2007-08-02 20:29
- 系统: 窓辺とうこ
Re: [建议]集中整理使用VIM开发C/C++程序
楼上的别再挖了