Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 2

Warning: include_once(http://www.confrage.com/bin/header.php): failed to open stream: no suitable wrapper could be found in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 2

Warning: include_once(): Failed opening 'http://www.confrage.com/bin/header.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 2
gvimで全ての行末に任意の文字を付加する | 株式会社CONFRAGE
Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 17

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 17
gvimで全ての行末に任意の文字を付加する
行末にカンマとかダブルクォーテーションを付加したい場合、
行ごとにカンマをつけて一行下にさがる、というマクロを作成し、行数文繰り返巣などの方法が考えられますが

:%s/$/,/

というようなexコマンドを使用すると全行の行末に対してカンマが付加されます。
ダブルクォーテーションを付加したい場合は

:%s/$/"/

とします。以下、例です。

全ての行末に任意の文字を付加する
全ての行末に任意の文字を付加する

上記ファイルに :%s/$/,/ を実行すると下図のようになります。

全ての行末に任意の文字を付加する
全ての行末に任意の文字を付加する

私はこのコマンドは仕様書からSQL文を作成する時などによく使用しています。

Back to top

Information

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 73

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 73

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 82

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/editor/gvim/ex_command/add_end_line/add_end_line.html on line 82