-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does nppsnippets respect TABed cursor position #59
Comments
Since v1.6.0 snippets should be inserted with the indention, but as mentioned in the release notes, I have only been able to test it for a few languages. From your report I am not able to spot what language you are using. Could you please tell me, so I can take a closer look. |
Hello
Thanks for responding.
I am new to Notepad++ and snippets. I have had another look at the problem and it seems that the snippets plugin ignores indents (ie TAB or spaces) within the body text – see attached screen grab
I tried various combinations and found a workaround using “Before cursor” entry only followed by selection and TABbing to correct indent although not ideal.
Also, is there any way I can change the target language. Originally I edited the overrideMap to refer to a copy of Pascal function definition ie <association id= "vectorscript.xml" langID= "11" />
I have since created a UDL (user defined language). The problem is that snippets refers to previous definition. Is there any way to change the referenced language (otherwise I will have to rebuild from scratch). I had a look at the SQLlite database – table “LibraryLang”/Lang = 11
What is the language reference number for a UDL? If I haven’t missed it, can I change snippets language in the UI.
The language is a derivative of Pascal
Vectorscript web page
https://developer.vectorworks.net/index.php/VectorScript
Good Example
https://developer.vectorworks.net/index.php/VS:Progress_Dialog
Thanks
Bill Wood
From: Frank Fesevur ***@***.***>
Sent: Friday, June 9, 2023 8:30 PM
To: ffes/nppsnippets ***@***.***>
Cc: BW2001 ***@***.***>; Author ***@***.***>
Subject: Re: [ffes/nppsnippets] Does nppsnippets respect TABed cursor position (Issue #59)
Since v1.6.0 snippets should be inserted with the indention, but as mentioned in the release notes, I have only been able to test it for a few languages.
From your report I am not able to spot what language you are using. Could you please tell me, so I can take a closer look.
—
Reply to this email directly, view it on GitHub<#59 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOVBNSVH2HH3LGGAE6J2H7LXKN2S7ANCNFSM6AAAAAAY6K5OZE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
There are various issues with UDL and plugins (including my Snippets plugin). AFAIK for a plugin it is impossible to properly detect a UDL. Therefore things like adding the right language to a libraries, and apparently indenting (haven't tested it myself yet) don't work. See #43 as well. |
+1 Looking back at the whitespace before insert position, and prepending it to each and every following linebreak should solve the problem. |
Hello
I have a lot of TABed code and find that the plugin doesn’t respect the initial cursor TABed (or multiple space indent) position for the inserted snippet code -see below. Is there anything I can do to fix this anomaly.
Before cursor
After cursor
Some example code
If I add snippet at cursor position above, I get the following
The text was updated successfully, but these errors were encountered: