ç¥ã£ã¦ããã¨ããã¨ããæã«å½¹ç«ã¤ãã¡ãã£ã¨ç¹æ®ãªundoãredo
追è¨
vimã®ãã¼ã¸ã§ã³ 7.0.237
ãã¨ãã°
ï¼ï¼ã³ã³ã¾ã§ç·¨éãã¦
ï¼ï¼ããããããã¡ãããï¼ãã£ã¦ãundoãã¦
ãã£ãã®ã¨ããã¾ã§æ»ã
ï¼ï¼ãã§ã
ã¾ããæ¸ãç´ãåãããã ãã©ã
ï¼ï¼ããã£ã±ãã£ãã®ã§ãã£ã¦ããããï¼ï¼ã
ã§ãundoãã¦ãã»ã»ã»
ï¼ã«æ»ãããã®ã«æ»ããªãï¼ï¼
ã£ã¦ãããã¨ãæã
ãªãã§ããï¼
vimãªãg+,g-ã³ãã³ãã§æ»ãã¾ããã¨ã
undotree
vimã¯undotreeã¨ããæ¦å¿µããããç·¨éå±¥æ´ãããªã¼ç¶ã«ç®¡çãã¦ãã¾ãã
é常ã®undoãredoã§ã¯åãã¼ãã®ææ°ã®æã ãããè¡ãæ¥åºæ¥ã¾ãããã
ä»»æã®ãã¼ãã«ç§»åããæ段ãç¨æããã¦ãã¾ãã
ãã®ã³ãã³ããg-ã¨g+ã§ãã
ãã¨ãã°ãã£ãã®ãããããg-ãæ¼ãã¨
解説
ã©ããããã¨ãèµ·ãã¦ãã®ãã¨è¨ãã¨ä¸ã®å³ã®ãããªãã¨ãèµ·ãã¦ã¾ãã
æ°åã¯åé ã®å³ã®çªå·ãé常ã®undoãredoã§ã¯èµ¤ã®ã©ã¤ã³ãè¡ã£ããæ¥ããããã ãã§ã2ã®ç¶æ
ã«ã¯æ»ãã¾ããã
g-ã³ãã³ãã§ã¯ãç¾å¨ã®ãã¼ãã®æ¬¡ã«æ°ãããã¼ãã«ç§»åããããã«ã2ã®ç¶æ
ã«æ»ããã¨ãåºæ¥ã¾ãã
é¢é£ã³ãã³ã
undotreeé¢é£ã®ã³ãã³ãã¯ä»¥ä¸ã§ãã
- g-
- g+
- :undolist
- :undo NODE_NUMBER
ç·¨éå±¥æ´ãè¤éã«ãªã£ãã¨ãã¯:undolist
ããããâ
ããããâ
追è¨ï¼ããã¥ã¢ã«ã®å ´æ
ãã®ãã¨ã¯ãã«ãã®Undo and Redo(undo.txt)ãThe undo tree(usr_32.txt)ãè¦ãã¨æ¸ãã¦ããã¾ãã
:help undo-tree
ã¾ã¨ã
undo,redoã§å°ã£ããg-ãg+ã³ãã³ãã試ãã¦ã¿ãã