当前位置:网站首页>VIM auto fill auto indent explanation

VIM auto fill auto indent explanation

2022-06-26 14:21:00 select one pointer

Take a snapshot in advance !!!

1. First, check out vim Version of Check if it is 8.0 And above

vim -version

2. Take a look at the current one vim Do you support python3 If it appears +python3 This one supports , -python3 Show no support for

vim --version | grep python

(3.3) To configure function configure And add a suffix

./configure --with-features=huge -enable-python3interp --with-python-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu

The back here python and python3 Choose one from two , After choosing vim Only one of them is supported , Recommended here python3, Because some plug-ins only need python3 Runtime support

And the path here should be modified , I'm here python The path is in /usr/lib64 Below , Maybe some people are /usr/lib Under the , Find the appropriate config File can

(3.4) Compile installation configuration

sudo make # compile

sudo make install # install

export PATH=/usr/local/bin:$PATH # After installation, the default setting is /usr/local/bin Under the

4. install vimplus plug-in unit

(4.1) Get installation package

(4.1.a) Directly from git clone Come down

git clone https://github.com/chxuan/vimplus.git ~/.vimplus

(4.1.b)

Similarly, if the above git clone Very slowly , I can't download it in half a day , You can download it directly github Official website vimplus-master.zip After decompression

unzip vimplus-master.zip

(4.2) install

cd ~/vimplus-master

./install.sh

(4.3) In the process of waiting , Will appear for you to use python2 still python3 Compile ycm, Choose here 3 that will do

(4.4) After the final installation, the plug-in will be automatically installed , Finally, you will enter a download interface of various plug-ins , If the plug-in downloads normally at this time, you can wait for the download to complete . If the plug-in has not been downloaded for a long time , Or many plug-ins fail to download , You can see the following tutorial , Even if the following methods are used for setting .

(4.5) Finally, your vim All plug-ins of are placed in ~/.vim/plugged Under the table of contents , Can enter the cd ~/.vim/plugged To view the .

If you find that there is only one plug-in Ycm Or there are only a few plug-ins , Then you can copy mine plugged.zip File to your linux On , then unzip plugged.zip

Get one plugged Catalog , Then we put the original plugged Delete , rm -rf ~/.vim/plugged , Unzip the result plugged Move past

mv plugged ~/.vim , Finally, write our configuration file , Here you can use mine directly vimrcbf, At this time .vimrc Delete or backup a copy .

rm -f ~/.vimrc, Actually this .vimrc It's a soft link . And then vimrcbf Renamed as .vimrc.

mv vimrcbf .vimrc

Then try again vim Whether it has the function

Get into vim After the normal In mode , Press down <leader> + h , You can open the help document . <leader> The default is "," Can be in .vimrc Make changes , Shortcut keys for many functions can be found in .vimrc Make changes

原网站

版权声明
本文为[select one pointer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170508516564.html