News for hackers. Stuff that matters.
Re:Web-based editor by moogly on Friday September 03, 2021 @06:03AM (#28402305)
I've been using this for a while. Very, very, very handy for

- Just exploring some code.

- Quickly pull up as reference code w/ decent navigation without having to checkout locally or navigate forward/back in the source tree in GitHub.

- When reviewing PRs and wanting to check out some surrounding code that is not part of the actual PR.

- If you want to quickly commit something really small and trivial in master/a branch/a PR without having to do the whole stash/checkout/pull/change/commit/push rigmarole (like if you're in the middle of doing something else).

Things that are very annoying:

- Some of the most used VSCode hotkeys are browser hotkeys, like Ctrl+T, Ctrl+P, Ctrl+Shift+P etc. The functions aren't even rebound to anything else, they're just not available via hotkeys.

- Some extensions are not available, especially ones that (partially) may rely on some kind of local binary. I understand that, but that also sometimes rules out extensions that could partially work. Example: none of the Zig extensions work because they reference tooling binaries, so I can't even get syntax highlighting of Zig code. You could argue that's an extension packaging issue, however. That's fair.

- The PR reviewing UI needs a lot of work, because right now it's not as good as the normal GitHub UI, so currently, for larger PRs, I need to have both UIs open.

I hope in the future you can save a gist or something with custom settings/hotkeys/extensions to load. I'm sure they're working on something like that.

Update: Oh, there actually is some form of settings sync. Have to check that out.

Re:Web-based editor by justinsaccount on Friday September 03, 2021 @08:49AM (#28403438)
> - Some of the most used VSCode hotkeys are browser hotkeys, like Ctrl+T, Ctrl+P, Ctrl+Shift+P etc. The functions aren't even rebound to anything else, they're just not available via hotkeys.

On chrome(os) at least if you move the editor to it's own fullscreen window all keys are passed to the editor.

There's probably a way to make this work without requiring the window to be fullscreen.

Re:Web-based editor by wffurr on Friday September 03, 2021 @08:53AM (#28403482)
Click the "add to shelf" or "create shortcut" option in the Chrome menu, and tick the box for "open as window".

https://www.cnet.com/how-to/this-setting-makes-chrome-os-fee...

Re:Web-based editor by cookiengineer on Friday September 03, 2021 @10:12AM (#28404472)
> - Some of the most used VSCode hotkeys are browser hotkeys, like Ctrl+T, Ctrl+P, Ctrl+Shift+P etc. The functions aren't even rebound to anything else, they're just not available via hotkeys.

You can also use "chromium --app $url" and you'll have these key bindings available. If you want to use github isolated from your browser history, you can use it like so:

[$] chromium --user-data-dir=$HOME/github_or_whatever --app="https://github.com/orga/repo" --new-window;

edit: If you use MacOS or Windows, my browser wrapper script from another project might give you some hints on how to use Safari or Edge this way [1].

[1] https://github.com/tholian-network/stealth/blob/X0/browser/b...

Re:Web-based editor by eugene0 on Friday September 03, 2021 @11:16AM (#28405328)
> - When reviewing PRs and wanting to check out some surrounding code that is not part of the actual PR.

It's interesting to see how suitable is the IDE for code review for different people. For me, it's usually pretty much overload, since it's focused on writing, not reading. But GitHub is really doing a great job of eliminating the necessity of cloning the branch for the review.

I'm doing a few experiments in this area on a tool called Viezly (example: https://viezly.com/change_requests/3986). Its focus is on dependency and navigation. So it's a light version of IDE-in-the-cloud for these cases of code review.

Re:Web-based editor by aurbano on Friday September 03, 2021 @11:23AM (#28405432)
That's a really neat way of visualising changed files!
Re:Web-based editor by Godel_unicode on Friday September 03, 2021 @10:08AM (#28404419)
> Some of the most used VSCode hotkeys are browser hotkeys

This kills me with Jupyter. Open bash kernel, make typo, Ctrl+w, sigh as tab disappears. I often open and pin several empty tabs so it only kills the tab, not the whole window.

Re:Web-based editor by bewuethr on Friday September 03, 2021 @02:04PM (#28407362)
I suffered from the same until I discovered Gnome tweaks' "Emacs input" setting, which makes every text field behave like a Bash readline prompt with emacs keybindings!
Re:Web-based editor by brundolf on Friday September 03, 2021 @11:39AM (#28405615)
You can use Ctrl/Cmd + Shift + T to re-open the last closed tab (assuming your actual changes are saved elsewhere; I haven't really used Jupyter)
Re:Web-based editor by ajyotirmay on Sunday September 05, 2021 @07:40AM (#28423523)
Firefox has a config option to not close window with lasttab. I actually find it quite useful. If you're on Chromium based browser, pretty sure there will be something similar
Re:Web-based editor by stophecom on Friday September 03, 2021 @11:28AM (#28405500)
> If you want to quickly commit something really small and trivial in master/a branch/a PR without having to do the whole stash/checkout/pull/change/commit/push rigmarole (like if you're in the middle of doing something else).

Agree, except code formatting (e.g. w/ Prettier) is missing - which would make it extremely helpful to do small PRs.

Re:Web-based editor by lucis on Friday September 03, 2021 @09:08AM (#28403654)
I was showing my friends just yesterday how amazed I was for Command + P working as an app shortcut on github.dev. Did you try this recently?
Re:Web-based editor by moogly on Friday September 03, 2021 @10:22AM (#28404594)
Thanks! It didn't use to work so I haven't tried it in a while (Firefox).

Now I just have to change the other bindings (and relearn).

Re:Web-based editor by rattray on Friday September 03, 2021 @09:48AM (#28404192)
What's this?
Re:Web-based editor by lucis on Friday September 03, 2021 @10:00AM (#28404334)
I've just tested with Safari on MacOS.

1. Go to any Github repo 2. Press . 3. Wait for the editor to load... 4. Press Ctrl/Command + P 5. It opens VSCode's "Go to File" prompt

Re:Web-based editor by rattray on Friday September 03, 2021 @10:38AM (#28404775)
Nice! Works for me too on Chrome on MacOS.

Too bad cmd+w, ctrl+tab, and ctrl+shift-tab doesn't close an editor tab / switch editor tabs… and if you hover on the close icon, it just tells you to use cmd+w instead of something else.

Re:Web-based editor by alex_smart on Saturday September 04, 2021 @06:33AM (#28413821)
For me those work as expected when I have the tab as full-screen.

Considering that there was obviously going to be a keyboard-clash, their approach seems to be very pragmatic.

Re:Web-based editor by losvedir on Friday September 03, 2021 @11:07AM (#28405187)
Is this basically the same as hitting just plain "t" on a github.com repo? (Fuzzy file listing/search).
Re:Web-based editor by alex_smart on Saturday September 04, 2021 @08:03AM (#28414317)
>Some of the most used VSCode hotkeys are browser hotkeys, like Ctrl+T, Ctrl+P, Ctrl+Shift+P etc.

All of this works for me when I am in full-screen mode.