Clang_complete vim simple configuration, clang_completevim
Vim is very powerful. You can view it through man vim (man is the manual for viewing commands, and man can view the corresponding usage by adding commands)
Below is a brief description of the following simple vimrc Configuration
Look at the corresponding vimrc
Set number "show row number syntax on" syntax highlight set autoindent "auto indent set showmatch" display corresponding parentheses (you place the cursor on a square bracket and the corresponding parentheses will be automatically located) set vb t_vb = "Remove warning sound set raudio" display the cursor status when editing set nohls "allows you to search for set cursorline in editing mode" display the row where the cursor is located
You can create a new. vimrc in
1. Switch to the Home Directory
cd ~
2. Create a new file
vim .vimrc
3. Add related statements in the statement (you can write the preceding statements directly) and save and exit.
Try to see if it feels much better.
Currently, vim cannot be automatically completed. Configure the following:
You can directly complete c ++ and stl code.
There is also code for custom struct or classes.
Let's take a look at the specific configuration.
1. Install the clang Compiler
Sudo apt-get install clang2. download <a target = _ blank href = "www.vim.org/scripts/script.php? Script_id = 3302 & rating = life_changing "> clang_complete.vmb </a>
3. Download The clang_complete plug-in. Find the download link below.
Clang_complete
Decompress clang_complete-master.zip
Enter the extract directory
cd clang_complete-master
Run
make
4. Copy the downloaded clang_complete.vmb to the home directory. vim/plugin
cp clang_complete.vmb ~/.vim/plugin/
OK. Now you can complete it.
After vim is configured, what is better than the editor in IDE?
The text editing capability is better than ide, and the speed is faster than ide.
Don't believe in the story that vim emacs is better than ide. It is just a text editor and ide Code Completion, refactoring, integrated publishing, and other functions. vim is incomparable, it depends on your personal needs.
Vim is just a text editor. You can expand it to enhance its functions, but the enhancements are also limited, just as normal people can train some muscles through the gym, but it is impossible for you to build the same muscles as Arnold.
How to configure vim
It is generally about modifying the content of vimrc. You can try this:
"An example for a vimrc file. "" Maintainer: Bram Moolenaar <Bram@vim.org> "Last change: 2011 Apr 15" "To use it, copy it to" for Unix and OS/2 :~ /. Vimrc "for Amiga: s :. vimrc "for MS-DOS and Win32: $ VIM \ _ vimrc" for OpenVMS: sys $ login :. vimrc "When started as" evim ", evim. vim will already have done these settings. if v: progname = ~? "Evim" finishendif "Use Vim settings, rather than Vi settings (much better !). "This must be first, because it changes other options as a side effect. set nocompatible "allow backspacing over everything in insert modeset backspace = indent, eol, startif has (" vms ") set nobackup" do not keep a backup file, use versions insteadelse set backup "keep a backup fileendifset history = 50" keep 50 lines of command line historyset Rory "show the cursor position all the timeset showcmd" display incomplete commandsset incsearch "do incremental searching "For Win32 GUI: remove 't'flag from 'guioptions': no tearoff menu entries "let & guioptions = substitute (& guioptions," t "," "," g ") "Don't use Ex mode, use Q for formattingmap Q gq" CTRL-U in insert mode deletes a lot. use CTRL-G u to first break undo, "so that you can undo CTRL-U after inserting a line break. inoremap <C-U> <C-G> u ...... remaining full text>