Ubuntu20.04安装vimplus插件

参考文章:

  1. Ubuntu Linux下vimplus的安装及使用
  2. 安装vimplus之后乱码问题解决

1、安装步骤:

shell 复制代码
$ git clone https://github.com/chxuan/vimplus.git  ~/.vimplus

$ cd  ~/.vimplus

$ ./install.sh

2、./install.sh 过程

  1. 出现选择是否备份 /home/yin-roc/.vimrc,选择 Y:

    shell 复制代码
    Find /home/yin-roc/.vimrc already exists,backup /home/yin-roc/.vimrc to /home/yin-roc/.vimrc_bak_20240629142046? [Y/N] (输入)Y
  2. 出现选择使用python2还是python3编译ycm,这里博主选择3:

    shell 复制代码
    Please choose to compile ycm with python2 or python3, if there is a problem with the current selection, please choose another one. [2/3] (输入)3
    Compile ycm with python3.
  3. 开始跳转到安装插件界面,等待完成后会自动回到终端;

  4. 出现如下界面表示安装成功:

  5. 保险起见,终端输入 vim 测试一下:

    出现如下问题:

    报错说:The ycmd server SHUT DOWN (restart with :YcmRestartServer)。原因是因为 YouCompleteMe 插件引起的。

    解决方法:

    shell 复制代码
    进入其插件目录:
    $ cd ~/.vim/plugged/YouCompleteMe
    运行:
    $ ./install.py

3、乱码问题

安装完成之后, 使用 vim test.cpp 创建一个文件会出现乱码问题,此时是因为终端字体设置不对而导致。

解决方法:

  1. 下载字体包;

  2. 解压后进入解压后的文件目录,执行install.sh 脚本;

    shell 复制代码
    ./install.sh
  3. 打开终端,右键,配置文件首选项,配置,字体栏目选择DroidSansMono Nerd Font Book:

  4. 再次使用 vim test.cpp 打开文件,一切正常,没有乱码

相关推荐
无足鸟ICT1 小时前
【RHCA+】sosreport(收集诊断文档)
linux·运维·服务器
GeW1 小时前
世界目光聚焦中国:底层技术、Linux、数据库的破局逻辑
linux·数据库
星恒随风3 小时前
MySQL 从零入门(十):MVCC、Undo Log 与 Read View 详解——InnoDB 如何实现事务隔离?
linux·数据库·笔记·sql·mysql
瑞雪兆丰年兮4 小时前
Linux零基础快速入门-第二章 Linux基础命令
linux·运维·服务器
咋的啥名都用不了呢~6 小时前
Linux项目部署6(安装Elasticsearch)
linux
无奈笑天下8 小时前
银河麒麟桌面上USB打印机无法打印问题标准处理流程
linux·运维·网络协议
15Moonlight8 小时前
Linux 网络(11):IO 多路转接(select /poll/epoll)
linux·网络
wno70410 小时前
CentOS下FTP服务搭建
linux·运维·centos
15Moonlight10 小时前
Linux网络(12):Reactor 模式
linux·网络
思想觉悟11 小时前
Android启动流程之点rc文件
android·linux·面试