LoginSignup
4
4

More than 5 years have passed since last update.

Fugitive Pluginの:Gbrowseコマンドで使用されるブラウザを設定する

Posted at

GitコマンドをVim上で操作する際に便利なFugitiveというPluginがあります。

この中の:Gbrowseというコマンドを使うと、現在開いているファイルに対応するGithub上のURLをWebブラウザで開いてくれます。

しかし、僕のMacでは:Gbrowseコマンドを使っても何も反応がありませんでした。

いろいろ調べたところ、~/.gitconfigというファイルに設定を追加する必要がありました。
以下は使用するWebブラウザにChromeを指定する場合の設定です。

~/.gitconfig
[web]
    browser = open
[browser "chrome"]
    cmd = open -a 'Google Chrome.app'

git web--browseというコマンドを使うと、コマンドライン上から設定もできるようですが、ややこしそうなので直接設定ファイルを変更しました。

詳しくはReadmeファイルのFAQ欄を参考にしてみてください。

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