1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

neovim + YouCompleteMe + neoterm

Last updated at Posted at 2020-02-06

VS codeに以降する案もありましたが、やはりterminal + tmux + vim + neotermの便利さはまだ再現できない(多分)ので、引き続きvimをつかいます。

だいぶ混乱したので2020年2月時点でのMacでの環境構築についてまとめた。
neovim + YouCompleteMe + neoterm
がよさそう。YouCompleteMeがneovim対応したのがつよい

neovim

brewでnvimを入れれば良い。pythonを利用するためにpynvimもインストールする。

brew install neovim
pip3 install pynvim

Bundle

mkdir -p ~/.vim/bundle && cd ~/.vim/bundle
git clone https://github.com/VundleVim/Vundle.vim.git

YouCompleteMe

  1. YouCompleteMeをclone
  2. 依存をダウンロード
  3. install(この時python3のバイナリを指定すること)
cd ~/.vim/bundle
git clone https://github.com/ycm-core/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive
/oreno/python3 install.py

なお、neovimでyoucompletemeを動作させるためには下記に従う必要がある
https://github.com/neovim/neovim/tree/master/contrib/YouCompleteMe

neoterm

cd ~/.vim/bundle
git clone https://github.com/kassio/neoterm.git

~/.config/nvim/init.vim

set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.vim/bundle/neoterm
filetype plugin on

call vundle#begin()
   Plugin 'VundleVim/Vundle.vim'
   Plugin 'file:///Users/oreno/.vim/bundle/YouCompleteMe'
   Plugin 'file:///Users/oreno/.vim/bundle/neoterm'
call vundle#end()

let g:ycm_auto_triger=1
let g:ycm_min_num_of_chars_for_completion=1
let g:ycm_autoclose_preview_window_after_insertion=1

let g:neoterm_autoscroll=1
let g:neoterm_default_mod='vertical'
tnoremap <silent> <ESC> <C-\><C-n><C-w>
nnoremap <silent> <C-e> V:TREPLSendLine<cr>j^
vnoremap <silent> <C-e> V:TREPLSendSelection<cr>'>j^

とりあえずanacondaとの共存は無理っぽい

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?