Improved tab support in dingus#293
Conversation
toptensoftware
commented
Oct 3, 2024
- changed tab size to 4
- support for typing tab key + block indent/unindent.
- changed tab size to 4 - support for typing tab key + block indent/unindent.
|
This is a fairly complex change. (Certainly the 4-space tab indent is a good idea.) Can you explain what the "block indent/unindent" code does, exactly? |
|
Hi @jgm , I made these changes because I was playing with the demo, trying to understand how tabs work but couldn't actually type a tab key and had to copy/paste one. In addition to letting you type a tab character it also supports:
You can try it here if you like. The code is an almost exact copy from here. I wrote this in 2017, it's been pretty well received on stackoverflow with no issues reported. I've recently tested it on Chrome (Windows, Ubuntu, macOS), Edge (Windows), Firefox (Windows+macOS+Ubuntu), Opera (macOS+Ubuntu), Safari (macOS and iOS with physical keyboard). Not sure about Android or other browsers. fwiw: if you'd prefer something simpler, see the other answers on the same stackoverflow post but they only support inserting a tab character. Brad |