LoginSignup
53
31

More than 5 years have passed since last update.

vimの置換で改行を(挿入|削除)する

Posted at

vimの置換で改行を(挿入|削除)する

環境

windows10
vim 7.4
encoding=utf-8

コード

(注:通常の置換についての知識は前提としています。)

改行を削除する。

:s/\n//g

各行を挿入する

:s//\r/g

後書き

挿入と削除で特殊文字が変わることに注意すること。

:h \r

でヘルプを見ても理由はよく分からない。

53
31
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
53
31