this post was submitted on 06 Oct 2024
17 points (90.5% liked)

Firefox

4167 readers
116 users here now

A community for discussion about Mozilla Firefox.

founded 1 year ago
MODERATORS
 

Vim's modal editing system is very efficient for manipulating text with little keystrokes. Let's say I had a list of URLs like the ones below, representing tabs. I could have the list as a text file, navigate them with arrow keys to move a text cursor, press enter or another key to focus on the tab under the cursor, d to cut a link (like cutting a file in a file explorer, or like how d deletes or cuts text in Vim), and p to put it in another position where the cursor is. I could select multiple lines to do d or p, or press y to yank (copy) them to my clipboard.

startpage.com
reddit.com/r/firefox
lemmy.ml/c/firefox

Oil.nvim seems to be a good point of reference for this. Its a Neovim plugin that acts as a file explorer, where all the files are text listed in a vim buffer, and you can do d y or p. I did a bunch of searches to see if Vimium Tridactyl or Surfing Keys can do this and nothing showed up. If they can, then an explanation would be helpful.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] tal 2 points 1 month ago* (last edited 1 month ago) (1 children)

I'm an emacs person, so I don't have a good frame of reference for what you want, but does Vimium C do what you want?

https://github.com/gdh1995/vimium-c

EDIT: Or the original Vimium, not familiar with the differences:

https://github.com/philc/vimium

[โ€“] tal 1 points 1 month ago

One other potential: it looks like these days -- I seem to vaguely recall a bookmarks.txt years back -- Firefox stores bookmarks in an sqlite database in your profile directory, "places.sqlite".

It also looks like people have constructed scripts to convert an SQL table to text, edit it in vim, and then reconstruct the table:

https://github.com/BnMcGn/vibase

You might be able to just use something like that to edit the database directly.

That being said, it might be okay if you need one major piece of work offline, but it looks like Firefox establishes an exclusive lock on places.sqlite when it's running, so unless offline editing is sufficient or there's a way to request that Firefox not use exclusive access, I don't know if this would work for you.