LoginSignup
4
8

More than 5 years have passed since last update.

Vimで現在のカーソル行をGitHubで開く

Posted at

できたのか!って感じだったのでメモ。

様子

70d87de3d2a9c1f551a55c077991398f.gif

Vim から GitHub の該当行が一発で開ける。

方法1:tpope/vim-fugitive を使っている場合

vim-fugitive 使ってるので私はこれでできました。
Shift+v でカーソル行を選択した後、

:Gbrowse

を実行する。
:Gbrowse はカーソル行を指定しなくても該当のファイルを開くことができて便利。

方法2:その他のプラグインを入れる

試してませんが、「vim open current line github」とかで検索して見つかったものを。

どちらも README 見る限り同じことができそう。

方法3:コマンドを自作する

参考:Vim Trick: Open current line on GitHub - Felix Geisendörfer

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