Skip to content

Settings, tab ruler, asm tab stops, keyboard shortcuts, Shift-Alt-f reformatting #229#251

Open
fredsa wants to merge 41 commits intosehugg:masterfrom
fredsa:asmformat
Open

Settings, tab ruler, asm tab stops, keyboard shortcuts, Shift-Alt-f reformatting #229#251
fredsa wants to merge 41 commits intosehugg:masterfrom
fredsa:asmformat

Conversation

@fredsa
Copy link
Copy Markdown
Contributor

@fredsa fredsa commented Apr 5, 2026

  • Add keyboard shortcuts help menu
  • Add tab stop ruler
  • Shift-Alt-F to reformat/reindent asm and C-like source
  • Additional settings
  • Dynamic info gutter display on resize
  • Remove ctrl/cmd-shift-i key bindings
  • Improved handling in asm for Enter, Backspace, Tab
  • Fix replaceTextRange selection
  • Remove unused highlightSearch in ui.ts
  • mbo theme syntax highlighting and whitespace
  • Improve 6502/Z80 parsing, syntax highlighting
  • Add 6809 opcodes (for asm formatting)
  • Map xasm6809 to 6809 instead of z80
  • Add 6502/Z80 (commented out) "kitchen sink" samples
  • Press Enter in settings dialog to save and apply

fredsa added 11 commits March 29, 2026 14:03
- c64/kitchensink.dasm and includes
- zx/kitchensink.zmac and includes
- Update mbo theme after 6502/Z80 parser updates
- Reduce whitespace indicator opacity
Map backspace key to delete selection or
single character, instead of consuming all
whitespace to previous tab stop.
Match previous lines' whitespace
Rely instead on indentSelection mapping from
defaultKeymap / standardKeymap.
@fredsa fredsa mentioned this pull request Apr 5, 2026
@fredsa fredsa changed the title Settings, tab ruler, asm tab stops, Shift-Alt-f reformatting, keyboard shortcuts Settings, tab ruler, asm tab stops, keyboard shortcuts, Shift-Alt-f reformatting #229 Apr 5, 2026
fredsa added 14 commits April 5, 2026 18:44
Move gutter line info into extension/compartment,
dynamically determine whether to show info gutters
as window is resized.
Detect opcode, operand, and comment column positions
Export getModeForPath to support file formatting.
Export isAsmMode to support file formatting.
Limit effects of verilog files containing __asm
and __endasm markers to showing gutter info,
no longer change Shift-Alt-F and Enter
behavior for the entire file.
- Rephrase settings descriptions
- Highlight special chars by default
- Hightlight trailing whitespace by default
- Sort highlight related settings
- Title, headings, CSS
Defaults to off on mobile devices.
@fredsa
Copy link
Copy Markdown
Contributor Author

fredsa commented Apr 6, 2026

Default settings when viewing a dasm project (the 8, 12, 24 values shown here are detected from c64 hello.dasm):

image

Default setting when viewing a C project:
image

@fredsa fredsa mentioned this pull request Apr 6, 2026
fredsa added 6 commits April 5, 2026 22:38
- Visual ruler at the top of the editor shows tab stops.
- When 'Tab key inserts spaces' is set, the ruler shows
  the {opcodes, operands, comments} virutal tab stops.
- In all other cases, fixed tab positions are shown
  based on the currently configured tab size.
- Clicking the visual ruler at the top of the editor
  is a shortcut to opening the settings dialog.
- Formats lines within selection range(s)
- Formats entire doc if nothing is selected

- Shift-Alt-F reformats the entire file, or just the
  line covered by the currently selected ranges(s):
- C-like source is reindented by `cpp()`
- asm source is formatted according to the current
  {opcodes, operands, comments} column settings
- Affected lines have trailing whitespace removed
- When formatting the entire file, Excess blank
  lines at the end of the file
Document built-in keyboard shortcuts
Filter and sort asm tab stops to be
monotonicly increasing [1..MAX_COLS].
@fredsa
Copy link
Copy Markdown
Contributor Author

fredsa commented Apr 6, 2026

  • The settings should "just work" out of the box without need for user customization.
  • Shift-Alt-f will:
    • reindent C-like files using codemirror/lang-cpp
      using "normal" fixed sized indent (using spaces or tabs, depending on setting)
    • format asm files using {opcodes, operands, and comments} column settings,
      using custom "virtual" tab stops (always uses spaces for indentation)
  • Tab/Shift-Tab will
    • In 'tab key inserts tab' mode it will indent/unindent according to fixed sized tab stops
    • In 'tab key inserts spaces mode' it will used fixed size tab stop for C-like programs and
      custom asm tab stops for asm programs

fredsa added 4 commits April 6, 2026 20:14
Previously returned boolean | undefined
- Remove unused styles.
- Adjust mbo trasparent background color highlights
   to improve usability.
- Fixup cobalt theme: add missing highlight colors,
   update to align with (cleaned up) mbo styles.
- Fix gutter background color transparency issue.
Except for the intial indent to the
opcode tab stop, maintain existing
whitespace for non-opcode lines.
fredsa added 2 commits April 12, 2026 15:48
Let clicks on leaf menu items propagate
so Bootstrap closes the main dropdown.
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