简体   繁体   English

如何在Linux中安装vim插件(EasyMotion)?

[英]How to install vim plugin(EasyMotion) in Linux?

How to install vim plugin(EasyMotion) in Linux? 如何在Linux中安装vim插件(EasyMotion)? And the plugin is here: 插件就在这里:

http://www.vim.org/scripts/script.php?script_id=3526 http://www.vim.org/scripts/script.php?script_id=3526

Give Vundle a shot. Vundle一个机会。 It's simpler than Pathogen in my experience and certainly simpler than installing the plugin manually. 根据我的经验,它比Pathogen更简单,当然比手动安装插件更简单。

Installing a plugin with Vundle is as simple as adding the plugin name to your .vimrc: 使用Vundle安装插件就像将插件名称添加到.vimrc一样简单:

Bundle 'Lokaltog/vim-easymotion'

Then you would run :BundleInstall and you're done! 然后你会运行:BundleInstall ,你就完成了!

Take a look at the Vundle Github page to see how to set it up. 看看Vundle Github页面,了解如何设置它。 It only takes a minute, and it will save you plenty of headache down the road when you inevitably need to remove or update plugins. 它只需要一分钟,当您不可避免地需要删除或更新插件时,它将为您节省大量的头痛。

You should merge the autoload , plugin , and doc with a directory of your runtime (inside vim type :echo &runtimepath to know what locations are suitable). 您应该将autoloadplugindoc与运行时目录合并(在vim类型内:echo &runtimepath以了解哪些位置适合)。 Typically put them in ~/.vim/ . 通常将它们放在~/.vim/

After that you can run :helptags ~/.vim/ to refresh the help index. 之后,您可以运行:helptags ~/.vim/来刷新帮助索引。

Edit : You seem new to Linux. 编辑 :你似乎对Linux很陌生。

In a command-line window: 在命令行窗口中:

cd                           # will go to your home path, equivalent to « cd ~ » or « cd $HOME »
mkdir .vim                   # will create a directory named « .vim »
cd .vim
mkdir plugin
cd plugin
wget 'https://raw.github.com/vim-scripts/pathogen.vim/2e20ff61bcc440c8dbceb8036b8b127cd4d555dc/plugin/pathogen.vim'
echo 'call pathogen#infect()' >> ~/.vimrc
cd ..
mkdir bundle                 # will create a « bundle » directory
cd bundle
wget 'http://www.vim.org/scripts/download_script.php?src_id=16838'
unzip Lokaltog-vim-easymotion-1.3-0-g667a668.zip
rm Lokaltog-vim-easymotion-1.3-0-g667a668.zip

Note that in Nautilus (default file browser if you are using the Gnome Desktop Environment), CTRL-H shows hidden files (those that begin with a dot). 请注意,在Nautilus(默认文件浏览器中,如果您使用的是Gnome桌面环境)中,CTRL-H显示隐藏文件(以点开头的文件)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM