Manjaro install Vim and configure

System version: Manjaro 20.0.3 Lysia
desktop environment: Gnome

(I was Manjaro system, installed with the Ubuntu command is not the same, with the Ubuntu installation command only the following pacman -Syinto apt installit)


Need to install vim, git, gcc, python3 first

sudo pacman -Sy vim git gcc

Install vim plugin

sudo pacman -S vim-youcompleteme-git

I strongly recommend this super easy-to-use vim plugin environment on Github : chxuan/vimplus , installation steps:

git clone https://github.com/chxuan/vimplus.git ~/.vimplus
cd ~/.vimplus
./install.sh

Yes, it has been installed~

Into the YouCompleteMefolder to begin installation YouCmopleteMe

cd ~/.vim/plugged/YouCompleteMe
git submodule update --init --recursive
python3 ./install.py -all

Install the Java interpreter, only the ./install.shadd back --java-completeron it, you need to install jdk8(if you want to support JavaScript and TypeScript, will be replaced by --ts-completera detailed look at the following installation steps: YCM-Core / YouCompleteMe )

sudo pacman -S jdk8-openjdk
./install.sh --java-completer

Download vim plugin manager: Vundle

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Start to modify the vim configuration file:~/.vimrc

vim ~/.vimrc

Entering .vimrcAfter pressing :input 170, press 回车, jumps to line 170.

After pressing the ikey insertion operation, paste the following into it (the best line up and down to stay free, easy to navigate), this step is to allow vim support vundle , and install some plugins.


" Vundler (set the runtime path to include Vundle and initialize)
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'mzlogin/vim-markdown-toc'
Plugin 'zxqfl/tabnine-vim'
call vundle#end()            " required

Press the ESCbutton to enter :wq, save and exit.

Terminal input viminto the vim, enter the :PluginInstallstart to install the plug
(total downloaded files are large, because tabnine relatively large, need to wait for some time, I downloaded a few minutes to download complete).

Start to install the machine learning grammar prompt artifact

# 安装 YouCompleteMe
cd ~/.vim/plugged/YouCompleteMe
./install.sh
# 安装 tabnine
cd ~/.vim/bundle/tabnine-vim/
./install.sh

ok


Troubleshoot installation --java-completerdownload speed is too slow problem, download when you can see there is a download of information jdt.ls

Downloading jdt.ls from http://download.eclipse.org/jdtls/milestones/0.40.0/jdt-language-server-0.40.0-201906040221.tar.gz...

Press the Ctrl key and click the link, or copy the link and paste it into the browser, download the compressed file, and then enter the YouCompleteMe plug-in folder, there will be a download cache location, for example, Java is in the YouCompleteMe directory the ./third_party/ycmd/third_party/eclipse.jdt.ls/target/cachefolder, and paste the file into it, you can re-run the install command

# 进入这个文件夹内
cd /home/z/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls/target/cache
# 将文件粘贴到这个文件夹内
cp ~/Download/jdt-language-server-0.40.0-201906040221.tar.gz ./
# 重新运行安装
cd ~/.vim/plugged/YouCompleteMe
./install.sh --java-completer

Related Links:

Guess you like

Origin blog.csdn.net/qq_37280924/article/details/107732862