Comments (4)
Hi @amay5267!
Although the aabb.cc file was written so that it looks good with indentation 4, it uses tab characters (ASCII 0x09
) instead of space characters (ASCII 0x20
).
Tab characters do not have a specific width. It depends on the text editor to display them as 2, 4, 8, etc. columns wide. Therefore, either the user has to tell the editor which indentation width should be used for tab characters, or the editor has to inspect the source code in order to guess the indentation it was written with.
Currently, Turbo does not allow you specify a width for tab characters (it's always 8), it does not allow you to indent text with tab characters (the Tab
key always inserts spaces, with indentation 4), and it is unable to auto-detect indentation width. Furthermore, when you select text already indented with tab characters (such as in aabb.cc) and press Tab
or Shift+Tab
(in order to indent or unindent the selection), these tabs are replaced with spaces.
These are the things an ideal text editor would do but Turbo doesn't. Therefore, all problems related to tabs vs. spaces should be gone after implementing these missing features, but I can't promise anything with regards to this.
However, you mention Turbo converting tab characters into spaces when saving. This is not the behaviour I would expect, and it is not the behaviour I see in current master (05e6014). Thus, I ask you:
- Please make sure you are using current master (05e6014) and not an older version of Turbo.
- If you still experience the issue you described, please share a screen recording showing it.
Cheers.
from turbo.
Hi @magiblot
OK. If you open my aabb.cc sample you will see tabs represented by Right-Pointing Double Angle Quotation Mark.
Unicode Character “»” (U+00BB).
I think it is kind of annoying. No one needs that. How can I disable seeing this » ?
from turbo.
Hi @amay5267.
That symbol is there so that you can easily distinguish between spaces and tabs, and there are several other text editors which also have this feature (Kate, Midnight Commander, Tilde...).
I think this is especially relevant in Turbo since it currently doesn't support indenting text with anything other than spaces. Therefore, as I see it, it would be frustrating to mix spaces and tabs and not being able to see where tabs are. That's why this is the default.
But I absolutely agree that this behaviour should be customizable. However, customization is also not yet supported. Therefore, all you can do at the moment is to edit line 41 of source/turbo-core/tscintilla.cc like this:
- reprs.SetRepresentation("\t", "» ");
+ reprs.SetRepresentation("\t", "");
from turbo.
Thanks for the hint. Perfect!
from turbo.
Related Issues (20)
- System clipboard integration HOT 2
- icon HOT 6
- Feature Request: Load a specific directory tree in the document tree. HOT 2
- Scrolling down using mouse wheel problem HOT 2
- install TARGETS given target "fmt" which does not exist. HOT 1
- Feature request: highlighting for text files
- consider switching from Alt-X to Ctrl-X as exit hotkey HOT 7
- Make the first release. HOT 2
- segfault HOT 2
- Can't change tab size. HOT 4
- Run on docker HOT 2
- macOS PowerPC: all tests pass, but in terminal no output upon launching the app HOT 36
- Store and load settings HOT 1
- Line numbers / OCD issue HOT 1
- [Feature request] LSP support? HOT 1
- artifacts during window resize HOT 4
- [Feature request] Remember last state for visibility of "Open Editors" and "Show line numbers". HOT 3
- Turbo removes trailing spaces on save HOT 4
- Binaries in action artifacts expiring HOT 1
- use `text-editor` as a topic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo.