orbitalquark / textadept

Textadept is a fast, minimalist, and remarkably extensible cross-platform text editor for programmers.
https://orbitalquark.github.io/textadept
MIT License
636 stars 38 forks source link

As you type auto indent #441

Closed techntools closed 1 year ago

techntools commented 1 year ago

How to get auto indent automatically ? I know there are settings about indent but I still am unable to find conf/script to perform indentation available in Vim/Neovim or Atom.

orbitalquark commented 1 year ago

Textadept does not have a feature to increase/decrease indent on syntax tokens like '{' for C-like languages, or control structure keywords like 'end' in Ruby. It only matches indentation on previous lines.

I had a feature in my ~/.textadept/init.lua that auto-indented between auto-paired '{}' on 'Enter' that may be of help: https://github.com/orbitalquark/.textadept/blob/7294b433375f0e07ee2ba871087addf21129899b/init.lua#L195-L205

techntools commented 1 year ago

Ok. So, I need to write scripts/module.

Are there any existing ones ?

orbitalquark commented 1 year ago

I am not aware of any.