Skip to content

Add TAB character handling - #108

Open
awertnex wants to merge 1 commit into
tsoding:masterfrom
awertnex:master
Open

awertnex wants to merge 1 commit into
tsoding:masterfrom
awertnex:master

Conversation

@awertnex

@awertnex awertnex commented Dec 6, 2026

Copy link
Copy Markdown
  • A TAB character inserts a single character INDENT_WIDTH characters wide, width adjusted based on current cursor column.
  • Add expand-tab option : Insert 4 spaces instead of TAB, also adjusted for cursor column.

Some bugs:

  • Moving up or down lines is misaligned when there's tabs, because the editor reads a tab as a single character.
  • Inserting tabs then inserting expanded tabs in the same line breaks indent alignment, for the same problem as above.

unrelated: Adjust viewport size only when window size changes.

- a TAB character inserts a single character INDENT_WIDTH characters
  wide, width adjusted based on current cursor column.
- add expand-tab option <F4>: insert 4 spaces instead of TAB, also
  adjusted for cursor column.

some bugs:
- moving up or down lines is misaligned when there's tabs, becausee the
  editor reads tabs as a single character.
- inserting tabs then inserting expanded tabs in the same line breaks
  indent alignment, for the same problem as above.
@awertnex awertnex changed the title Add TAB character handling: Add TAB character handling Dec 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant