LoginSignup
2
2

More than 5 years have passed since last update.

WSLにneovimを入れる

Last updated at Posted at 2018-06-27

はじめに

WSLに入っているVimはVersionが古い7.4です。
makeしていれてるのはちょっとめんどうなのでaptで入れられるneovimを
入れてみました。

image.png

インストール

上記に書いてあることをなぞっていきます。

$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:neovim-ppa/unstable
$ sudo apt-get update
$ sudo apt-get install neovim

入りましたー
image.png

dein.vimインストール

プラグインを管理するdein.vimを入れます

$ curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
$ sh ./installer.sh ~/.cache/dein

.config/neovimディレクトリを作成してinstaller.shの出力結果をinit.vimに貼り付けます。

$ mkdir -p .config/nvim
$ nvim .config/nvim/init.vim

nvimを開くとプラグインを入れてくれれば設定OKです。

$ nvim
[dein] Not installed plugins: ['neosnippet-snippets', 'neosnippet.vim', 'deol.nvim']
[dein] Update started: (2018/06/26 17:24:11)[dein] Updated plugins:
[dein]   deol.nvim(1 change)
[dein]   neosnippet-snippets(1 change)
[dein]   neosnippet.vim(1 change)
[dein] Done: (2018/06/26 17:24:15)Press ENTER or type command to continue

call dein#add()行をコピペして入れたいのを書いて再度neovimを開けば必要なプラグインを入れてくれます。

 call dein#add('crusoexia/vim-monokai')
$ nvim
[dein] Not installed plugins: ['vim-monokai']
[dein] Update started: (2018/06/26 17:52:19)[dein] Updated plugins:
[dein]   vim-monokai(1 change)
[dein] Done: (2018/06/26 17:52:24)Press ENTER or type command to continue
init.vim
"dein Scripts-----------------------------
if &compatible
  set nocompatible               " Be iMproved
endif

" Required:
set runtimepath+=/home/xxxx/.cache/dein/repos/github.com/Shougo/dein.vim

" Required:
if dein#load_state('/home/xxxx/.cache/dein')
  call dein#begin('/home/xxxx/.cache/dein')

  " Let dein manage dein
  " Required:
  call dein#add('/home/xxxx/.cache/dein/repos/github.com/Shougo/dein.vim')

  " Add or remove your plugins here:
  call dein#add('Shougo/neosnippet.vim')
  call dein#add('Shougo/neosnippet-snippets')
  call dein#add('crusoexia/vim-monokai')

  " You can specify revision/branch/tag.
  call dein#add('Shougo/deol.nvim', { 'rev': '01203d4c9' })

  " Required:
  call dein#end()
  call dein#save_state()
endif

" Required:
filetype plugin indent on
syntax enable

" If you want to install not installed plugins on startup.
if dein#check_install()
  call dein#install()
endif

set background=dark
colorscheme monokai

inoremap jj <ESC>

それでは楽しいVimライフを!

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2