Vim Extension Tool Vim-ide (RPM)

Source: Internet
Author: User

 

With a simple configuration file, Vim is created as a professional IDE that supports Mac Linux Cygwin. Read a few vim profiles and, if necessary, customize the Vim plugin to maximize the vim of the IDE user experience.

Scope of Use

System requirements: Vim 7.2 and later, installed with Ctags and Cscope, perfect support for Linux, Mac, Cygwin. (For a better user experience under Mac, put the shell's profile into Pro) features: Browse and write C + +, Python Project features: Install green simple, function comparable to source insight, but maintain the original vim.

Installation method

1. Copy the. VIMRC and. Vim folder to the home directory, and if the terminal background is white, change the. VIMRC background option to light. 2. Install Cscope ctags. Install with Apt-get: Apt-get install Ctags cscope (with yum installation: Yum installs Ctags cscope, Brew Installation: Brew install Ctags cscope)

Plug-ins to use

Tagbar #函数变量列表 (Modify some bugs, modify the configuration file) Nerdcommenter #注释功能 (Modify the C language by default//comment, modify the configuration file) a #切换头文件和实现文件 (Modify the cross-directory can not find the problem, no modification Configuration file) Nerdtree #目录树 (no modification, modify configuration file) Omnicpp #C/c++ Automatic Completion plug-in (no modification, modify configuration file) Bufexplorer #当前打开的文件列表 (no modification, no modification of configuration files) Autocomp Lpop #自动弹出补全菜单 (no modification, no modification profile) Supertab #按tab补全 (no modification, no modification of configuration files)

Summarize your own general use of the browse and write C + + projects

Open Project:     cd to the project root directory under,vim  (carriage return), must be the engineering root directory. Press F2 to open the file list and select File to open. Index:     The first time you open the project, and the Code updates the index by F7, which is the same value as the update index in Source insight. Browse the code:     the C + + code will often use several features:     1. Jump          F3          jump to a function of the current file via the Tagbar function list          ctrl-]      jump to the position of the word under the cursor defined in the project          gd          if the word under the cursor is a local variable, Press this to jump to the location it defines         :tag word   jump to the location defined by word               ctrl-2 g    jump to the cursor under words in/usr The position defined in/include         ctrl-h, j, k, l  cursor jumps between each window         %           in a size bracket jumps to the corresponding brackets         [[           jump to the beginning of the current function         ][           jumps to the end of the current function         ctrl-o       fallback to the position before the cursor.         ctrl-i      returns after pressing Ctrl-o.     2. Search         ctrl-[ s    Searches the entire project for words under the cursor, but does not include strings and comments.         ctrl-[ t    searches the entire project for words under the cursor, including strings and comments.         :cscope find t word   Search for strings in the project Word.         <F5>        highlight the words under the cursor         #           up search cursor under words         *            down search for words under cursor         /word        Search word word        /\<word\>   search word word, and requires the whole word to match     3. Switch to another file under the project         F2           jump through the file tree.         F4          List of files already open         F6           Two file switch in header file and implementation file.         ctrl-[ f    jump to the file name containing the word under the cursor.         ctrl-[ i    jump to the file containing the word corresponding to the cursor.         ctrl-[ I    jumps to the file containing the current file. CodecWrite A/C + + code:     1. Replace function         :%s /word1/word2/g   Replace the word1 in this file with Word2.     2. Aligning Codes         =            Line code for alignment         ==           align Current line codes         gg=G         align entire file     3. Comments and anti-comment          ,           Note Select lines          .           Anti-Annotation Select BOC

Todo

1.ctags cannot jump 2 if the file encoding is not the same as the terminal code and the jump switch is Chinese. Exit with Cygwin open Nerdtree and Tagbar at the same time, exit error

Origin

When I first started working on Linux C + +, I tried a lot of editing methods, including: Souce Insight: Write code on Linux hosts via samba services on Linux (I don't think the best option is to use the custom version of Vim and Emacs, On the one hand do not need to open the virtual machine interface, on the other hand souce Insight writing code is also very useful. Eclipse: Very good, but do not open the Linux GUI, in addition eclipse runs very slowly, especially the large project QT creator: Even if not the QT project, of course, can also be used in the Linux graphical interface with Qt Creator write code, faster than eclipse run, Of course, if the QT project under Linux is of course Qt Creator is also preferred. Vim and Emacs: as a development environment to add jump and automatic completion of the class of plug-ins. Although they may not be as powerful as other Ides, other Ides need to open up a resource-intensive graphical interface, and vim and Emacs have many benefits that other Ides do not, such as the need for a mouse for all operations, the ability to search by one click, and so on. In addition, they can be directly ssh to the Linux host is directly used, the disadvantage is that it is not easy to get started. Vim and Emacs can be without bounds to add any function of the plug-in, the theory can be implemented in one of the above functions on the other can be achieved, there is no one who is stronger than the problem. From the basic operation of the individual or more like Emacs, but because the toss Emcas plugin more difficult than vim, so chose vim. This vim customization is gradually perfected in a year, in which a period of time to turn to Emacs, and then toss Cedet really did not toss not perfect, can not find who used to exchange, so eventually back to the vim. The principle of this vim customization is to keep it as streamlined as possible, fast and better compatible, but to achieve more powerful, practical, and user-friendly features.

Vim Extension Tool Vim-ide (RPM)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.