AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1212729
Accepted
Geppettvs D'Constanzo
Geppettvs D'Constanzo
Asked: 2020-02-25 07:51:20 +0800 CST2020-02-25 07:51:20 +0800 CST 2020-02-25 07:51:20 +0800 CST

如何为 vi 或 vim 安装 minimap 插件?

  • 772

我的系统

  1. Ubuntu 桌面 18.04 LTS
  2. 窗口管理器:i3WM
  3. 没有虚拟化。
  4. 本机安装。

这个问题的部分内容来自我在 Facebook 上的帖子

几天前,我试图识别这个终端文本编辑器,因为左侧和右侧边栏中都有可用的插件:

在此处输入图像描述

到目前为止,我们已经确定编辑器是vi并且我已经成功安装了nerdtree插件,如左侧边栏中所示,这是在我的 Facebook 帖子的评论中建议的。现在我正在寻找一种在右侧安装小地图的方法。也许它是一个插件或其他东西。

有任何想法吗?

屏幕截图是从我自己的桌面添加的。请注意,我是 i3WM 用户,我使用 Yakuake 作为我的终端仿真器。

笔记

我想这是小地图https://github.com/severin-lemaignan/vim-minimap但我找不到在 Ubuntu 中安装的方法。

我的桌面截图

在此处输入图像描述

在此处输入图像描述

更新

这就是当我从 whithini选择插件安装程序内部后按下时发生的情况Plugin 'severin-lemaignan/vim-minimap'vim

在此处输入图像描述

vim plugins text-editor vi
  • 2 2 个回答
  • 2166 Views

2 个回答

  • Voted
  1. Best Answer
    Geppettvs D'Constanzo
    2020-02-25T12:04:24+08:002020-02-25T12:04:24+08:00

    我在此页面上找到了解决方案:https ://linuxhint.com/vim-vundle-tutorial/

    我必须删除(清除)vim 以及与我之前所做的任何事情相关的所有内容,然后按照本手册(以及稍后我将参考的其他页面)中提供的说明重新开始,这就是我最终获得本手册的方式,我在这里分享是为了方便一些可能希望从头开始执行此操作的人。

    安装 Vundle

    首先,你必须安装 Git 版本控制系统。它可在任何 Linux 发行版的官方软件包存储库中获得。我将在本文中使用 Debian 9 Stretch。

    对于 Ubuntu、Debian、Linux Mint 和其他基于 Debian 的发行版:

    使用以下命令更新包存储库缓存:

    $ sudo apt-get update
    

    然后使用以下命令安装 Git:

    $ sudo apt install git -y
    

    应该安装、升级 Git,或者如果您已经拥有最新版本,您会收到一条消息说 git 已经是最新版本。

    注意:我保留它是为了与其他 Linux 系统兼容。

    对于 Fedora、RHEL、CentOS:

    要在 Fedora、RHEL 和 CentOS 上安装 Git,请运行以下命令:

    $ yum makecache
    $ sudo yum install git -y
    

    现在您可以使用以下命令安装 VIM:

    $ sudo apt-get install vim -y
    

    应该安装 VIM。就我而言,它已经安装在我的系统上。

    注意:我保留它是为了与其他 Linux 系统兼容。

    对于 Fedora、RHEL、CentOS,运行以下命令安装 VIM:

    $ sudo yum install vim -y
    

    现在去 Vundle 的官网https://github.com/VundleVim/Vundle.vim

    您应该看到以下页面。

    现在单击下面屏幕截图中标记为红色的“克隆或下载”按钮。应该会出现一个弹出窗口。单击屏幕截图中标记为蓝色的图标。应复制 git 存储库 URL。

    现在打开一个终端并运行以下命令:

    $ git clone PASTE_URL_HERE ~/.vim/bundle/Vundle.vim
    

    粘贴 URL 后,命令应如下所示:

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

    Github 存储库应该被克隆到用户主目录的 '.vim/bundle/Vundle.vim' 目录中。

    现在运行以下命令:

    vim ~/.vimrc
    

    或者,如果您愿意,可以使用 nano:

    nano ~/.vimrc
    

    它应该.vimrc用 VIM 打开文件。如果.vimrc文件不存在,则应打开一个空文件。

    就我而言,我已经有一个现有.vimrc文件。

    现在转到.vimrc文件末尾并按

    现在添加以下行,如下面的屏幕截图所示。然后用vim命令保存退出vim:wq!

    现在添加以下行,如下面的屏幕截图所示。然后用vim命令保存退出vim:wq!

    set nocompatible  
    filetype off  
    set rtp+=~/.vim/bundle/Vundle.vim  
    call vundle#begin()  
    Plugin 'VundleVim/Vundle.vim'  
    
    " Add plugins here  
    
    call vundle#end()  
    filetype plugin indent on
    

    现在打开vim。

    运行以下 VIM 命令来初始化 Vundle 插件管理器:

    :PluginInstall
    

    应该安装 Vundle 插件。

    使用 Vundle Plugin Manager 搜索和安装插件:

    您可以使用 Vundle Plugin Manager 搜索 VIM 插件。

    Let’s say you want to install a color scheme for VIM. Run the following VIM command to search for all the available VIM colorscheme plugins.

    :PluginSearch colorscheme
    

    You should see a lot of colorscheme plugins as shown in the screenshot below.

    I am going to install Royal-Colorschemes.

    To install a plugin, just move the VIM cursor to the line and press i

    The plugin should be installed.

    Now copy the line.

    Paste it in the .vimrc file in the section as shown in the screenshot below.

    Listing Installed Plugins:

    You can also list all the installed VIM plugins with the following VIM command:

    :PluginList

    You can see that I have 2 plugins installed right now.

    Installing a Plugin from Github using Vundle Plugin Manager:

    You can install a plugin from Github repository as well. Let’s say you want to install ‘powerline’ from the Github repository of powerline.

    Go to the Github page of powerline and copy the project author/name section as marked in the screenshot below.

    Open the .vimrc file and type in the following line in the marked section.

    Plugin ‘GITHUB_REPO_USER/GITHUB_REPO_PROJECT_NAME’

    Then save the file and exit out of VIM.

    Now start VIM and run the following VIM command to install the plugin using Vundle Plugin Manager.

    :PluginInstall

    Powerline plugin should be installed as shown in the screenshot below.

    You can list the available plugins with :PluginList command.

    You should be able to see ‘powerline’ there.

    Removing a Plugin using Vundle Plugin Manager:

    You can also remove a Plugin using Vundle Plugin Manager.

    First run ‘:PluginList’ command to list all the installed VIM plugins.

    These are the plugins I have installed right now.

    Let’s delete ‘powerline’ plugin. To delete powerline plugin, just move your cursor to the line and press Shift+D

    The plugin should be deleted.

    Now open .vimrc file again, remove the marked line for powerline and save the file.

    .vimrc file with powerline plugin line removed.

    That’s it.

    So that’s how you use VIM Vundle Plugin Manager to manage VIM plugins easily. Thanks for reading this article.

    Installing Minimap

    After following the tutorial above, I simply followed the instructions provided in the README.MD file of A code minimap for Vim at https://github.com/severin-lemaignan/vim-minimap

    Vundle

    With vundle, simply add: Plugin 'severin-lemaignan/vim-minimap' to your .vimrc and run :PluginInstall from vim.

    Installing The NERDTree

    为 NERDTree 安装它的 README.markdown 文件中提供的说明就像在文件中放置下一行一样简单.vimrc。

    Plugin 'preservim/nerdtree'
    

    同一个文件提供了一种使其永久保存并在您运行时自动打开的方法vim,您只需将其放入您的.vimrc文件中:

    autocmd StdinReadPre * let s:std_in=1
    autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
    

    我的补充

    我将下一行添加到我的 .vimrc 文件中,以便始终显示 Minimap、行号并在编辑时提供鼠标兼容性。

    au BufEnter * :Minimap
    au BufEnter * :set number
    au BufEnter * :set mouse=a
    

    而已!

    现在我的 vim 看起来像这样。

    在此处输入图像描述 垂直监视器

    在此处输入图像描述 水平(笔记本电脑)显示器

    • 2
  2. mchid
    2020-02-25T10:38:53+08:002020-02-25T10:38:53+08:00

    首先,确保文件Plugin 'severin-lemaignan/vim-minimap'中没有重复行: ~/.vimrc。

    但是,其他用户已报告此问题,但没有重复行。我想我找到了解决办法。您需要编辑您的~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim文件。运行以下命令进行更改:

    sed -i '95i\    \\ && s:bundle_names[a:bundle.name]!=a:bundle.name_spec' ~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim
    
    • 1

相关问题

  • Ubuntu中文本编辑器之间的比较:Vim vs. Emacs vs. Nano [关闭]

  • 开始使用 LaTeX 最简单的方法是什么?

  • 如何让 vim 保留其撤消历史记录?

  • 使用突触或通过 Firefox 的插件菜单安装 adblock?

  • 如何在 Vim 中启用全彩支持?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve