LoginSignup
12
12

More than 5 years have passed since last update.

たまにしか使わないのでいつも忘れるVimコマンド

Last updated at Posted at 2014-03-07
  • diffを取る。
vertical diffsplit ファイル名
  • 改行コード一括置換
%s/^M//g

^Mは、[Ctrl] + [V] キーを押してから、[Ctrl] + [M] キーを押す

  • 全空行削除
g/^$/d
  • euc−jpで開き直す。ファイルを開いた状態で、
e ++enc=euc-jp
  • JSONを整形する。jqをインストールしておく。(brewでもportでもいい)
  • jq Tutorial
%!jq '.'
12
12
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
12
12