[plugin development] Correctly handling npp indentation
-
Hello community,
The context :
I’m currently creating a npp plugin to help my co-workers programming in “4GL progress”.
I already have a pretty good UDL xml which color the synthax nicely and allow the use of smart indentation to be pretty efficient.The problem :
The only problem is that i need to indent only for 1 line after the “THEN” keyword (think of it as a block of 1 line) and i can’t do that with the non-less awesome UDL2.0.My thoughts :
I was thinking about handling the SCN_CHARADDED notification, check for new lines and set the current line (which is the new line) indentation to what i want.
Expect it doesn’t work. It looks like npp correct the line indentation AFTER what im doing during the notification.
Same goes for SCN_MODIFIED and checking for lines added.The question :
Can you think of a solution to overwrite npp’s auto-indentation? Or do you know if i can Send_message something to npp to deactivate auto-indentation in npp?++
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login