Configure some of Vim's fragmented records on the centos6.4

Source: Internet
Author: User

The previous log has been documented in step by step how to configure the Vim development environment on a native Mac with a variety of plugins.

With a certain experience, the configuration of the VIM environment to the lab remote server centos6.4 environment configuration, this machine is the intranet server connected to the outside network more trouble.

The main is that the server can not be networked, the future in the company configuration development machine environment is also basic can not be networked, so when the early adaptation of it.

Here are some of the key points to be recorded, so that after the personal follow-up inspection.

Compiling Vim74

Since the Youcompleteme plug-in requires vim7.3 support, the VIM on the server is 7.2, which is a bit longer. Therefore, the vim74 must be recompiled first.

There are two main problems encountered here:

1. Install dependent Ncurses-devel

2. Compile and install pythong2.7.6

(1) Note Configure shared options (http://taoo.iteye.com/blog/1826912)

(2) If the last hint to compile Python fails, you need to see which libraries are missing (http://www.111cn.net/sys/CentOS/66072.htm For example, the lack of zlib, the compilation of some functional modules will fail )

3. Execution./configue need to check whether all the support ( for example, a compilation to Perl related projects on the problem, simply I put--enable-perlinterp this option removed )

4. Make generally requires root privileges, but make install requires root, because you need to modify something like/usr/bin.

Vim plugin without compiling

Some plug-ins run to rely on Python's packages. For example, just compiled good vim74 and put some plug-ins directly under the bundle, open vim, found that the old prompt import xxx failure ( For example, ultisnips this plugin, the old hint can not find it).

One possible solution is to add a sentence in the. Bash_profile:

Export Ld_library_path=/usr/local/lib

Then no error, the reason is to find a variety of Lib library.

Before the internship, generally run Python code on the development machine, often the python environment directly to the development machine, and then set the next Ld_library_path is OK.

 

Compiling Youcompleteme (YCM)

Due to the inability to network, compiling ycm was a lot of pain.

1. Because CMake is used to compile the YCM shared library, it is first installed on the server CMake

(http://www.cnblogs.com/zhoulf/archive/2013/02/03/2890717.html)

2. Compile to a step, encountered/usr/bin/ld problem, found this post resolution (HTTPS://GROUPS.GOOGLE.COM/FORUM/#!TOPIC/CLOUDI-QUESTIONS/-VDPVKYRSM4). is to see this post, only to know that Python is compiled without the option of shared this, and therefore missing things. It's important to compile python.

3. If the installation is serious, it is necessary to compile CLANG+LLVM, and then compile and install YCM. and want to compile CLANG+LLVM, also need to request the version of GCC, too troublesome, did not go to toss. Second, choose a Linux pre-compiled CLANG+LLVM pre-built package is used directly. ( part of the demon-man problem that follows is also due to this ).

4. Compile and install YCM in addition to make ycm_support_libs, it needs to be executed in the YCM directory./install-- Clang-completer can use Libclang to perform semantics's c-family completion. If you do not execute./install, the YCM server shut down error is reported until Vim is turned on . This problem has also been the longest. Finally, due to the inability to network, so there is no add--clang-completer this option, the results of the completion of the content without parameters.

5. Learn more about the YCM is the C/s structure, so under/tmp/ycmd can see the error log output, compile debug location problem.

Some minor problems

Just finished, directly open vim, found that the delete button is not good, then a bit of a panic, why the wrong again. Later calmed down Google a bit, found that the role of this button in Vim is configurable, do not panic, encountered what problems to solve what problems.

Finally, in addition to ycm semantic some problems, the rest of the plug-ins are normally used.

 

Configure some of Vim's fragmented records on the centos6.4

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.