Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
2
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@callmekohei

Vimで単語補完 ( with deoplete )

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
    set nocompatible
    syntax enable
    filetype plugin indent on

deopleteを試してみる

$ vim -N -u minimal.vim

    foo
    bar
    baz

    fo  // ここでポップアップに foo [-] A , fo [-] A とでたらオーケー!
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
2
Help us understand the problem. What are the problem?