Vimium: [Feature request] Ability to import/export settings

Created on 21 Jan 2015  ·  16Comments  ·  Source: philc/vimium

I know Vimium can sync its settings, but that requires users to login in Chrome, leaving people who don’t do it without a way to easily keep custom configurations. I currently have three text files with my customisations — excluded URLs, CSS for styling, and key mappings, which have to be saved and reapplied manually (plus a few others that rely on checkboxes).

A way to export and import all settings, even if it just means saving everything to a plain accessible file (so at least we could automate moving it to the correct location) would be very welcome.

Most helpful comment

I do care.

All 16 comments

Hi @vitorgalvao. I'm not sure this is above threshold for the necessary extra options-page infrastructure. After all, if someone chooses not to log in to Chrome, there are consequences...

Suggest we let this sit, and see whether further use cases emerge.

After all, if someone chooses not to log in to Chrome, there are consequences...

I have no data on what percentage of Chrome users actually do it, but I’m guessing a good number of technically-inclined users (more likely to look for and use something like Vimium) might not do it due to privacy concerns.

Speaking for my usage exclusively, I’d be happy if there were a single file in the OS’s directory structure where configurations would be read from. Something we could cp and mv at will to achieve the same effect.

For reference, here’s how Vrome does it

I'd like to second this one. I've already been considering unmapping and
rewriting everything into the custom field, but I've actually be having some
trouble getting unmap and map to work on some of the preconfigured keys like t
and T (I want to swap them) and some others like moving i to I (so I can pass
through i to Inbox and Gmail without having to learn extra behaviors).

I swap t and T too...

map t Vomnibar.activateTabSelection
map T createTab

You don't have to "move" i to I, just add an extra mapping...

map I enterInsertMode

(I use a similar trick mapping J and K to scrolling commands so that they are available on GMail and the like too, even while using the page's j and k bindings.)

@smblott-github does mapping J and K affect switching tabs using them then, because I use that pretty heavily in between my vomnibar tab jumping.

+1

I lost all my Vimium settings today. Chrome said the extension is broken and after I clicked "Repair" everything was gone. It took half an hour to configure everything again.

Now I managed to create a backup by doing JSON.stringify(localStorage) on the Vimium options page.

I'm not sure this is above threshold for the necessary extra options-page infrastructure.

Looking at that again, there are already a bunch of options hidden under a Show Advanced Options button, so why would it be an issue to have two buttons on the bottom?
image

I’d understand if you didn’t want to pollute a settings page with too many options, but from the moment some of those are hidden and labeled “advanced”, all bets are off, there.

... I managed to create a backup by doing JSON.stringify(localStorage)...

@fnkr.... Be careful with this. First, localStorage is not the primary storage location for settings. For most users, they're in chrome.storage.sync, and for a (thought to be) very small group of legacy users they're actually in chrome.storage.local. Second, we sometimes make changes to both how and where settings are stored, and implement migration code accordingly. Diddling with settings directly could cause unexpected errors.

If you must access your settings in the way you describe, then the Settings API is safer (since it handles storage and propagation correctly):

Settings.get(key)
Settings.set(key, value)

The keys are here

For the big-ticket settings... keyMappings and searchEngines are just text, so you'd be better off just saving them somewhere. exclusionRules is stored as structured data.

Another example, chromium-vim (does the same as Vrome)

+1
The same "Repair" problem like fnkr happened to me today.

As a small note, I no longer use Vimium. If the others that expressed interest in this also do not care for this anymore, it can be closed.

I do care.

Hello,

At my work I am logged with my job profile and at home I use my own (personnal) profile.
In both cases I would love to be able to sync settings between then with the help of an export / import button.

After all, if someone chooses not to log in to Chrome, there are consequences...

Giving my two cents for this issue:
Of course, it is true, not signing in to Chrome leads to consequences which are, for one, not giving away private data, as some might call those...
With Vimium however, those consequences are not only of a technical nature, since it is being _decided_, for now, to not give the ability to sync Vimium settings w/o Google's sync service. I, for one, see technical matters as matters of freedom, so just choosing Chromium and choosing Vimium should not lead to get stuck with Google's way of doing things.

I think this is something that many of the incoming VimFX users (me included) would want to have. We are used to having it, so it's even more prevalent as a missing feature.

+1. This would also allow users to sync Vimium settings between Chrome and Firefox. Should be relevant now that vimium-ff exists.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaldown picture kaldown  ·  3Comments

finalfantasia picture finalfantasia  ·  3Comments

Poseiden picture Poseiden  ·  3Comments

Semro picture Semro  ·  3Comments

JulianDeal picture JulianDeal  ·  3Comments