Vim ã®ãã¼ã¸ã§ã³ãåå¾ãã
Lingr ã® Vim é¨å±ã§è©±é¡ã«ãªã£ã¦ããã®ã§è¦æ¸ã
Vim ã®ãã¼ã¸ã§ã³ã¯ :version ã§åºåããäºãã§ãã¾ããã¹ã¯ãªããã§ã¯ãv:version ã§ãã¼ã¸ã§ã³çªå·ãåå¾ã§ãã¾ãã
" 7.4 ã§ããã° echo v:version " => 704
[ãããçªå·ãåå¾]
v:version ã§ã¯é©ç¨ããã¦ãããããçªå·ãåå¾ã§ããªãã®ã§ has() ã使ç¨ãã¾ãã
ã©ã®ãããã¾ã§é©ç¨ããã¦ããã®ããå¤å®ããå ´åã¯ã¹ã¯ãªããæ¸ããããªãããã
let i = 1 while has("patch" . i) let i += 1 endwhile echon printf("%04d", i - 1) " => 0051 unlet i
ãã ãã
http://lingr.com/room/vim/archives/2013/10/20#message-17115802
ã¨ãããã±ã¼ã¹ããããããªã®ã§å®ç§ã¨ã¯ãããªãããã