LoginSignup
2
2

More than 5 years have passed since last update.

iTerm2 の Color scheme インポートしたプリセットを一括削除する

Last updated at Posted at 2016-04-09

大量のいらないプリセットを削除したい

iTerm2 のColor scheme にろいろなプリセットをインポートして試すと、不要なものを削除したくなります。
そのとき、iTermの設定からは1つづつしか削除できないため、単純作業を強いられることになります。

Preference > Profiles > Colors > Delete Preset... でプルダウンから一つづつ選んで削除。
※繰り返し

XMLを編集して一括削除

/tmp ディレクトリにXMLの設定ファイルをコピーして編集して元の位置に戻します。

cd /tmp
cp ~/Library/Preferences/com.googlecode.iterm2.plist .
plutil -convert xml1 com.googlecode.iterm2.plist
vi com.googlecode.iterm2.plist
# quit iterm2
cp com.googlecode.iterm2.plist ~/Library/Preferences
# restart iterm2

参考: https://groups.google.com/forum/embed/#!topic/iterm2-discuss/Z78aefrZ6gY

vi で com.googlecode.iterm2.plist を編集する際、:se nu で行番号を表示し、31行目付近の下記タグ内の削除したいプリセットの終わりの行が例えば10000行目だとすると、:32,10000dなどと打って一気に削除するとよいかと思います。

<key>Custom Color Presets</key>

残したプリセット

Thayer Bright

t3chnoboy/thayer-bright-iTerm

2
2
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
2
2