LoginSignup
5
5

More than 5 years have passed since last update.

[Vim] 行をカンマ区切りで改行する

Last updated at Posted at 2016-02-17

Javaのenumとかでよくやるのだが、いちいちインサートモードに入ってやってるのめんどくさいので置換を使おう。

例)

GET, POST, PUT, PATCH, DELETE;

コマンドモードで、:s/, /\r,/g

結果)

GET
,POST
,PUT
,PATCH
,DELETE;
5
5
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
5
5