Skip to content

hax/etab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastic Tabstops JavaScript Implementation for Browsers

Usage

var etab = new ElasticTabstops
etab.processLines(document.querySelectorAll('.code-line'))

Examples

Here is the user script for supporting elastic tabstops on github (note currently only tested under tempermonkey). After installing it, you could try some samples in your browser:

TODO

Core

  • try to utilize CSS tab-size
  • indent width (normally wide than tab min width for align)
  • detect tab size of the source
  • extension of alignment:
    • auto aligned[TAB]
    • [SP]right aligned[TAB]
    • left aligned[SP][TAB]
    • [SP]center aligned[SP][TAB]
    • 3.14159 (decimal aligned)[TAB]

Github user script

  • test Firefox (with Geasemonkey)
  • test IE (with ?)
  • add settings button and dialog
  • allow change font, tab width and other configurations
  • support diff view
  • only process the code block that use elastic tabstops

About

Elastic Tabstops for Browsers

Resources

License

Stars

Watchers

Forks

Packages

No packages published