Tanablog:smartchrãå
¥ãã ä¸è¨ã®ã¨ã³ããªãè¦ã¦smartchr.vimãå
¥ãã å
ã¨ã³ããªã«æ¸ããã¦ããéããä¸è¨ã®ããã«è¨å®ãã¦ä½¿ã£ã¦ã¿ãã inoremap <buffer><expr> = smartchr#one_of(' = ', ' == ', '=') ãããããã便å©ãã¨æã£ããã©ã C/C++ã®å ´åã+=ã|=ã®ãããªè¤å代å
¥æ¼ç®åãã<=,>=ãªã©ã®æ¯è¼æ¼ç®åãå
¥åããéã« æå³ããªãã¹ãã¼ã¹ãæ¿å
¥ãããããã«ãªã£ã¦ãã¾ã£ãã ã§ããã°ããã®ã¸ãã®æ¼ç®åãå
¥åããéãç¡é§ã«ãã¼ãé£æããããªãã ããã§ã=ãå
¥åãããéã¯ãã«ã¼ã½ã«ç´åã®å
容ããã§ãã¯ã㦠+,-,*,/,&,|,>,<,! ã®å¾ã«ç¶ããªãå ´åã ããsmartchr#one_ofãå¼ã¶ããã«è¨å®ããã(%=ã¯ä½¿ããªãã®ã§ç¡è¦) ã§ããããã®æ¼ç®åã«ç¶ã=ã®å ´åã«ã¯ãç´åã®ç©ºç½ãåé¤ãã
{{#tags}}- {{label}}
{{/tags}}