mirror of
https://github.com/jbranchaud/til
synced 2026-01-08 01:28:02 +00:00
Add Set Up Vim-Plug With Neovim as a vim til
This commit is contained in:
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
|||||||
|
|
||||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||||
|
|
||||||
_1010 TILs and counting..._
|
_1011 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -1127,6 +1127,7 @@ _1010 TILs and counting..._
|
|||||||
- [Select Several Results From An FZF Search](vim/select-several-results-from-an-fzf-search.md)
|
- [Select Several Results From An FZF Search](vim/select-several-results-from-an-fzf-search.md)
|
||||||
- [Set End Of Line Markers](vim/set-end-of-line-markers.md)
|
- [Set End Of Line Markers](vim/set-end-of-line-markers.md)
|
||||||
- [Set Your Color Scheme](vim/set-your-color-scheme.md)
|
- [Set Your Color Scheme](vim/set-your-color-scheme.md)
|
||||||
|
- [Set Up Vim-Plug With Neovim](vim/set-up-vim-plug-with-neovim.md)
|
||||||
- [Setting Filetype With Modelines](vim/setting-filetype-with-modelines.md)
|
- [Setting Filetype With Modelines](vim/setting-filetype-with-modelines.md)
|
||||||
- [Show All Syntax Highlighting Rules](vim/show-all-syntax-highlighting-rules.md)
|
- [Show All Syntax Highlighting Rules](vim/show-all-syntax-highlighting-rules.md)
|
||||||
- [Show Matching Entries For Help](vim/show-matching-entries-for-help.md)
|
- [Show Matching Entries For Help](vim/show-matching-entries-for-help.md)
|
||||||
|
|||||||
25
vim/set-up-vim-plug-with-neovim.md
Normal file
25
vim/set-up-vim-plug-with-neovim.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Set Up Vim-Plug With Neovim
|
||||||
|
|
||||||
|
To get [vim-plug](https://github.com/junegunn/vim-plug) working with Neovim, it
|
||||||
|
needs to be installed in a known autoload directory.
|
||||||
|
|
||||||
|
The help files say that "plugins installed by user" should be located in the
|
||||||
|
data home directory at `stdpath("data")` under `site`. For me (on OSX) the data
|
||||||
|
home directory is `~/.local/share/nvim`, so `~/.local/share/nvim/site`.
|
||||||
|
|
||||||
|
Under this site directory, along with any directories on the `runtimepath`,
|
||||||
|
Neovim looks for various runtime files and subdirectories. This includes the
|
||||||
|
`/autoload` directory. That's where you want to install `vim-plug`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
```
|
||||||
|
|
||||||
|
This shell statement uses [the `:-` parameter
|
||||||
|
expansion](unix/provide-a-fallback-value-for-unset-parameter.md) to specify a
|
||||||
|
path using either the `XDG_DATA_HOME` or `$HOME` as a fallback. This ends up
|
||||||
|
resolving to `~/.local/share`, so the `plug.vim` file is placed in
|
||||||
|
`~/.local/share/nvim/site/autload/`.
|
||||||
|
|
||||||
|
See `:h runtimepath` for more details.
|
||||||
Reference in New Issue
Block a user