You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the same as clicking the Code button without ?plain=1, and ?plain=1 also enables the "code" mode:
This also works well on files that don't have any "viewer" in github that would default to the "code" view. Plus, it's more explicit, which I think is a good thing. Here's an example:
When viewing a markdown file, if I run
:ToGithub
, I get a URL like:https://github.com/tonchis/vim-to-github/blob/9ea9c75b6cd48bd42823a39c56a05a2ff8161536/README.md#L3-L3
However, this link brings up the HTML representation of the markdown file, not the lines of code:
To always make the permalink open the lines of code, we want to add
?plain=1
to the URL, like so:https://github.com/tonchis/vim-to-github/blob/9ea9c75b6cd48bd42823a39c56a05a2ff8161536/README.md?plain=1#L3-L3
This is the same as clicking the Code button without
?plain=1
, and?plain=1
also enables the "code" mode:This also works well on files that don't have any "viewer" in github that would default to the "code" view. Plus, it's more explicit, which I think is a good thing. Here's an example:
https://github.com/tonchis/vim-to-github/blob/9ea9c75b6cd48bd42823a39c56a05a2ff8161536/plugin/to-github.vim?plain=1#L46-L49
And here's the link directly placed in the issue, where you can still see that the snippet is displayed:
vim-to-github/plugin/to-github.vim
Lines 46 to 49 in 9ea9c75
We should add
?plain=1
for all generated links! This will make the links always go to lines of code, no matter what 👌The text was updated successfully, but these errors were encountered: