LoginSignup
9

More than 5 years have passed since last update.

VimのC-aで月、火、水、木、キン肉マン!!!を実現する

Last updated at Posted at 2012-05-26

VimではCtrl+aで数値をインクリメント出来ます。
例えば、
1
と、あった場合、この行にカーソルを当ててC-aで2に変わります。

このインクリメントを月や曜日に適応したプラグインがmonday.vimです。
mondaytuesdayにしてくれます。しかも大文字・小文字を考慮してくれます。

こちらの記事にあるように、monday.vimをカスタマイズすることで、独自のインクリメントを定義できます。
ここで、

monday.vim
call <SID>AddPair('月', '火')
call <SID>AddPair('火', '水')
call <SID>AddPair('水', '木')
call <SID>AddPair('木', 'キン肉マン!!!')

とすることで、月→火→水→木→キン肉マン!!! となります。

心なしか強くなった気がしますね。

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
What you can do with signing up
9