Vim, æå®ãããã¿ã¼ã³ã«ãããããªãæååãæ¤ç´¢/ç½®æãã
æ£è¦è¡¨ç¾ã®å¦å®ã¯\@!ã使ãã:help \@! åç §ãã¡ãªã¿ã«ããã¯zero-widthãªããããªã®ã«æ³¨æããµã¤ãã®å¦å®ã¨ããªããã§ããããã¾ããããã©ã
ä¾: ãããã¡å ã PATTERN ã«ãããããªãè¡ã REPLACEMENT ã§ç½®ãæãã
:%s/\(PATTERN\)\@!.*/REPLACEMENT/
追è¨: :vã³ãã³ãã使ã
ä¸ã®ä¾ã ã¨
:%v/PATTERN/s/.*/REPLACEMENT/
:vã®è©³ç´°ã¯:help :vãçèªã®ãã¨ã
:g!ã¨ç価ã®ã³ãã³ãã§ããæå®ãããã¿ã¼ã³ã«ãããããªãåè¡ã«å¯¾ãã¦ä»¥ä¸ã®ã³ãã³ããå®è¡ãããã¨ããã³ãã³ãã
thanks>mattn