パーソナルツール

履歴情報の取得

作者: 小見 拓 最終変更 2012年01月08日 12時11分

履歴を取得する

" コマンドライン履歴を取得
let cmdhist = histget(':', -1)
echo cmdhist
"# => コマンドライン履歴テキスト

" 検索履歴を取得
let searchhist = histget('/', -1)
echo searchhist
"# => 検索履歴テキスト

" 式の履歴を取得
let exprhist = histget('=', -1)
echo exprhist
"# => 式履歴テキスト

" input()の入力履歴を取得
let inputhist = histget('@', -1)
echo inputhist
"# => input()入力履歴テキスト

プラグインを作成時に履歴を確認するなら、:historyの方が手軽。

:history :
:history /
:history =
:history @
ドキュメントアクション
コメント
blog comments powered by Disqus