Vim-like keyboard interface
-
I would like to see something like "normal" and "input" keyboard modes like in Vi/Vim. It would be extremely useful to have unified keyboard interface between Vivaldi and vim so, for example movement keys (h,j,k,l) would be the same in Vivaldi and then you could press "y" to copy text form some DOM object and such. Also typing "i" for mode change in input fields is small trade off for unified interface mark feature would also enhance experience greatly as would "gg" and "G" commands i know that not everyone is using Vim but i have found myself typing "gg" so many time and trying to "scroll" with "j", "k" that i had to make this proposition
-
vimium kinda does that, but it doesn't work very well with Vivaldi right now. Many shortcuts interfere with the built in ones. but the f and F shortcuts of vimium are way more powerful than the WASD spatial navigation IMO.
having the option to get vim like behavior in the mail compose window, that would be kicka**
-
Thank you buenchaval for vimium tip i had no idea that it exists!
in notes or mail compose window vim like behavior would be nice -
I've been using vimium for a while now and I'm very satisfied with it, but as Vivaldi is adding customizable keyboard navigation as a feature anyway, it might be nice to extend that to allow the features currently offered by the vimium extension.
-
Also it would be nice to be able to go in "source-edit" mode and back via keyboard
sou you can edit source in place and render it without sending another server request, for web development that would be fast and very useful. -
+1 for vim keybindings (but please make them user configurable!)
-
Really need it. It will be a killer feature (at least for me).
Other Chromium-based browser have Vimium and other similar extensions, but... let's compare it to, for example, VimFx for Firefox.- Vimium is not able to work on protected pages like browser settings pages, chrome-extension, chrome webstore, view-source and other. VimFx works everywhere.
- Vimium is not able to focus on omnibar, and implements its custom (not ideal, has limitations) address box. VimFx just uses native browser address bar, and everything works fine. So when using Vimium i have to use either limited custom address bar or inconvenient native one.
- Vimium is not able to manage browser UI elements while VimFx allows to click browser elements (tabs, extension icons, even browser window close-minimize-expand buttons). It is because Firefox UI is based on XUL -- a markup language. Vivaldi UI is based on HTML -- a markup language too. You have all the possibilities to implement this behavior.
So Vivaldi has a chance to really become "a hacker browser" instead of laggy Firefox and i-know-better-what-you-want Chrome.
-
This one is worth checking out - a while since I've used it (no more FFox for me) but in those days I compared all similar addons and Vimperator was the absolute top:
https://addons.mozilla.org/en-US/firefox/addon/vimperator/ -
Perhaps the easiest for developers to start with would be adding the keyboard shortcut commands "Navigation Up", "Navigation Down", "Navigation Left", and "Navigation Right", which scroll the page from the keyboard (like the arrow keys).
If you want vimium bindings, a lot of the commands are already built into Vivaldi and available for mappping. In the vimium options I've unmapped all of these and set their default command using Vivaldi instead (so it even works on PDF tabs and other protected pages). The only major ones missing for me are
h
j
k
l
for scrolling,f
for link navigation, and a way to dog
g
(pressg
twice) to scroll page to top.#Vimium mappings replaced by native Vivaldi mappings: #open new tab unmap t #go back/forward in history unmap H unmap L #go one tab left/right unmap J unmap K #close tab, restore tab unmap x unmap X #refresh page, pin tab unmap r unmap <a-p> #scroll page to bottom unmap G #find, next/previous results unmap / unmap n unmap N #insert mode (disable/enable keyboard shortcuts) unmap i #paste and go unmap p #Vivaldi has shortcut section for these commands, but doesn't support two-part mnemonic shortcuts: #scroll to top/bottom of page # unmap gg map <c-]> passNextKey
-
@kuna-prime It would be neat to have a global "normal mode" triggered by the Escape key. I often find myself attempting to Escape out of an input box only to be met by more commentary/options. This makes even implementing the keybindings manually difficult because you never know when you might be inside a textbox.
-
Just noticed that Vivaldi now has
Page Up
andPage Down
keyboard shortcuts available, and this does work on protected system pages like chrome extension webstore, View page source, vivaldi://sync-internals, and others. However it still doesn't work in the tab PDF viewer, which is a little strange to me since I remapped/
to open "Find", and that does work in the PDF tab viewer.This is kinda what I was hoping for, although I was hoping for shortcuts for left/right shortcuts as well, and for shortcuts causing scrolling behavior rather than full-page-move behavior (like from arrow keys rather than PgUp/PgDn keys).
-
Also, this thread should probably be moved to the forum section Feature Requests for Desktop and get the tags
SHORTCUTS
andNAVIGATION
. Presumably mods can do that, if they so have the desire? Only realized this after I happened across the related thread Enable Custom Key Navigation for Quick Command Menu, which is a different forum section (my guess is Feature Requests for Desktop didn't exist when this feature request originally arose). -
@ukanuk Maybe we should start by making a list of changes and features needed to make an extension like Vimium superfluous. Vivaldi has more than hinted at the desire to make the browser working with keyboard alone, for the greater part because of reasons of accessibility for everyone. Sadly spatial navigation never worked well and is the wrong approach. Moreover accessing the UI could be greatly improved too.
-
@luetage At the time when the Vivaldi spatnav was broken I went looking for alternatives. I found of course Vimium and its clones, but they are too heavy and complex with a massive learning curve for me.
I found this though:
https://chrome.google.com/webstore/detail/spatial-navigation/gogippjaikoijhcdcioeajgpmlmchkbaIt's got basic navigation as well as single-key link targets (cycled). I changed the code a bit to allow for WASD and F for following links, and support for Ctrl/Shift-keys:
https://pastebin.com/igYwrvWCProblem is, the extension is dead and might stop working at any time, last updated in 2015. It seriously needs a new developer.
If Vivaldi could implement something similar it would certainly do it for me. Obviously they'd allow us to change the keys so the masochists who prefer HJKL would also be satisfied
-
@Pathduck Thatās 2 pair of shoes. While spatial navigation selects elements, the vim like extensions all scroll, which is far more natural and works independently from page layout. Thatās also why I think spatial navigation is the wrong approach. I tested the extension you linked and it certainly works better than Vivaldiās feature, that doesnāt change my opinion about the matter though. Itās both more invasive and unreliable (and slower too).
-
@luetage said in Vim-like keyboard interface:
@ukanuk Maybe we should start by making a list of changes and features needed to make an extension like Vimium superfluous. Vivaldi has more than hinted at the desire to make the browser working with keyboard alone, for the greater part because of reasons of accessibility for everyone. Sadly spatial navigation never worked well and is the wrong approach. Moreover accessing the UI could be greatly improved too.
I am glad that spatial navigation is back, I have always used it in combination with Vimium, of course it is not the perfect solution, but I doubt that out there we have a solution which would make everyone happy. On the Vivaldi desktop side one thing I am missing is the possibility to access synced tabs via keyboard (and it should work like the Firefox synced tab button which syncs your devices every time you hit it).
Probably a list is a good idea -
@Pathduck said in Vim-like keyboard interface:
I changed the code a bit to allow for WASD and F for following links, and support for Ctrl/Shift-keys:
You're concerned about the learning curve of Vimium and I can totally understand that. That's why I wish all these keyboard shortcuts were available to map in Vivaldi's interface.
For now, I would still recommend you switch to Vimium as it allows you to disable all hotkeys and then add in only the ones you care about. After installation, go to vivaldi://extensions ā Vimium ā Details ā Extension Options, and then add this text in Custom key mappings for just plain WASD navigation with f/F for following links in current/new tab.
unmapAll map w scrollUp map a scrollLeft map s scrollDown map d scrollRight map f LinkHints.activateMode map F LinkHints.activateModeToOpenInNewTab
Further documentation is at https://github.com/philc/vimium/blob/master/README.md
-
@luetage said in Vim-like keyboard interface:
@ukanuk Maybe we should start by making a list of changes and features needed to make an extension like Vimium superfluous.
I already said this in paragraph form, but you're right a list is probably clearer. Here are the keyboard shortcuts and features for which I use Vimium, which cannot currently be added in vanilla Vivaldi and as an extension cannot work on protected pages like PDFs, browser settings pages, chrome-extension, chrome webstore, view-source, and so on:
Keyboard shortcuts:
- Scrolling
h
scroll left (just like left-arrow)j
scroll down (just like down-arrow)k
scroll up (just like up-arrow)l
scroll right (just like right-arrow)- Navigating Quick Commands results should also be possible with
jk
rather than arrow keys, see existing feature request Enable Custom Key Navigation for Quick Command Menu
y
to copy selection to clipboardP
to Paste and Go in a New Tab, see existing feature request Shortcut to Paste and Go in a New Tabgg
(pressg
two times in a row) scroll page to top.- Vivaldi allows shortcuts for this command, but does not support mnemonic shortcuts aka shortcuts with modifier keys. See existing feature request Mnemonic Shortcuts
gs
(pressg
ands
one after the other, not simultaneously) view page source.- Vivaldi allows shortcuts for this command, but does not support mnemonic shortcuts aka shortcuts with modifier keys as noted above.
yy
(pressy
two times in a row) copy current URL to the clipboard.- This needs the mnemonic shortcuts feature request as previously noted, and probably also feature request Concatenate Commands as this could be accomplished by sequentially commanding the existing shortcuts Focus Address Field then Copy then Focus Page.
Ctrl
+]
to execute a new command named One-Time Disable Keyboard Shortcuts or maybe more simply Ignore Next Keyboard Shortcut. This would be available right next to the existing Disable Keyboard Shortcuts command, and is useful for pages which might have predefined single-key shortcuts which might interfere with a Vivaldi single-key shortcut. For example YouTube programsf
to enter fullscreen.
General Features (self-explanatory):
n
/N
to command Find Next in Page or Find Previous in Page without needingEsc
, see existing feature request Find Next/Previous Without Showing Toolbar- Option to scroll continuously until key-up event when pressing and holding arrow/
hjkl
. Currently, pressing and holding the key triggers a small scroll, then there's a small delay until the keyārepeat event comes from the operating system for the scrolling to continue. - Site-specific settings for keyboard shortcuts, either to use only Vivaldi's hotkeys and disable hotkeys from that site, or instead to use only site's hotkeys and disable Vivaldi's keyboard shortcuts (on that site only). See existing feature requests option to disable keyboard shortcut per webpage and also Ctrl+Tab doesn't work.
- Custom scroll step size (used by
hjkl
and arrow keys). Vimium allows setting scroll step to any number of pixels. See these existing feature requests which desire setting scroll steps to any number of lines. Maybe both methods could be supported if the Vivaldi setting included units? So that would be60px
for an absolute scroll step, or2em
for a number-of-lines style scroll step. - Quick Commands / Address field keywords to search just history, or just bookmarks, etc., see existing feature requests More "internal" search engines and also Nicknamed search engines for Vivaldi features (browser history, open tabs, etc)
Advanced Features (generally requires some training, e.g. familiarity with vim and/or vimium):
f
for direct link targets in current tab (instead of spatial navigation)F
for direct link targets in new tab (instead of spatial navigation)- Keyboard-only method of selecting page text, see https://github.com/philc/vimium/wiki/Visual-Mode
- Keyboard navigation for UI, e.g. do scrolling/editing/deleting in bookmarks pane/tab, creating/editing notes, navigating within Web Panels, using the extension buttons to the right of the address bar, managing settings, etc.
gi
(pressg
andi
one after the other, not simultaneously) to Focus the first text input on the page. Useful for pages like youtube.com which do not automatically focus an input fields when first loading. Obviously other combinations of keyboard shortcuts can be used, but a dedicated keyboard shortcut is faster.- Local marks / bookmarks, allowing one to quickly save scroll position and jump between parts of a long webpage/PDF. Itās basically a more useful tabscroll.
- Scrolling
-
Here's a list of all of Vimium's available commands in v1.66, with a keyboard shortcut for the ones I actually have mapped. Note some commands Vimium supports are not currently mapped to any shortcut, like
scrollToBottom
which I've unmapped because I can already put it in Vivaldi instead. -
@ukanuk Ok, thatās perfect, IĀ think you just volunteered to keep an updated list ^^
Some additions:
-
While arrow keys already work for scrolling, they only start scrolling after a delay, which is unacceptable for day to day use. I think setting the scroll by pixel is fineāVimiumās scroll works well enough, therefore I think it shouldnāt matter much, if itās pixel or lines, it just needs to be smooth.
-
The vomnibar can be fully substituted by Vivaldiās own excellent quick commands, but it could need some improvement. We should be able to navigate results with nonāarrow keys. We should have the ability to restrict the search to bookmarks, history, commands, notes and tabs (hope I didnāt forget something). We can already search different search engines with a preceding nickname, it would be really neat, if we had the ability to set additional nicknames for all the possibilities listed.
-
Setting one key shortcuts in Vivaldi makes the Vimium search unusable, since the shortcuts will trigger when you type. Using Vivaldiās search instead is the goal anyway. Currently the problem is that a given search canāt be confirmed by pressing <enter>. This means shortcuts to navigate the results that donāt use a modifier key will make you continue to type in the search field, instead of jumping from result to result.
-
Visual/Caret mode is missing for selecting text. Shortcuts for copying and pasting text canāt be set in Vivaldi. I believe it just uses operating system defaults.
-
Insert mode for ignoring commands.
-
Setting local/global marks isnāt implemented. Would be a nice extra.
-
Shortcut for focusing the first visible text input.
-
Shortcut for passing next key directly to page.
-
Exception list.
-
Some way to disable all shortcuts a site might have set individually? Currently not even possible with Vimium.
Thatās all I can currently come up with concerning the handling of websites, we would need bigger changes yet to navigate the UI in a vim like way.
-