LoginSignup
1
0

More than 3 years have passed since last update.

AtCoder用にVim Snippetをインスコしたけど動かなかった話

Last updated at Posted at 2020-03-11

始めに

Visual Studio Codeみたいな補完機能をVimでも使いたいなーとか前々から思ってたら、Snippetという機能がありました。ちょうどAtCoderの精進を始めた頃にSnippetの記事見つけて「お、これいいやん」となったわけです。
で、早速インスコしたわけですが、:NeoBundleInstall叩いてもVimのSnippetが機能しないんですね、何度incと叩いても#include <library>が予測変換で出ない。なぜだ。

解決法

はい、Vimテクニックバイブルこちらの記事に書いてました。NeoBundleinstallでインスコした後に.vimrcに

.vimrc
" Vim起動時にスニペットを利用可能にする
let g:neocomplcache_enable_at_startup = 1

" Plugin key-mappings.  " <C-k>でsnippetの展開
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)

を入れないと使えないらしいですね。無事動きました!解散!

参考

Vimのneosnippetで自分用snippetファイルを追加したい
http://gg-hogehoge.hatenablog.com/entry/2014/04/05/230043

Vim テクニックバイブル
https://books.google.co.jp/books?id=QZSWbc83LfQC&pg=PA340&lpg=PA340&dq=vim+snippet+%E4%BD%BF%E3%81%88%E3%81%AA%E3%81%84&source=bl&ots=i6Giq0sgVS&sig=ACfU3U1FI3gdMh3QgvkAjFi3HQb0XM60DQ&hl=ja&sa=X&ved=2ahUKEwjJxKyZ7YDoAhUoBKYKHYyBDXI4ChDoATACegQIChAB#v=onepage&q=vim%20snippet%20%E4%BD%BF%E3%81%88%E3%81%AA%E3%81%84&f=false

【競プロ】AtCoder早解きテクニック10選 (灰 ~ 緑コーダー向け)
https://qiita.com/xryuseix/items/7e9b4c6f12d001a0c0db

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