improve custom configuration #132

hbt opened this Issue Apr 8, 2012 · 5 comments


None yet

2 participants

hbt commented Apr 8, 2012

A few improvements required to the way we handle configurations

Dot files

Bring back the .vromerc dot file but implement it differently


  • user can retrieve remote configuration via options page
  • user can customize config via option page (textarea)


  • what we have now +
  • if server is present
    • -- load .vromerc into textarea for edit (Generated like remote)
    • save content of textarea into .vromerc (Cancelled)
    • automatically sync .vromerc with textarea and vise-versa (Cancelled)
    • display status of server in Options page (green/red button for online/offline) -- Implemented
    • -- indicate that the save was sucessfull + ideally auto-save -- Implemented


  • reading .vromerc + displaying it like remote file using "begin generated Local ..." in textarea

flexible mapping

Make mapping more flexible by allowing users to overwrite all commands and map/unmap at will


  • user can map/unmap/imap/iunmap


  • conflict detection. Display a warning only when a conflict is detected e.g
    • if user has y mapped and adds map yy gf. "Warning: yy is unreachable"
    • if user has y mapped and adds map y cf. "Warning: y is mapped to more than one command. unmap first"
    • Warnings only. No errors.
  • allow user to map keys directly to commands
    • e.g map yy Page.copy Implemented
  • add unmapAll
    • unmaps all commands. Useful when user wants to map a few commands only (Cancelled)

custom JS

Allow user to execute custom JS in both frontend + backend
CustomJS will be executed on every page. It is up to the user to limit the execution per domain name.
This is useful when it comes to modifying the behavior of some command without having to fork the whole project and maintain your own version.


  • using the textarea or dot file. we'll have frontendJS=function(){} and backendJS variables.
    content will be evaluate dynamically via JS


  • using begin_custom_js and end_custom_js, user can define a function named frontendExec and content of function will be executed on every page
  • view example in comments below

Export + Share + Sync

This paragraph is less developed than the rest because I believe we will need a remote server to sync the configurations across multiple computers automatically -- i.e the user doesn't have to commit his config on github


Allow user to export key marks + clipboard content + any saved data.
For example, if a user is on windows and creates a key mark, when switching to ubuntu, keymarks should be synced automatically.


Allow users to share easily their configuration + make it public if desired.


Automatically sync configurations across computers


  • -- update doc about begin_custom_js + frontendExec if approved
  • add loadscript + loadstyle commands
  • move the configuration to the background localstorage so we can sync it easily elsewhere
  • make the configuration lighter. too much JSON in one key takes a lot of time to parse
  • implement the remote syncing + full export
  • investigate


@hbt hbt was assigned Apr 8, 2012
jinzhu commented Apr 8, 2012


For the Dot files

I think we just need to implement the read local config at first. I am not sure how many people would like to edit their config file in the textarea but not in vim.

Maybe we can add a quick link to allow users edit their local config in external editor?

custom JS

Maybe we can check this issue, #121, And extract the common thing.

In my opinion, we implement the domain match event first, and it could be used to run those commands in "Command Line Mode", then write some functions to extend the "Command Line Mode". for example, LoadScript, LoadStyle

Of course, you other ideas are also cool, but maybe the two ticket above could have a higher priority than others? What about your ideas?

Thanks for your list.

hbt commented Apr 8, 2012

dot file

Agreed. We will read it only for now.

What do you think about having a server where we can share our configuration? by server I mean something like

Because if I'm on Ubuntu and I add a "quick mark" then I switch to another computer, I can't access that "quick mark"
I can't edit my config without having to sync manually.

I think configuration + settings + quickmarks etc. should be synced automatically through a server.
We can add a simple checkbox, user allow us to sync their Vrome localstorage on a remote server.

It would be completely optional but it would really help users with multiple computers

@jinzhu what do you think?

custom js

started working on dev/132
For now, custom JS is defined in config file. I agree about LoadScript + LoadStyle commands.

@hbt hbt added a commit that referenced this issue Apr 8, 2012
@hbt hbt -#132 reading local JS + evaluating JS b03bf4a
hbt commented Apr 9, 2012

Example of possible config now

begin_custom_js var remoteExists = typeof frontendExec != "undefined"; if(remoteExists) oldexec = frontendExec; frontendExec = function() { if(remoteExists) oldexec(); with(KeyEvent) { add("tcm", Buffer.deleteMatch); add("tcc", Tab.closeOtherTabs); add("tcq", Tab.closeLeftTabs); add("tce", Tab.closeRightTabs); add("tcp", Tab.closeUnPinnedTabs); add("yy", Tab.copyUrl); add("tw", Tab.closeAndFoucsLeft); } } end_custom_js
@hbt hbt added a commit that referenced this issue Apr 9, 2012
@hbt hbt -#132 adds save visual confirmation 0c9f16c
jinzhu commented Apr 10, 2012

dot file

Yes, it would be cool if we could sync marks, settings between computers, this is also one of the most missed feature for me.

But I am damn busy recently (maybe keeping busying until the end of next week). will check it out later.

custom js

Ok, lets think about LoadScript, LoadStyle later.

Btw, thanks for your changes, looks cool ;)

hbt commented Apr 11, 2012

Excellent. Will keep this ticket open and will come back to it later.

I have other changes I need to make first.

@hbt hbt was assigned Apr 15, 2012
@hbt hbt was assigned Jun 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment