Glide Note

glidenote's blog

yankring.vimでUndefined variableエラー(E121)

vim-scripts/YankRing.vim · GitHub

YankRing.vimを最新版(Ver13.0)にしたら、Yank/Pasteするたびに

1
2
3
4
Error detected while processing function <SNR>28_YRPaste:
line    1:
E121: Undefined variable: g:yankring_manual_clipboard_check
E15: Invalid expression: g:yankring_manual_clipboard_check == 1

というエラーを吐くようになったので、Docment を見てみたところ

yankring_manual_clipboard_check
< Default: 0
If running in console mode, Vim’s FocusGained event will not
fire as we flip back and forth between windows. This normally
instructs the YankRing to check for updates to the system
clipboard. When this option is set, the YankRing will check
the clipboard under many different circumstances:
Adding a new entry to the YankRing
Replacing a previous paste
Showing the YankRing window
If the YankRing is setup to check the clipboard and the
GUI is not running, this option will be enabled by default.
To disable this feature you can put the following in your |vimrc| >
let g:yankring_manual_clipboard_check = 0

とのこと。なぜかDefault: 0が効いていないようなので、.vimrcに下記を追記

1
let g:yankring_manual_clipboard_check = 0

エラーも出なくなりました。

Comments