(u_u)

neovimのインストール

Categories: [blog]
Tags: [neovim], [vim], [mac]

neovimのインストール
Installing Neovim · neovim/neovim Wiki · GitHub

brew install neovim
pip3 install --upgrade neovim

プラグインマネージャ(dein)のインストール

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

.vimrcにあたる~/.config/nvim/init.vimを編集
Vimでの補完ツールプラグインをneocompleteからdeopleteへ

set tabstop=4
set shiftwidth=4
set softtabstop=4
set autoindent
set smartindent
set number
set helplang=ja,en

syntax on

nnoremap :tree :NERDTreeToggle
nnoremap <silent><C-e> :NERDTreeToggle<CR>

let g:airline_theme ='light'
set laststatus=2
set showtabline=2 " 常にタブラインを表示
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
set clipboard+=unnamedplus

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

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

" Required:
if dein#load_state('/Users/takuya/.cache/dein')
    call dein#begin('/Users/takuya/.cache/dein')

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

    " Add or remove your plugins here like this:
    call dein#add('Shougo/neosnippet.vim')
    call dein#add('Shougo/neosnippet-snippets')
    call dein#add('vim-airline/vim-airline')
    call dein#add('scrooloose/nerdtree')
    call dein#add('shougo/deoplete.nvim')
    call dein#add('vim-jp/vimdoc-ja')
    call dein#add('Shougo/neco-vim')
    call dein#add('Shougo/neco-syntax')
    call dein#add('ujihisa/neco-look')
    call dein#add('vim-airline/vim-airline-themes')
    " 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

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

let g:deoplete#enable_at_startup = 1

このままでは文字化けが起きてるので、追加フォントをインストール
GitHub - powerline/fonts: Patched fonts for Powerline users.

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

ターミナルのフォントをpowerline付きのものに変えて終わり。