Will's Blog

Will's Blog

Beginners Guide to Getting NeoVim up and running in Windows

Windows, you suck apparently

Anything command line or terminal based usually gets second treatment with Windows. Usually the response is, "You have a problem? Well stop using Windows." Thanks Internet!

NeoVim is such a thing. NeoVim exists for Windows, but every damn tut is for Linux so here I am saving you. Screw the Internet, lets get this thing up and running with some plug-ins on WINDOWS. Open up your powershell everybody and:

Install scoop

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iwr -useb get.scoop.sh | iex

Install neovim

scoop install neovim

Optionally install neovide , because you know, it's cool

scoop bucket add extras
scoop install neovide

Make sure if you type nvim, or neovide in the terminal it comes up. Bam! Let's move on. That's me assuming everything went according to plan, which it did because scoop and powershell should work. If it didn't for whatever reason, go to the links above and check out wtf changed. Hopefully everything is good because this is where things get weird.

Install vim-plug

If you don't know what this is, it's basically just a super easy way to manage vim and neovim plug-ins. There are a few other plug in managers that you can use, but we're just going over this one here. At the time of this writing the command to do this is

iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
    ni "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force

Figure out your paths

If the vim-plug on their website is different than the lines above then take notice of where plug.vim is located. Go and make sure the file exists in your c:\Users\\AppData\Local\nvim-data\site\autoload.

Inside the editor we're going to type this in (not copy and paste sorry)

:echo stdpath('config')

Create a vim.init

vim.init is the neovim version of the .vimrc No clue what that means? It's where neovim's configuration is going to be setup. Take a look at what your editor gave you for the config path above. Go to that path. If the path doesn't exist, create it. Once in there create a vim.init file.

cd ~
cd AppData\Local
mkdir nvim
nvim vim.init

Fill out the vim.init with the following

call plug#begin('~/AppData/Local/nvim/plugged')
call plug#end()

Open up your editor. No issues? Keep going.

vimawesome.com/ has a crap ton of plug-ins just ready to make your life better. 19k+ of them. surround.vim seems like something just about anyone could use so let's add it to test to see if things are going smoothly. Click on the VimPlug tab(?). You'll see

Plug 'tpope/vim-surround'

Place that between your call plug#begin and call plug#end lines. Save and reopen the editor.

Type :PlugInstall

A split-screen should show up and install the plug in. Just add more to this section to get yourself more yummy plug-ins and repeat the process.

Success! We did it. Make yourself a sammich.

Share this