evanw/sky

(browser) implement TAB for identation

Closed this issue · 2 comments

TBD commented

problem
using TAB in browser implementation will jump to next HTML element (in our case, the close button in browser tab)

solutions

  1. override browser shortcut
    cons: accessibility problem
  2. use a different shortcut (eg CMD+])
  3. automatic code formatting
    cons: hard to get it right
  4. ???
TBD commented

looks like 908d820 implements solution 1 (override browser shortcut)

evanw commented

Haha I'm definitely not done yet. The way it is right now (1 tab stop == 1 space) is awful. Tab stops are variable-width characters so I thought I'd take the time to implement general support for those along the way. That work hasn't been done yet. I wasn't sure how to respond to this because I ultimately plan to do all three (more shortcuts and auto-indent). I also plan to overload the tab key to trigger word completion when that is implemented, which would be a fourth thing I guess.