Vim color selection + Press <F9> Auto compile Run + other basic configuration (Ubuntu)

Source: Internet
Author: User

The final exam this time = = Water break, now ready to transform vim.

First you need to understand the difference between vim:http://coolshell.cn/articles/5426.html

And then you must have been in the bare vim water a pitch? Must have found some disharmony in vim?

All right, first open the terminal input:

Cd

And then:

Vim. VIMRC

Enter the following statement in this file:

Syntax onfiletype indent plugin on " Auto Align set ruler" show ruler set nu" line number set showcmd"  Show Commands

After this setting, with vim and with codeblocks has not been differentiated.

But wit like us, hehehehe, must find codeblocks on, can press F9 on the function of compiling and running is gone.

Table anxious, we continue to enter in. VIMRC as follows:

Map <F9>: Call COMPILERUNGCC () <CR>func! COMPILERUNGCC ()             " W "            if ' CPP '                      "!g++%-o%<" "!time ./%<                        "            endifendfunc

And then... Vim is completed with one-click Compile run. If you want to use Vim to write other, like Java, HTML, there are similar commands

You can find the answers you want here at HTTPS://GITHUB.COM/MA6174/VIM/BLOB/MASTER/.VIMRC.

After that is the most important and important step, how to turn the Vim interface into a comfortable place:

Font Color configuration:

The old way on. VIMRC Input:

: ColorScheme Blue

Then the blue part can also be changed to other colors you like, to find, open the terminal:

Input:

CD./usr/share/vim/vim74/colors

And then you find a whole bunch of xx.vim files, and you can find one you like.

Vim color selection + Press <F9> Auto compile Run + other basic configuration (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.