neovimインストール

CentOS7

yum -y install epel-release
curl -o /etc/yum.repos.d/dperson-neovim-epel-7.repo https://copr.fedorainfracloud.org/coprs/dperson/neovim/repo/epel-7/dperson-neovim-epel-7.repo 
yum -y install neovim

CentOS6

yum -y install libtool autoconf automake cmake gcc gcc-c++ make pkgconfig unzip

$ git clone https://github.com/neovim/neovim
$ cd neovim
$ make
$ sudo make install

nvimというコマンドが使えるようになる

下記インストール時のログ

==============================================================================
jemalloc version   : 4.2.1-0-g3de035335255d553bdb344c32ffdb603816195d8
library revision   : 2

CONFIG             : CC=/opt/rh/devtoolset-2/root/usr/bin/cc --prefix=/root/neovim/.deps/usr
CC                 : /opt/rh/devtoolset-2/root/usr/bin/cc
CFLAGS             : -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
CPPFLAGS           :  -D_GNU_SOURCE -D_REENTRANT
LDFLAGS            :
EXTRA_LDFLAGS      :
LIBS               : -lrt  -lpthread
RPATH_EXTRA        :

XSLTPROC           : /usr/bin/xsltproc
XSLROOT            :

PREFIX             : /root/neovim/.deps/usr
BINDIR             : /root/neovim/.deps/usr/bin
DATADIR            : /root/neovim/.deps/usr/share
INCLUDEDIR         : /root/neovim/.deps/usr/include
LIBDIR             : /root/neovim/.deps/usr/lib
MANDIR             : /root/neovim/.deps/usr/share/man

srcroot            :
abs_srcroot        : /root/neovim/.deps/build/src/jemalloc/
objroot            :
abs_objroot        : /root/neovim/.deps/build/src/jemalloc/

JEMALLOC_PREFIX    :
JEMALLOC_PRIVATE_NAMESPACE
                   : je_
install_suffix     :
malloc_conf        :
autogen            : 0
cc-silence         : 1
debug              : 0
code-coverage      : 0
stats              : 1
prof               : 0
prof-libunwind     : 0
prof-libgcc        : 0
prof-gcc           : 0
tcache             : 1
fill               : 1
utrace             : 0
valgrind           : 0
xmalloc            : 0
munmap             : 0
lazy_lock          : 0
tls                : 1
cache-oblivious    : 1
===============================================================================

pip3からインストール

$ pip3 install neovim

neovimの設定ファイル

.bashrcに追記

export XDG_CONFIG_HOME=~/.config

後で必要になるプラグインを管理するファイルを事前に作っておきましょう。

$ touch $XDG_CONFIG_HOME/nvim/dein.toml
$ touch $XDG_CONFIG_HOME/nvim/dein_lazy.toml

dein.vimをインストール

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

スクリプト実行時に出力される内容を.vimrcに追記する。

一番if最後の部分のコメントアウトを外すのも忘れないこと


"dein Scripts-----------------------------
if &compatible
  set nocompatible               " Be iMproved
endif

" Required:
set runtimepath^=/root/.cache/dein/repos/github.com/Shougo/dein.vim

" Required:
call dein#begin(expand('/root/.cache/dein'))

" Let dein manage dein
" Required:
call dein#add('Shougo/dein.vim')

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

" You can specify revision/branch/tag.
call dein#add('Shougo/vimshell', { 'rev': '3787e5' })

" Required:
call dein#end()

" Required:
filetype plugin indent on

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

"End dein Scripts-------------------------

vimプラグインをインストール

インストールしたいvimのプラグインをさらに追記。 .vimrc を編集

call dein#add('vim-airline/vim-airline')
call dein#add('vim-airline/vim-airline-themes')

インストールする

:call dein#install()

入れたプラグインは:Unite deinで確認できる