#10: Vim, Emacs, bat をインストール
あまり時間が取れなかったので今日は軽めに。
今日やったこと(Done)
エディタをインストールしましょう。
Vim も Emacs も元から入っていますが少しバージョンが古いので Homebrew からインストールすることにします。
まず Vim。
$ which vim /usr/bin/vim $ vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun 15 2020 21:59:18) $ brew info vim vim: stable 8.2.1300 (bottled), HEAD $ brew install vim
お次は Emacs です。
$ which emacs /usr/bin/emacs $ emacs --version GNU Emacs 22.1.1 $ brew info emacs emacs: stable 26.3 (bottled), HEAD $ brew install emacs
Vim も Emacs も /usr/local/bin
に入りましたが、/usr/bin
の方が $PATH
で先になっていたので設定を変更します。
config.fish
に下記行を追加します。
set -x PATH /usr/local/bin $PATH
$ which vim /usr/local/bin/vim $ vim --version VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jul 26 2020 23:39:19) $ which emacs /usr/local/bin/emacs $ emacs --version GNU Emacs 26.3
これで OK です。
あと、cat
の代替として Rust で書かれた bat
というコマンドがあるそうです。行番号付き、シンタックスハイライト付きで表示してくれるとのこと。見やすくなってよさそうですね。
sharkdp/bat: A cat(1) clone with wings.
$ brew info bat bat: stable 0.15.4 (bottled) Clone of cat(1) with syntax highlighting and Git integration https://github.com/sharkdp/bat $ brew install bat
こんな感じです。これはいいですね!
わかったこと(Fact)
- シェルコマンドは Rust で再実装されたものが結構あるみたい。