Sometimes I need to move an url from an app to a browser. I select the url, say in gvim, and make Firefox window active. Then I see that I should clear address bar before pasting the new url, which requires selecting existing url, which wipes the new url from PRIMARY clipboard out.
What is the best way to put the new url from PRIMARY clipboard to address bar? Is there a shortcut to clear address bar and then to move focus there?
ps I know I can use Ctrl-C to put the new url to CLIPBOARD clipboard, but I prefer to use PRIMARY clipboard.
Ctrl + L selects the Location Bar, giving it focus and highlights whatever is in the field. Simply use that keyboard shortcut just after giving the Firefox window focus but before you paste your intended target URL.
Just use Xclear add-on.
Clear url and search field easily https://addons.mozilla.org/en-US/firefox/addon/xclear/
As per my tests Alt+A is not working as intented but Ctrl+A definitely works, since "Xclear" or "Clear fields" extensions are not working anymore with Firefox 60 or later.
The diference between Ctrl+A and Alt+A is that the later puts the selection into PRIMARY buffer (overwriting your selection) while Ctrl+A does not, so you can select a text in any application, Ctrl+A to highlight any text field (not only the address bar), press Del to delete it and then paste your previous selection with middle mouse button.
Activate the address field if necessary with a click, Select the url with Alt-A, clear the url with Del, and paste the new url with middle mouse button click.
It is Ctrl + K to select the additional address bar search box (and highlight without over-riding the Primary clipboard).
I have made a userChromeJS script which will add clear buttons to the urlbar and findbar.