Skip to content

nickgravgaard/ElasticTabstopsForScintilla

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Elastic tabstops for Scintilla

This is an implementation of elastic tabstops for Scintilla. It was originally based on a port by David Kinder of my old Gedit implementation.

The work consisted of 2 main parts:

  • extending Scintilla's API to support explicit tabstop positions
  • implementing elastic tabstops using the extended API

Extending Scintilla's API to support explicit tabstop positions

In August 2014, code from this repo was added to Scintilla's main branch (see this commit) and released as part of version 3.5.0. This makes it possible to set explicit tabstop positions in Scintilla (using SCI_CLEARTABSTOPS, SCI_ADDTABSTOP, and SCI_GETNEXTTABSTOP as documented here), which is a prerequisite for implementing elastic tabstops.

Implementing elastic tabstops using the extended API

Most of the interesting code is in ElasticTabstops.cpp. Currently this is not a very efficient implementation as it rescans the entire buffer every time a change is made, rather than caching everything and only rescanning the parts that have changed. Unless performance is not an issue, those wishing to reimplement elastic tabstops should find a way to cache cell widths per line. For a discussion about possible ways to do this in Scintilla see here.

Visit http://nickgravgaard.com/elastic-tabstops/ for more information.

About

An implementation of elastic tabstops for Scintilla

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published