Ubuntu Build a powerful Ide--vim + vundle + plugin (next)

Source: Internet
Author: User

In the previous section (http://blog.csdn.net/lu_embedded/article/details/76732965) we have downloaded and installed some plug-ins through Vundle, some of which can be used directly, some need to be configured, Some need to compile, below we Yi Yilai to see some commonly used plug-ins should be how to use it.

The first thing to talk about is Youcompleteme, it should be the most difficult to install a plugin. Vundle has helped us do a part of the work, but can not make it work properly, for C + + users, we also need to compile ycm_core.so and libclang.so. The compilation method is as follows:

$ CD ~/.vim/bundle/youcompleteme

$./install.sh--clang-completer
warning:this script is deprecated. Use the install.py script instead.
Error:please install CMake and retry.

$./install.py--clang-completer
error:please install CMake and retry.

There are two installation scripts in the Youcompleteme directory, install.sh and install.py, apparently according to the performance, install.sh has been invalidated, and the final execution is install.py. However, CMake support is needed.
So let's apt-get:

$ sudo apt-get install CMake

Unfortunately, for Ubuntu 12.04 users, this approach doesn't work. Because the CMake required by install.py requires more than 2.8.11 version. So let's just install it manually:

$ wget http://www.cmake.org/files/v2.8/cmake-2.8.12.1-Linux-i386.tar.gz
$ tar zxvf Cmake-2.8.12.1-linux-i386.tar.gz
$ cd cmake-2.8.12.1-linux-i386
$ sudo cp bin/*/usr/bin/
$ sudo cp-r share /cmake-2.8/usr/share/

OK, now you can continue./install.py--clang-completer, unfortunately not yet successful, prompted as follows:

$./install.py--clang-completer searching Python 2.7 libraries ... Found Python library:/usr/lib/python2.7/config/libpython2.7.so Found python Headers folder:/usr/include/python2.7- The C compiler identification is GNU 4.6.3--The CXX compiler identification's GNU 4.6.3--Check for working C compiler :/USR/BIN/CC-Check for working C compiler:/USR/BIN/CC--works--detecting C compiler ABI Info--detecting C Compil ER ABI info-done--Check for working CXX compiler:/usr/bin/c++--Check for working CXX: compiler--/usr/bin/c++ S--Detecting CXX compiler ABI Info--detecting CXX compiler ABI Info-done CMake Error at cmakelists.txt:217 (message)
  : Your C + + compiler does not fully support c++11. ......

Obviously, this time because the C + + compiler does not fully support C + + 11, because the g++ 4.8 version is fully supported c++11 AH. Ubuntu 12.04 is installed in the Apt-get 4.6 version, so it's a manual upgrade to GCC and g++. Specific method reference: Http://www.linuxidc.com/Linux/2014-03/97445.htm.
Oh. I was so commiseration that I thought it was all over, and the result was a mistake:

......
g++: Internal compiler error:killed (program Cc1plus)
to submit a full bug,

After the inspection found that because my virtual machine memory is not enough, compile Linux is no problem, did not expect to compile this will be problematic ... Well, in this case, we can increase the virtual machine memory allocation, or temporarily use the swap partition to solve.
Execute again./install.py--clang-completer, this time finally smoothly compile passed. Forget the screenshot ... But that's okay, we'll see Libclang.so and ycm_core.so on the third_party/ycmd/catalogue.

$ cd ~/.vim/bundle/youcompleteme/third_party/ycmd/
$ ls *.so*
libclang.so.4    libclang.so.4.0    ycm_ Core.so

Another step, running vim, we found that the. ycm_extra_conf.py file was missing. Then copy it:

$ CD ~/.vim/bundle/youcompleteme/
$ CP./third_party/ycmd/examples/.ycm_extra_conf.py ~/.vim/

Then add the following configuration to the ~/.VIMRC:

Let g:ycm_server_python_interpreter= '/usr/bin/python ' let
g:ycm_global_ycm_extra_conf= ' ~/.vim/.ycm_extra_ conf.py '

OK, open vim and try it.

Finish Youcompleteme is completed a big step, the use of other plug-ins are relatively simple, I am here about the list of plug-ins and their role bar. (Note: Some plug-ins exist with the included relationship, some plug-ins have similar functionality, so select some of them to use.) )
youcompleteme--code complement syntastic--syntax check supertab--make Tab shortcuts have a faster contextual hint function ctags--implement variable name, function name jump (need to traverse source code file generation tags file) cscop e--Upgrade version Ctags taglist--display the current file of macros, global variables, functions, such as tag (similar to the Sourceinsight function) tagbar--taglist alternatives (more suitable for C + +) autopairs--Auto Insert and formatting parentheses powerline--status bar vim-airline--powerline alternatives echofunc--automatically display function declarations snipmate--automatically insert code (Code reuse tool) nerdtree--file browser (tree directory) ctrlp--File browser (redefining open directories and files, more suitable for large-scale project file browsing) minibufferexplorer--buffer File Manager nerdcommenter--Quick Comment undotree--support undo and Redo gdbmgr--Debugger

molokai--Color Theme

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.