202401 « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 » 202403 perlとかrubyを書いててコメント行から改行すると「#」が自動挿入されてうざい。 回避するには ↓ :setlocal formatoptions-=r :setlocal formatoptions-=o 毎回入力するのが面倒ならユーザの設定ファイル(プラグイン)に設定しておくのが吉。 $HOME/.vim/after/ftplugin/ 配下の perl.vim とか ruby.vim に setlocal formatoptions-=r setlocal formatoptions-=o と記述しておく。 プラグインが読み込まれる順番は :set runtimepath? で確認できる。