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)