NotepadNext icon indicating copy to clipboard operation
NotepadNext copied to clipboard

Option to choose spaces instead of tab

Open titanomachy opened this issue 1 year ago • 2 comments

Description

Currently the tab button returns a literal tab character. In most editors there is an option to convert a tab in to a number of spaces. White space indenting is important for e.g. Python, Nim, Haskell etc. Having to type 4 spaces is cumbersome, but I could not find an option to change it.

Describe the solution you'd like

Solution

  • An option for choosing the indentation character: Tab or Space
  • An option for setting the amount of spaces when indenting with the Tab key

Scintilla The documentation for the Scintilla editor for indentation are here: https://www.scintilla.org/ScintillaDox.html#TabsAndIndentationGuides

SciTE In SciTE you can change the SciTEUser.properties file and insert:

tabsize=4         # Sets the width of a tab character to 4 spaces
indent.size=4     # Sets the indentation size to 4 spaces
use.tabs=0        # Ensures that pressing the Tab key inserts spaces instead of tab characters

Language specific settings, e.g. for Python, are set in a python.properties file.

file.patterns.py=*.py
tab.size=4
indent.size=4
use.tabs=0

NotepadNext For NotepadNext in src/scintilla/.editorconfig is set on line 4: indent_style = tab

I don't know how NotepadNext handles and stores preferences under "setting > preferences".

Notepad++ This is the Notepad++ setting for indentation: tab-indentation

Describe alternatives you've considered

Macro feature, but that does not work sufficiently.

titanomachy avatar Nov 24 '24 00:11 titanomachy

In SciTE setting indentation via SHIFT+CTRL+I or menu Options > Change Indentation Settings is also possible.

SciTE-indentation

titanomachy avatar Nov 24 '24 00:11 titanomachy

yes, please this feature would be super nice

BBQigniter avatar Aug 01 '25 12:08 BBQigniter