ubuntu& Red Hat's VIM Universal configuration (file header + One-click Compile execution C/c++/java single file)

Source: Internet
Author: User

Vim is a powerful editor and may be more complex to configure on-line gods. There are many functions. My configuration here will meet the basic requirements. Fast and versatile, as long as you open your own VIMRC files follow my add a few lines of code can be resolved.
Let's look directly at my configuration file.

Let's talk about how Ubuntu and redhat open configuration file VIMRC
* under the Redhat
First switch to root. And then enter

vim /etc/vimrc

under Ubuntu
Direct input

sudo vim /etc/vim/vimrc

After opening the configuration file VIMRC, add the code as shown in the following illustration

    • The configuration here can meet the needs of our general development. Easy to use

    • Want to write a file every time whether it is. C or. h. cpp. Java helps you to automatically add file headers. Just follow the configuration below to write it in your VIMRC config file. The author's name can be changed to their own. You can save it later

    • You want to execute the C/c++/java file with a key compilation. Then add the following code. Illustrated by pressing F4 One-click Compile execution

Once configured, turn on Vim again. haha like

F4 One-click compilation looks like this

Thank you, hope to help you!

ubuntu& Red Hat's VIM Universal configuration (file header + One-click Compile execution C/c++/java single file)

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.