Some problems encountered in using vim configuration Scheme spf13
Purpose: to achieve my own goal of customizing and installing plug-ins
Preparation before installing YCM (YouCompleteMe) automatic completion artifact
Install the compilation environment first:
Sudo apt-get install build-essential cmakesudo apt-get install python-dev
Run the command before installation (you'll know what it's for later):
Vim .vimrc.before.local
Write the following code in it (my own configuration):
Let GRV spf13The bundlebread groups = ['general',' writing', 'programming',' python', 'misc',' youcompleteme',]
The above code will install the plug-in according to the configuration by default when installing spf13. At the bottom, I will explain why it is configured in this way.
Install the git software (to clone the spf13 project if you don't have it):
Sudo apt-get install git
Change to the $HOME directory and run:
Cd $HOMEgit clone https://github.com/spf13/spf13-vim.git
After cloning the project, a folder called "spf13-vim" in the HOME directory will enter the folder and run
. / bootstrap.sh
It will be installed according to its own configuration.
YCM compilation installation: after all plug-ins have been installed (it may take some time to download YCM), then compile and install:
Before compiling and installing YCM, you need the environment of Clang and LLVM to compile. We set up a directory to store temporarily compiled files. (all the things that install YCM are executed in the established directory, execute commands) there are two ways to install: first, use official sources for installation.
Mkdir ycm_buildcd ycm_build
Apt-get install clang llvm
Second, go to the official address of clang to download and install. For compilation and installation, please refer to http://howiefh.github.io/2015/05/22/vim-install-youcompleteme-plugin/.
Zhongcq blog
Http://zuyunfei.com/2013/05/16/killer-plugin-of-vim-youcompleteme/
I will only introduce what is installed through the official source (because it is simple and quick):
Confirm the integrity of the installed package:
Cd / .vim/bundle/YoucompleteMegit submodule update-- init-- recursive
We need to find out where the path to libclang.so is, usually using the command in the / usr/ directory to find it.
Find / usr/-name "libclang.so*"
The directory I found is:
/ usr/lib/llvm-3.5/lib/libclang.so.1
Know through the official knowledge that you need to run the command.
Refer to the official explanation:
Cmake-G ". ~ / .vim/bundle/YouCompleteMe/third_party/ycmd/cpp
For those who want to use the system version of boost, you would pass-DUSE_SYSTEM_BOOST=ON to cmake. This may be necessary on some systems where the bundled version of boost doesn't compile out of the box.
According to the official explanation, we execute the following statement:
Cmake-G "Unix Makefiles"-DEXTERNAL_LIBCLANG_PATH=/usr/lib/llvm-3.5/lib/libclang.so.1 ~ / .vim/bundle/YouCompleteMe/third_party/ycmd/cpp
Then:
Now that configuration files have been generated, compile the libraries using this command:
Cmake-- build. -target ycm_support_libs-config Release
Execute the above statement directly
Cmake-- build. -target ycm_support_libs-config Release
The following problems arise when using NeoCompleteEnable
I use a terminal like tty1
After the installation is completed, it is found that the prompt cannot be started automatically. Enter "NeoCompleteEnable" under the command mode ":" to find that the prompt cannot be started.
"It requires Vim 7.3.885 or later with Lua support (" + lua ")"
Install vim-nox and vim-athena according to the method on github to solve the problem {Portal} (https://github.com/spf13/spf13-vim/issues/773): (generally only need to install vim-nox [this is the support of scripting language])
Sudo apt-get install vim-noxsudo apt-get install vim-athena
Auto-completion cannot be prompted only (for NeoComplete plug-ins)
In the course of use, what is automatically prompted cannot be displayed, and it is still in the form of a plug-in.
Solution {Portal} (https://github.com/spf13/spf13-vim/issues/819):
Add the following code to .vimrc.loacl:
Inoremap neosnippet#expandable ()? Neosnippet#mappings#expand_or_jump_impl (): pumvisible ()? Neocomplete#close_popup (): "\"
Do not display color matching effects:
Add the following code to .vimrc.loacl [refer to (http://www.cnblogs.com/keepHack/archive/2012/04/09/2439361.html)]:
Set t_Co=256
There is a file like this in the spf13-vim author's github. Vimrc.bundles has the following code
"In your .vimrc.before.local file" list only the plugin groups you will use if! exists ('GRV spf13roombundlebread groups') let GRO spf13The bundlebread groups = ['general',' writing', 'neocomplete',' programming', 'php',' ruby', 'python',' javascript', 'html',' misc',] endif "To override all the included bundles Add the following to your ".vimrc.bundles.local file:" let g:override_spf13_bundles = 1 if! exists ("g:override_spf13_bundles") "General {if count (g:spf13_bundle_groups) 'general') Bundle' scrooloose/nerdtree' Bundle 'altercation/vim-colors-solarized' Bundle' spf13/vim-colors' Bundle 'tpope/vim-surround' Bundle' tpope/vim-repeat' Bundle 'jiangmiao/auto-pairs' Bundle' ctrlpvim/ctrlp.vim' Bundle 'tacahiroy/ctrlp-funky' Bundle 'kristijanhusak/vim-multiple-cursors' Bundle' vim-scripts/sessionman.vim' Bundle 'matchit.zip' if (has ("python") | | has ("python3") & & exists (' GRV spf13usususable powerline') & &! exists ('GRSPF13usususoldpowerline`) Bundle' Lokaltog/powerline' {'rtp':'/powerline/bindings/vim'} elseif exists (' GRV SPF13 used powerline') & & exists ('GRV SPF13 used available powerline') Bundle 'Lokaltog/vim-powerline' else Bundle' bling/vim-airline' endif Bundle 'powerline/fonts' Bundle' bling/vim-bufferline 'Bundle 'Lokaltog/vim-easymotion' Bundle' jistr/vim-nerdtree-tabs' Bundle 'flazz/vim-colorschemes' Bundle' mbbill/undotree' Bundle 'nathanaelkane/vim-indent-guides' if! exists (' GRV spf13 inherited notables views') Bundle 'vim-scripts/restore_view.vim' endif Bundle 'mhinz/vim-signify' Bundle' tpope/vim-abolish.git' Bundle 'osyo-manga/vim-over' Bundle' kana/vim-textobj-user' Bundle 'kana/vim-textobj-indent' Bundle' gcmt/wildfire.vim' endif "}
There is the following passage in this code:
"In your .vimrc.before.local file" list only the plugin groups you will use if! exists ('general', writing',' neocomplete', 'programming',' php', 'ruby',' python', 'javascript',' html', 'misc',] endif
The first two sentences are comments, saying: the plug-ins you are going to use are listed in the .vimrc.before.local file. The following code means that if no settings exist, the following plug-ins will be used by default:
'general', 'writing',' neocomplete', 'programming',' php', 'ruby',' python', 'javascript',' html', 'misc'
The following paragraph (which I only intercept) shows that if spf_bundle_groups contains general, install the following plug-in:
"General {if count (g:spf13_bundle_groups, 'general') Bundle' scrooloose/nerdtree' Bundle 'altercation/vim-colors-solarized' Bundle' spf13/vim-colors'...
All of the following settings are in .vimrc.local:
Set color: set t_Co=256 can display the effect of color matching correctly.
Reference website: http://harrycode.logdown.com/posts/197145-simple-steps-to-build-cool-vim-development-environment
Http://twocucao.xyz/2015/03/01/%E7%BC%96%E8%BE%91%E5%99%A8Vim/
Http://www.cnblogs.com/274914765qq/p/4439189.html
Https://github.com/Valloric/YouCompleteMe#c-family-semantic-completion-engine-usage
Http://www.cnblogs.com/keepHack/archive/2012/04/09/2439361.html
Please refer to: http://blog.jobbole.com/58978/
Please refer to: k-vim for its own configuration settings.
If you encounter problems later, you will continue to add