[BRLTTY] Can BRLTTY indicaste indentation?

Nicolas Pitre nico at fluxnic.net
Fri Aug 21 16:04:28 EDT 2020


On Fri, 21 Aug 2020, John J. Boyer wrote:

> Consider the following deeply indented Python statement.
> 					wordType = adverb
> There are five tabs. I would like BRLTTY to replace them with simicolons
> ;;;;;wordType = adverb					

That's something for your favorite text editor to do.

BRLTTY has only access to the screen representation, not the text 
content. It therefore cannot distinguish between 2 tabs and 16 spaces. 


As Dave said, BRLTTY could compress leading spaces but that would not 
work if you use numbered lines in your editor, or if you use vertically 
split windows, etc.

On the other hand, the text editor may do special things such as 
changing the representation of leading tabs into semicolons if that's 
what you want without altering the original text, and that certainly can 
be flipped on and off with a simple key combination. You just need to 
investigate the macro programming language of your editor, or switch to 
an editor that has one. I'm sure both emacs and vim can be made to do 
just that or more.

For example, here's what a quick Google search turned up:

https://vi.stackexchange.com/questions/422/displaying-tabs-as-characters

https://vim.fandom.com/wiki/See_the_tabs_in_your_file


Nicolas


More information about the BRLTTY mailing list