atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.82k stars 410 forks source link

set-url should tab-complete #1048

Closed spiderbit closed 1 year ago

spiderbit commented 3 years ago

if I narrow with set-url down to 1 url or I want the 1. url the only way to get there is by using the arrow keys, but it's extremely painful to use those, because they are not on the how row.

tab starts then a search engine selection? Seems strange to me, vimb would tab complete to a history item and firefox just goes down history like cursor down each tab. I could probably bind arrow keys on jkli to work around that issue but it seems really odd. Another alternative would be to either start with space to only choose from history and limit it from there or use 1 2 3 4 to select the first history items?

aartaka commented 3 years ago

There are several things you touch upon:

EDIT: Small typos.

Ambrevar commented 3 years ago

The minibuffer overhaul (#777) will add VI binding support to the minibuffer (you'll be able to navigate with M- for instance).

It will also fix the search engine issue by having multiple sources (like Emacs Helm or Qutebrowser when opening URLs).

spiderbit commented 3 years ago

Yes with multiple search engine you would type

g test

or something and it would search with google "test" and without it you could enter to go to the first link in the history... that would be better but probably not good enough because you can't get where you want always on the first place. I think besides some magic a set-url-from-history that not have the search feature would help, if you have the lazy search from switch-to-buffer?

jkli is not that bad btw if you have a command mode, but I guess I use my emacs based modal mode and send in command mode arrow keys with that keys... I am not a vim nor a emacs vanilla key guy I use xah-fly-keys there jkli is the arrow keys in command mode :)

I mean I fight on multiple fronts with nyxt, seems to not support fractural scaling at least under X, I think the version in guix crashes on my netbook, which is a newer version than the one here on nixos, but I have to fix the set-url thing somehow otherwise it's practically unusable. Also still fight with the general configuration, it does currently to much, exwm manage my buffers don't need a buffer manager in the browser or it's bad to have that for me :P but yes the set-url is currently the biggest prob right now.

jmercouris commented 3 years ago

I mean I fight on multiple fronts with nyxt, seems to not support fractural scaling at least under X, I think the version in guix crashes on my netbook, which is a newer version than the one here on nixos, but I have to fix the set-url thing somehow otherwise it's practically unusable. Also still fight with the general configuration, it does currently to much, exwm manage my buffers don't need a buffer manager in the browser or it's bad to have that for me :P but yes the set-url is currently the biggest prob right now.

Sorry to hear about your problems!

With regards to NixOS, we are trying to update it, but it takes some time. Until then, you can try to manually patch it yourself. For example in my configuration I have something like this:

(pkgs.nyxt.overrideAttrs (drv: {
  src = drv.src.overrideAttrs (drv: {
    src = pkgs.fetchFromGitHub {
      repo = "nyxt";
      owner = "atlas-engineer";
      rev = "commit-hash";
      sha256 = "expectedhash";
      };
      });
      }))

Please note that you'll also need to override the patching that happens to nyxt-ext.asd, since that file no longer exists in our repository (otherwise you will not be able to build your derivation).

As soon as you can build a newer version, and we have the new minibuffer library in place, you will be easily able to utilize the minibuffer as you would expect. :-)

Thanks for sticking it out with us,

-John

Ambrevar commented 3 years ago

Stefan Huchler notifications@github.com writes:

Yes with multiple search engine you would type

g test

or something and it would search with google "test" and without it you could enter to go to the first link in the history...

This is already what we do. Misunderstanding?

that would be better but probably not good enough because you can't get where you want always on the first place.

Where do you want to go? Why can't you get there? Can you provide a precise example with the exact keys you'd press, what you expect and what you get instead?

I think besides some magic a set-url-from-history that not have the search feature would help, if you have the lazy search from switch-to-buffer?

Which lazy search?

jmercouris commented 3 years ago

I believe Stefan is relegated to running an older version of Nyxt.

spiderbit commented 3 years ago

am I, is it fixed in newer? So if I start set-url and type "test" enter instead of going to the first history item that fits most it starts a search on "test" or tries to go to the url "test"... is that changed in newer version, the nixos and guix version should not be that old, but not sure I tested it on the guix machine.

I have to press arrow down to get to the history items which is not a nice button to reach and press, also as bonus point I could press tab multiple times to go down the choices like arrow down would do.

Ambrevar commented 3 years ago

Both Nix and Guix have a newer version and it should fix this odd behaviour indeed ;)

spiderbit commented 3 years ago

@Ambrevar just tested it under guix with nyxt version2 pre release 4 and when I type in a part of a history url it search it with my search engine instead of going to the first history item I have to manually press the arrow-down key to get to the history, so we either misunderstanding each other or the problem is still there. (or both :D)

Ambrevar commented 3 years ago

Yes, this is the intended behaviour.

Can you provide a precise description of what you'd like to have? Please provide the exact input that you write, what you'd expect and what you actually get.

spiderbit commented 3 years ago

Ctrl + space set-url heise Expected: opening https://heise.de what I get: duckduckgo search of "heise" (not some magic url guessing but heise.de is in my history)

jmercouris commented 3 years ago

What you would have to do is scroll down, and then "tab" to populate the URL with that as the first suggestion is always the raw user input. You could modify the behavior of the minibuffer to support what you want, let's get back to this when we merge in the new minibuffer library.

spiderbit commented 3 years ago

Tab would be fine but scroll down (arrow down) sucks :) but well is the new library ready for 2.0 stable?

jmercouris commented 3 years ago

No, not yet... we are working on it! :-)

spiderbit commented 3 years ago

Maybe I find the time to become more confident in scheme am a elisp kiddy but have also in guix a prob scheme would be good and nobody fixes that for me if not me (loading hwdb for custom keyboard mapping), I just have always 10 things I want to do at the same time, I think when I tried the password filling is also not working yet with pass correctly (or is it nixos) and fractural scaling for X would also be important for me.

That said I am impressed how far you came in such short time, wouldn't expect that, qutebrowser or vimb are much older and are behind in some aspects already... that is impressive they are 6 and 8 years old, nyxt only 3 years?

jmercouris commented 3 years ago

Thanks for the kind words! We are trying to make something really special here :-). Nyxt is approximately 2 years old. Three if you count the time I spent writing Lisp compilers :-D

Ambrevar commented 3 years ago

Stefan Huchler notifications@github.com writes:

Ctrl + space set-url heise Expected: opening https://heise.de what I get: duckduckgo search of "heise"

This is the behaviour is all browser I believe. How could the browser guess you want to go to https://heise.de and not ftp://heise.org?

spiderbit commented 3 years ago

@Ambrevar no it's not in qutebrowser it's like I describe, it's not a hostname completion it just searches the history, so if I never gone to ftp://heise.org it does not go there, and I think it's sorted by date, so the last heise url I went comes as 1. place in the history, basically set-url does that already it just needs you to press cursor down once to get where I want it to be without pressing that button. Ideally it probably weights the base-url higher than a sub-url because most of the time you don't want to go to that sub url and if you want go there you would space next-search term to become more specific... so you search 2 words in the url then to filter it further down.

Ambrevar commented 3 years ago

Understood. With the new minibuffer library you'll be able to configure your "minibuffer sources", e.g. tell whether you want to accept non-matching input or not. This should fix your issue.

Ambrevar commented 3 years ago

1331 should address most of the issues mentioned in this thread.

As for the original post concern that TAB should expand to the history first match, the equivalent of this in Nyxt is M-] (can be rebound).

Alternatively, it's trivial to create a command that puts the history source first.

Finally, we are going to have a meta-prompt-buffer which will let the user select any source and then prompt the user on these.

aartaka commented 2 years ago

So, should we close it now that it's configurable?

Ambrevar commented 2 years ago

@spiderbit Does this solution satisfy your requirements?

aartaka commented 1 year ago

Closing as stale.

spiderbit commented 1 year ago

Not really but the browser has to much problems for me right now anyway.

jmercouris commented 1 year ago

Sorry to hear that. Perhaps one day it will be good enough! Until then, we keep trying!

aadcg commented 1 year ago

@spiderbit, please consider giving it another try when the new 3.0 version will be released!