Quantcast
Channel: Vimタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 5608

Vimで単語補完 ( with deoplete )

$
0
0

Summary

Vimで単語補完をしてみる

単語補完にはdeopleteというプラグインをつかう

最小(minimal)の環境を作ることで雰囲気をつかむ

Environment

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.13.4
BuildVersion:   17E199

$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr  1 2018 01:22:42)
macOS version
Included patches: 1-1655
Compiled by Homebrew

$ pip3 --version
pip 10.0.0 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

$ pip3 show neovim
Name: neovim
Version: 0.2.4
Summary: Python client to neovim
Home-page: http://github.com/neovim/python-client
Author: Thiago de Arruda
Author-email: tpadilha84@gmail.com
License: Apache
Location: /usr/local/lib/python3.6/site-packages
Requires: msgpack, greenlet
Required-by: 

Install

vim, python3.6-neovimがなければインストールする

$ brew install vim

$ pip3 install neovim ( or pip3 install --upgrade -I neovim )

vim pluginsのインストール

// 作業フォルダ foo を作成
$ mkdir foo/
$ cd foo/

// プラグインをダウンロード
$ git clone --depth 1 https://github.com/Shougo/deoplete.nvim
$ git clone --depth 1 https://github.com/roxma/nvim-yarp
$ git clone --depth 1 https://github.com/roxma/vim-hug-neovim-rpc

// minimal.vimを作成
$ vim minimal.vim

    set runtimepath+=./deoplete.nvim
    set runtimepath+=./nvim-yarp
    set runtimepath+=./vim-hug-neovim-rpc
    let g:deoplete#enable_at_startup = 1
    call deoplete#custom#option('deoplete-options-yarp', v:true)
    set nocompatible
    syntax enable
    filetype plugin indent on

deopleteを試してみる

$ vim -N -u minimal.vim

    foo
    bar
    baz

    fo  // ここでポップアップに foo [-] A , fo [-] A とでたらオーケー!

Viewing all articles
Browse latest Browse all 5608

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>