Live data from Hacker News

tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

julianlam.github.com

21–30 of 34 posts

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#21
post #9

Earlier quoted context omitted.

Windows/Emacs user here. What does these shortcuts do ?

If you have a block of code/text selected, Cmd+[ and Cmd+] shift the entire textblock one tabindent to the left or right, maintaining the relative indent level of each individual line.

Is it different from ctrl+tab / ctrl+shift+tab ? Because these shortcuts works in this editor ("Multi-line highlighted text is also tab-able, and shift-tab removes a tab character instead").

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#23

Very cool. Now somebody just needs to pack this into a Chrome extension so that all text areas do this.

Done! Well, I hope it's done - I haven't made a chrome extension before. Let me know if it breaks... https://github.com/Ilink/tabIndent.js Cloned the project, should be available in the "extension/chrome" directory.

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#25
post #3

I don't see a license specified anywhere. What is it released under?

I posted an issue re. the license type on the library's github page, the author replied with MIT License. Updated the post as well: http://functionn.blogspot.com/2012/11/tabindentjs-javascript...

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#26
Hi everybody, this is Julian, the author of the project. I had no idea a small weekend project like this would be so widely accepted! Thank you all for your comments -- I'll be keeping track of them, and implementing features based on demand.

Follow the development on the issue tracker: https://github.com/julianlam/tabIndent.js/issues

Thanks again!

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#28
post #2

Via Functionn - Open Source Resources For Web Developers & Designers: http://functionn.blogspot.com/2012/11/tabindentjs-javascript... P.S. Functionn contains a whole lot more of awesome resouces like tabIndent.js. There only a fraction of them I can post here at a time. Take a look if you're interested, and subscribe: http://functionn.blogspot.com

Thanks again for the shoutout, Hirvesh :)

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#29

Awesome. One could make a useful bookmarklet out of this. I'm worried about accessibility. Most of the time tabs are used to navigate between fields, so it'd be cool if this was "opt-in", eg entering the textarea would render an icon to click that enabled this feature. Or at least some way to tell the user that pressing the ESCAPE key is how you should tab-out of the field.

Hi dergachev -- a helpful Reddit user (where I posted the project originally) went ahead and did this: http://www.reddit.com/r/javascript/comments/13tfpf/burned_th...

Re: tabIndent.js - A JavaScript Library For Tab-Enabled TextAreas

#30
post #5

It's rather unfortunate that tab is also used for keyboard navigation between fields, since this would be the default behavior of text areas I would like.

Indeed. Many of the commenters have suggested alternatives, such as using Ctrl-[ and Ctrl-] instead, but the best by far that I've seen would be also binding a listener to the "escape" key, so that tab functionality is restored.

I believe I'll probably end up doing that, unless somebody else does it before I do.

Post reply on HN