1
1

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 5 years have passed since last update.

Vim script 用オムニ補完関数の設定

Last updated at Posted at 2017-06-04

Vim script 用のオムニ補完関数を書きました - 書いたものなど とのことなので、vim-Verdin を使う設定を書いてみた。

dein.vim で TOML を使っているのでこんな感じ。
neocomplete.vimneosnippet.vim ので neocomplete から Verdin を呼び出すようにする。
(当初は neocomplete と置き換えようかと思ったけど、neosnippet を使いたかったのでやめた。)

Vim script で補完を実行するタイミングが、この正規表現でいいのかはわからん。
名前空間もあるか~と思って : も含めたけどいらんかな?
同じ考え方なら # も含めた方が良いか……。
let g:neocomplete#force_omni_input_patterns.vim = '\%(\w\|[:\.]\)\{3,}'

[[plugins]]
repo = 'machakann/vim-Verdin'
on_ft = 'vim'
hook_source = '''
  let g:Verdin_fuzzymatch = 1

  " neocomplete
  let g:neocomplete#sources = get(g:, 'neocomplete#sources', {})
  let g:neocomplete#sources.vim = ['neosnippet', 'omni']
  let g:neocomplete#force_omni_input_patterns = get(g:, 'neocomplete#force_omni_input_patterns', {})
  let g:neocomplete#force_omni_input_patterns.vim = '\%(\w\|[:\.]\)\{3,}'
'''
1
1
4

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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?