akahuku / wasavi

wasavi is an extension for Chrome, Firefox, and Opera. wasavi changes a textarea element to virtual vi editor which supports almost all the vi/ex commands.
http://appsweets.net/wasavi/
Other
1.5k stars 67 forks source link

Support per-website/element writeas settings #156

Open stephenh opened 7 years ago

stephenh commented 7 years ago

I was following the thread about using wasavi in gmail, and that using writeas=textAndBreak will make it work. That seems to work really well and is great.

I've put writeas=textAndBreak into my exrc, but I'm anticipating that certain websites will need certain writeas...e.g. gmail may want textAndBreak, but github may work better with html, etc.

akahuku commented 7 years ago

I think this is a very important issue, so I'd like to change writeas as follows:

writeas will be set in your exrc as follows:

set writeas='{ \
  /* Give a site a simple writeas value */ \
  "http://example.com/*": "text", \
  /* Give the site an array of CSS selector and writeas pair */ \
  "http://exmaple.net/*": [ \
    { \
      "selector": "#element-id", \
      "writeas": "textAndBreak" \
    } \
  } \
}'