chloe463 / dotfiles

0 stars 0 forks source link

Memo #13

Open chloe463 opened 4 years ago

chloe463 commented 4 years ago

Laptop 移行時に困ったことや気づいたことをまとめていく

chloe463 commented 4 years ago

./up brewvirtualbox のインストールがコケた

chloe463 commented 3 years ago

VSCode のセットアップ

次のコマンドで設定ファイルをリンクする

ln -s $HOME/dotfiles/vscode/keybindings.json /Users/tsuyoshi/Library/Application\ Support/Code/User/keybindings.json
ln -s $HOME/dotfiles/vscode/settings.json /Users/tsuyoshi/Library/Application\ Support/Code/User/settings.json

次のコマンドで連続入力を有効にする

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false

移行元のマシンで次のコマンドを実行すると、インストールされている extension を一括でインストールするためのコマンドを出力できる

code --list-extensions | xargs -L 1 echo code --install-extension
chloe463 commented 1 year ago

fzf による command history が効かない場合

Brewfile に fzf は書かれているので、インストールはされているが、ctrl + r でコマンド履歴の fuzzy search ができないときは下記コマンドを実行すると解消する。(単にセットアップが足りないだけ)

$(brew --prefix)/opt/fzf/install

cf. https://github.com/junegunn/fzf

chloe463 commented 1 year ago

スペース2回でピリオドが自動入力されるおせっかい機能を無効化するには

System configuration > Keyboard > Input sources > Add period with double-spaces を無効化する

image

chloe463 commented 1 year ago

Tmux plugin

※ 最初セットアップしたらほとんど触らないから忘れがち

下記コマンドで tpm を持ってきたあと、tmux prefix + I(ctrl + tI (アイ))

gh repo clone tmux-plugins/tpm ~/.tmux/plugins/tpm

https://github.com/tmux-plugins/tpm https://github.com/tmux-plugins/tmux-resurrect

chloe463 commented 1 year ago

Tmux 上で True color で表示できるようにする

次のコマンドでグラデーションがいい感じに表示できていたら OK。 これがうまく設定できていないと、neovim の nord が変な感じで表示されてしまう。

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh | bash

もしそうなっていなかったら、次を実行する。

$ brew install ncurses # すでに入っている可能性もある
$ /opt/homebrew/opt/ncurses/bin/infocmp tmux-256color > ~/tmux-256color.info
$ tic -xe tmux-256color ~/tmux-256color.info
$ infocmp tmux-256color | head

最後のコマンドの結果で Reconstructed via infocmp from file: /Users/tsuyoshi/.terminfo/74/tmux-256color と表示されていことを確認。 最初の curl を再度実行してグラデーションがいい感じに表示されるかを確認する。 もし最初の実行時から変わっていなかったら、tmux を再起動する。

参考: https://zenn.dev/shinoyu/scraps/d480218c59cdf2