This plugin monitors how much time you spend on vimrc editing at work.
This plugin measures how much you devote your time to Vim.
日本語版は下のほうにあります。
This plugin monitors your activitiy for Vim using autocommand-events and logs it for each file. When you type any commmand, the total time is added up and echoed.
- Running time of Vim.
- View (normal mode) time of "vim" filetype including vimrc.
- Edit (insert mode) time of "vim" filetype including vimrc.
- View (normal mode) time of "help" filetype.
- Edit (insert mode) time of "help" filetype.
- Pure Vim script
- Stand-alone
- Install this plugin using some plugin manager.
- If you don't use plugin manager,
:h packages
will be helpful.
- If you don't use plugin manager,
- Edit vimrc or *.vim (Vim script) file or read some help.
- Type
:DevotionToday
- It shows how much time you spend on Vim today.
- DevotionRange
- It shows how much time you spend on Vim between start_time and stop_time.
- Parameter format: %Y%m%d%H%M%S (Number)
- Example: from 2018/12/31 12:34:56 to 2019/01/01 00:00:00. (stop_time itself is exclueded.)
:DevotionRange 20181231123456 20190101000000
- DevotionToday
- It calls DevotionRange with today's 00:00:00 and tomorrow's 00:00:00.
- DevotionLastDay
- It calls DevotionRange with 00:00:00 of the last day you use Vim and today's 00:00:00.
- DevotionThisWeek
- From sunday of this week to sunday of next week
- DevotionLastWeek
- From sunday of previous week to sunday of this week
- DevotionThisMonth
- From the first day of this month to the first day of next month
- DevotionLastMonth
- From the first day of previous month to the first day of this month
- DevotionThisYear
- From the first day of this year to the first day of next year
- DevotionLastYear
- From the first day of previous year to the first day of this year
- g:devotion#log_file
- Path and name of log files.
- Default: $XDG_DATA_HOME/devotioin/devotion_log (use '~/.local/share' if $XDG_DATA_HOME is empty)
- g:devotion#debug_enabled
- Logs for debugging if v:true.
- Default: v:false
- Add test!
- Improve test
- Travis CI
- Add vim style document.
- Flush out all logs at some interval.
- Improve event detection method.
- Loss of trailing digits
MIT License
- Pull request to improve this plugin or English wording/expression of the document is welcome! I'd like to know more effective Vim script coding. Thank you.
あなたが vimrc 弄りに費やしてしまった捧げた時間を測ってくれるプラグインです。
その他にも Vim script や help を参照、編集していた時間も測ります。
各ファイルごとに参照時間、編集時間を測りログに残します。
各コマンドを実行することでログからそれぞれの時間を計算し、表示します。
- Vim の実行時間
- "vim" ファイルタイプ (vimrc 含む) の参照 (ノーマルモード) 時間
- "vim" ファイルタイプ (vimrc 含む) の編集 (挿入モード) 時間
- "help" ファイルタイプの参照 (ノーマルモード) 時間
- "help" ファイルタイプの編集 (挿入モード) 時間
- Vim script 100%
- スタンドアローン
Screenshot を参照
- プラグインマネージャか何かを使って devotion.vim をインストールします。
- プラグインマネージャを使っていない場合は、
:h packages
が参考になると思います。
- プラグインマネージャを使っていない場合は、
- vimrc や *.vim (Vim スクリプト) ファイルを編集、もしくはヘルプを読みます。
:DevotionToday
と入力します。- 今日どれくらいの時間を Vim のために捧げたか表示します。
- DevotionRange
- 2 つの引数 start_time および stop_time を持ち、この間に費やした時間を表示します。
- 引数フォーマット: %Y%m%d%H%M%S (数値)
- 例: 2018/12/31 12:34:56 から 2019/01/01 00:00:00 まで (stop_time 自身は含まれません。)
:DevotionRange 20181231123456 20190101000000
- DevotionToday
- 今日の 00:00:00 および明日の 00:00:00 で DevotionRange を呼び出します。
- DevotionLastDay
- 最後に Vim を使った日の 00:00:00 および今日の 00:00:00 で DevotionRange を呼び出します。
- DevotionThisWeek
- 今週の日曜日から来週の日曜日まで
- DevotionLastWeek
- 先週の日曜日から今週の日曜日まで
- DevotionThisMonth
- 今月の最初の日から来月の最初の日まで
- DevotionLastMonth
- 先月の最初の日から今月の最初の日まで
- DevotionThisYear
- 今年の最初の日から来年の最初の日まで
- DevotionLastYear
- 昨年の最初の日から今年の最初の日まで
- g:devotion#log_file
- ログファイルのパスおよびファイル名
- 初期値: $XDG_DATA_HOME/devotioin/devotion_log ($XDG_DATA_HOME が空の場合は '~/.local/share')
- g:devotion#debug_enabled
- v:true の場合、デバッグ用のログを出力する。
- 初期値: v:false
英語版 を参照
MIT License
Vim script のより良い書き方を学びたいので改善点などあれば指摘、プルリクエストしてもらえると嬉しいです。英訳や言葉遣いに関しても不自然な点があればご指摘いただけると助かります。