How to install and configure Vim IDE for Linux systems

  
                

In Linux systems, if you want to edit text or code efficiently, you need to use some editors. For example, Vim IDE is a useful editor. This article will teach you how to install and configure the Vim IDE for Linux systems.

Vim configuration features

1. Installation Vim

installed, in Linux is easy to open the terminal, enter several orders can be completed It is.

sudo apt-get install vim

sudo apt-get install gvim

sudo apt-get install git (this is very important, use git when downloading plugins later) To download)

This is the first command. I said that I have already installed it and I don't have to install it. After installing it, you can directly enter vim or git or gvim in the terminal to know if it is installed.

You can also use aptitude to install it. Install aptitude before using aptitude to install it. sudo aptitude install vim

sudo aptitude install gvim

Sudo aptitude install git

Then, create a .vim directory in the user's home directory, and create a bundle directory in the .vim directory. The plugins that Vundle automatically downloads will be saved here.

The vundle can automatically download and install the plugin. Just use the Bundle command after the "My Bundles Here" comment to list the required plugins, one for each plugin, and then run the :BundleInstall command. Vundle supports github.com and Vim's official website vim.org.

mkdir .vim/bundle

Then, go to the Bundle directory and use the git clone command to download the vundle.

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

Once the download is complete, you can see the vundle directory under bundle.

2. Create and configure the .vimrc file

You can type vim in the terminal and type: echo $VIM to see your vim directory, and then see if there is any. Vimrc file, if you don't have it, create it yourself.

My .vimrc file is in the /usr/share/vim directory (I don't know if everyone's .vimrc is also in this directory). If not, create it yourself with the command: touch .vimrc

First come to the basic configuration, do not plug in, map those more advanced things first. Can be done: code color matching, tab indentation, automatic saving, especially showing the current editing line, bracket matching, search search, system public clipboard, code folding, etc. As follows:

Note: Changing the .vimrc file requires sudo vim vimrc to use vim to modify, you can also use sudo gedit vimrc Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved