Novice first experience installing vim and configuration files and plugins in virtual machines in Ubuntu

Source: Internet
Author: User

Because the Linux teacher assigned the homework, so plan to take some time to put their own installation of the process in the blog park, convenient for later review (master bypass)

The first:

VIM installation: Open VIM's terminal

After typing "vi" on the command line and pressing "tab" key, you can see that only VI and Vim.tiny are installed in the current system.

Vim is a text editor developed from VI that is more powerful. And Vim.tiny is a lite version of Vim, so it's imperative to install Vim.

The second: input command: sudo apt-get install VIM-GTK

The last: No action is required, wait for the installation to complete.

After the installation is complete, enter VI at the command line and press the TAB key.

As you can see, there is already a vim command in existence.

The installation was successful. (not very simple.) )

=============================================================================================================== ===========================================================================================

Configuration of Vim just installed Vim, perhaps the interface is not very friendly, which requires us to change the vim configuration file, according to our needs to modify it.
  1. Under command line, enter a command

    You must add sudo, otherwise you are not authorized to edit VIMRC.

    2.

    Configure for my vim. There are a lot of configurations, so I've just installed something that I find useful.

    Enter them to make your vim more beautiful and comfortable.

    Set Nu//on the left line number

    Set TabStop//tab length to 4

    Set nobackup//Overwrite files without backup

    Set Cursorline//Highlight when forward

    Set ruler//display status line at cursor position in lower right corner

    Set autoindent//Auto Indent

    After saving, the configuration is complete.

    =============================================================================================================== =================================================================================

    Vim in the TagList plug-in Installation: (Query the next vim has what plug-ins, plug too much, feel this is more practical.) )

    The TagList plugin is a vim plugin that is based on the ctags to display the current code structure in a split window next to the Vim Code window, adding a convenient level of code browsing.

    TagList is based on the tags file, need to ctags build tags file.

    Installing Ctags,redhat and CentOS can perform yum install Ctags,debian and Ubantu can perform apt-get install Ctags

    Download TagList, address is http://sourceforge.net/projects/vim-taglist/files/vim-taglist/

    Unzip the Taglist_45.zip. You can see that there are two directories of Doc and plugin, structured as follows

    Taglist_45
    || --------doc| \--------Taglist.txt
    |\--------plugin \--------Taglist.vim

    Execute the following shell command, which is the installation complete

    CP  doc/taglist.txt  /usr/share/vim/vim72/doc/cp  plugin/taglist.vim  /usr/share/vim/vim72/plugin

    How to use:

    In the source directory, execute ctags-r to each directory recursively create tags file

    Use VIM to open the source file, execute tlist in command mode, you can enable TagList plug-in,<f1> to view the TagList Help information

Novice first experience installing vim and configuration files and plugins in virtual machines in Ubuntu

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.