Block indentation in Notepad++
-
- Posts: 502
- Joined: 03 Dec 2018, 20:02
Block indentation in Notepad++
One thing that pains me the most when writing AHK scripts in Notepad++ is that there's no block indentation when pressing enter in the middle of a new pair of curly brackets. Is there any way to implement this feature in Notepad++?
Re: Block indentation in Notepad++
I’m sure you’ve considered this, but you could avoid that pain by switching to an editor that handles things like that (and much more) such as Visual Studio Code. I tried Notepad++ for AHK for a while, among others. Once I tried VSCode, I’ve stayed with it.
-
- Posts: 502
- Joined: 03 Dec 2018, 20:02
Re: Block indentation in Notepad++
After a lot of research I still can't find any solution, so I wrote an AHK script to get by:
If anybody knows how to implement this in udl it would be greatly appreciated!
Code: Select all
#IfWinActive, ahk_class Notepad++ ahk_exe notepad++.exe
:X`n:{::
SendInput {{}{Enter 2}{}}{Up}{Tab}
#If
Re: Block indentation in Notepad++
I came here looking for the same thing. My solution was just to set the language to C++. I don't know why Auto-indent doesn't work with user-defined languages.william_ahk wrote: ↑03 Sep 2021, 05:29After a lot of research I still can't find any solution, so I wrote an AHK script to get by:If anybody knows how to implement this in udl it would be greatly appreciated!Code: Select all
#IfWinActive, ahk_class Notepad++ ahk_exe notepad++.exe :X`n:{:: SendInput {{}{Enter 2}{}}{Up}{Tab} #If