I had been trying to customize my _vimrc using https://github.com/amix/vimrc
Then I came across https://github.com/junegunn/limelight.vim and would want to add it.
I blindly copied the configuration code (that was given in the Readme) in the _vimrc but it didn't help.
Can someone explain how exactly to do this?
I am using GVim and rest of the plugins are working fine.
I'm on macOS 12.6 for M1, Vim 9.0, and amix/vimrc commit 950b470eb9aa555b7b8a89ba294ce9fc8f7a56e6.
I got it working with GitHub CLI with the following steps:
Change to the directory where your own plug-ins should be installed:
cd ~/.vim_runtime/my_plugins
Clone the Limelight repository hosted on GitHub
gh repo clone junegunn/limelight.vim
In VIM, turn on Limelight with:
:Limelight [hit return]
You should see something like this effect:
Vim screenshot with Limelight turned on
Source: https://github.com/amix/vimrc#how-to-include-your-own-stuff
Related
When I follow github instructions for vim-misc and vim-sessions, after unzipping to /Users/<me>/.vim/misc and /Users/<me>/.vim/vim-session-master, and then restarting macvim, I get
:helptags ~/.vim/doc
E150: Not a directory: ~/.vim/doc
Also tried putting the two folders in /Users/<me>/ (where my .vimrc is) and in the two locations pointer by $VIM and $VIMRUNTIME from within macvim (/Applications/MacVim.app/Contents/Resources/vim) all to no avail.
I guess I really don't understand how running the :helptags <whatever> starts up/completes installation of these plug-ins anyway?
Before using using a plugin managers, plugins used to go directly into ~/.vim, not into ~/.vim/pluginname. That's when we ran :helptags ~/.vim/doc.
Then we had plugin manager, each with different specific way of doing things. Some even take care of registering the documentation of the plugins installed.
IMO, you'd better find a plugin manager suited to your need and use it. I remember a Q/A on vi.SE, you could start by reading it.
If you prefer to install plugins manually instead of using one of plugin managers like vim-plug or others then you should add plugin directory to your runtimepath. Place this line to your .vimrc set runtimepath+=/path/to/plugin. I would not recommend to place plugins directly to ~/.vim directory, use sub-folder instead (e.g. /Users/<you>/.vim/plugins).
I am trying to start using a vim plugin management tool to manage my vim plugins, like vundle, and I have multiple hosts and want them syncing with vim settings. currently I am checking the .vim dir into a git repo. but I don’t want to check in all plugins as they belongs to others. Wonder what would be the best practice if I use the plugin management tool to keep them sync without checking in plugins code
if you used plugin mgmt, like vundle, you don't have to push your .vim dir to git repo. You just push your .vimrc file to git. Because vimrc should have already configured vundle and declared which plugins you want to have.
What you can do on a new host:(assume you put vundle to $HOME/.vim/Bundle)
pull your .vimrc file from git repo
get vundle: git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Then open vim, run :PluginInstall. You have all plugins.
I recently came across the exact same problem regarding the sync between my laptop and my desktop workstation. Like Kent I already used the Vundle.vim plugin manager on both machines but had the need for a more comfortable sync solution for my vim setup than only syncing my ~/.vim/vimrc between both machines and run :PluginInstall on the other machine each time I add a plugin.
My solution now is that I use Syncthing that is configured to directly sync my ~/.vim folder between both machines to each other as soon changes happen.
The only downside of this solution is that both machines need to be running to sync changes. But I handle this with my little homeserver which's also configured in the sync-chain and provides the latest version of my ~/.vim directory to each of the machines when the other one is not running.
Let me know if you need any further details about the configuration settings.
I use vim and try the 'Vundle'. It helps to install plugins like in Ruby on Rails:
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/nerdcommenter'
... I write in my _vimrc file
But when I do saw, it installs the last version of this plugins from github. But I want to install one of the previous version. Who knows how to do what I want?
I don't think Vundle allows you to specify a repo ref. I think you can work around this though. Vundle assumes you want the master's head, so create your own fork to get control of the version.
In other words, fork the plugin repo, reset the master branch to the version you want, and use your fork in the .vimrc
Bundle '<your username>/nerdcommenter'
You can install a specific version through vundle. Somehow.
First install your bundle as normal.
Then, go to the bundle directory (e.g. cd ~/.ssh/bundle/nerdtree) and checkout the version you need: git checkout <thecommithash-or-release>.
Tada!
You can never ever update through vundle tho :)
There's also a forgotten pull request to allow installing specific plugin versions: https://github.com/VundleVim/Vundle.vim/pull/681 with syntax:
Plugin 'kien/ctrlp.vim', {'version': '1.79'}
which confirms it is not possible nicely from inside Vimscript. Shame, that feature is a must have...
This is also mentioned on the current README in the TODO list:
allow specifying revision/version?
I've recently moved to a new MacBook, taking my vim dot files with me. Whilst Pathogen works fine on my old MacBook, it's not loading at all on my new one. I've now reinstalled Pathogen from scratch and it's not working with the most basic setup either. I've tried both iTerm and Terminal.app in case it was the newer version of iTerm I'm running that was the issue.
.vimrc
.vim
Any ideas? :)
OK, this is a bit embarrassing :$
As it turns out mMontu gave me the prod in the right direction by suggesting running :scriptnames. When I ran this I noticed that I was missing a heap of scripts but not all of them. I then looked at the dir structure I'd pasted earlier and noticed that a lot of the bundles were missing any files below them. It's because they'd not committed to my version control as they were already versioned repos. Doh! Recloned the repos and now all is well.
Thanks, mMontu! :)
I recently discovered how awesome Pathogen is for managing Vim plugins, using the Git submodule approach for keeping plugins up-to-date with Github. You can view my modest dotfiles repo here.
I recently was forced to switch to a Windows development environment from for work, so the first thing I did was a complete install of Cygwin (I had hard drive space to spare and didn't feel like picking and chosing packages).
The problem: With Cygwin installed (using Mintty), I clone my dotfiles repo to ~/. Then I put symlinks in ~/ for .vim, .vimrc, and .bashrc. The .vimrc configuration file is being read in (the options work), but Pathogen isn't correctly loading my Vim plugins.
Forgive my incompetence, but I'm new to Cygwin and I don't fully understand its quirks yet. In any case, the exact same repository works fine under *nix machines. Is there something that I should be doing differently to get it to work under Cygwin?
Ok so I'm an idiot. I didn't realize that you have to do git submodule init and git submodule update after forking the repository as well (I thought you only had to do it on creation / first commit. To be clear, the issue had nothing to do with Cygwin specifically.
Which brings me to my next problem:
$ git submodule update
Cloning into .vim/bundle/nerdcommenter...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/scrooloose/nerdcommenter.git/info/refs
fatal: HTTP request failed
Clone of 'https://github.com/scrooloose/nerdcommenter.git' into submodule path '.vim/bundle/nerdcommenter' failed
Is there an quivalent of --no-check-certificate for wget?
Update: I fixed the latter problem as well. For anyone else having the same problem, you can simply edit your .git/config file and change all of the submodule HTTPS references to HTTP. Re-attempt the update and it should work.