国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

How did I install Youcompleteme

TalkingData / 914人閱讀

I always want imporve my skills on VIM. Thus recently I spent two days on setting up a VIM IDE for C/C++ proprogramming. Below are some useful steps for YCM.

Specifications

Mac Info
OS X Yosemite

Version 10.10.5

VIM
Mac OS Unix Version (MacVIM)

Vi Improved 8.0

And I also have installed HomeBrew for Mac and Vundle for Vim plugins management.

Latest MacVim

First make sure you have HomeBrew in your computer, because it is a great tool to install some missing packages and tools in Mac OS.

You always want to install the lates MacVim, which is required by Youcompleteme. In your terminal, run:

brew update
brew install vim && brew instal macvim
brew link macvim

You should now be able to launch MacVIM from the terminal using mvim.

Reference

Install YCM using Vundle

The following steps are according to the instruction in Github.

Note: I saw in the installation section that you can install it in a ideal way or following the full guidance. I tried the ideal way, but reality turned out never to be ideal. SO please follow the full guidance. It will help you understand what is going on inside YCM.

To use Vundle for installation, put the following line in your .vimrc configuration file:

Plugin "valloric/youcompleteme"

And then run PluginInstall in your VIM commandline. It should work just fine.

Install CMake using Brew

CMake is a helpful tool to compile the source file, and is also suggested in the full guidance. A easy way to install it is using HomeBrew. Run these:

brew install cmake

Reference

Just for synchronization, if you type in the terminal cmake, you should get the usage info for the function.

Download and extract libclang for C/C++ semantic completion

This is an important step to make sure that your YCM will be powered to do semantic completion for the specific languages.

Here comes HomeBrew again. Run brew install llvm will download and extract the libclang for you. Wait a minute when the process is done. Take a look at the return information, which tells you the location of the extrated files. Take note and you"ll need it afterwards ! For me, my llvm folder locates at /usr/local/opt/llvm.

Compile YCM

Excitingly, we are now good to compile the ycm_core library. Please refer to more information in instruction in Github.

First, confirm that where your youcompleteme folder locates, ~/.vim/bundle/youcompleteme for me.

Then, prepare for building files. In the terminal:

cd ~
mkdir ycm_build
cd ycm_build

Since I DO care about semantic support for C-family (Hey, can anyone tell me what languages the "C-family" actually includes ???), make sure that you have your extracted files located at the right place. In the terminal:

cp -R /usr/local/opt/llvm ~/ycm_temp
mv ~/ycm_temp/llvm ~/ycm_temp/llvm_root_dir

Now you should have the directorie at the right location. To assure you, the directory, llvm_root_dir, has something like bin, lib, and include etc, and now you have two filders named ycm_build and ycm_temp under ~/.

Inside the ycm_build directory, run in the terminal:

cd ~/ycm_build
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/ycm_temp/llvm_root_dir . ~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
sudo cmake --build . --target ycm_core --config Release

"Unix Makefiles" is a generator tag. If you want to know more, please refer to instruction in Github.

Extra files to configure

Good luck to you if you don"t have any errors. Now your YCM is supposed to work. But before we finish, we need to configure an extra file.

You can consider using YCM-Generator to generate the need file, accoding to the doc.

If you don"t want to bother with it, simply copy this file, put it at ~/.vim/.ycm_extra_conf.py", and lastly put let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py" in your .vimrc.

YCM will recersively find the closest extra conf file, starting from the current location.

Congratulations, your YCM should work just fine.

Python quit unexpectedly every time I launch my MacVIM

This is probably you have linked YCM and MacVIM to different python. Try this:

cd /usr/local/Frameworks/Python.framework/Versions/2.7
cp Python Python_bak

cd /System/Library/Framework/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS
sudo cp Python Python_bak
ln -sf Python /usr/local/Framework/Python.framework/Versions/2.7/Python

Reference

To be continued

The actual efficiency needs to be tested, since I just finished the configuration myself.

How to generate personalized extra conf file.

9/25/2016
Weiming

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/24881.html

相關文章

  • Vim插件簡單介紹

    摘要:轉換時支持模板文件,配合強大的模板文件,可以自己創建,或者是實現語法高亮,還支持數學公式編輯。標簽文件允許這些項目能夠被一個文本編輯器或其它工具簡捷迅速的定位。 原文地址 Vim作為一個強大的編輯器,再配合強大的插件,就可以稱得上為編輯神器了。 pathogen pathogen為管理插件的插件,類似的還有vundle。在 Pathogen 之前,安裝插件就是把插件文件放在.vim目錄...

    dackel 評論0 收藏0
  • Mac 下配置 Vim 代碼補全:YouCompleteMe

    摘要:引言無疑是世界上最好用的編輯器之一為了不引起戰爭。本文將介紹一種推薦的代碼補全工具,并且一步步介紹它的安裝方式。是一個比較完備,并且正在日漸完備的代碼補全插件。下面將介紹的安裝及基本配置。 引言 Vim 無疑是世界上最好用的編輯器之一(為了不引起戰爭 →_→)。在廣大程序員用 Vim 敲代碼的過程中,代碼補全功能能夠大大提高生產力,尤其是對于從各種 IDE 轉到 Vim 的程序員來說...

    Simon_Zhou 評論0 收藏0
  • 我的vim配置文件,再度升級

    摘要:不過近日來隨著最后幾個補全插件的加入和配置調整,這個配置文件已經比較完整,因此可以好好坐下來,對使用方法和注意點作一介紹。更建議你打開里面的各個文件查看,學習。 中文介紹 原來的repo放在 spf13-vim-leoatchina,因為原來一時腦抽,把中文字體放進去后導致體積較大,影響速度,所以重開一個repo并把windows下的工具分開,以增加clone速度。 現在的配置是在 l...

    Simon_Zhou 評論0 收藏0

發表評論

0條評論

最新活動
閱讀需要支付1元查看
<