It is currently March 28th, 2024, 8:46 pm

Notepad++: Snippets for Rainmeter

Plugins and Addons popular with the Community
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

Minor update and formatting improvements...

2015-11-19
added InlineSetting= & InlinePattern= to MeterString
added a space after the semicolon on comments, to match notepad++ block comment format
added an additional CRLF to all meters and measures for vertical spacing on insertion

See first post for updated file and info on installing.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

Post by jsmorley »

I guess there is no way short of a fairly complicated sql statement in some sqlite tool to change the behavior from "before cursor" to "after cursor", which would have to be repeated after every update. I'm finding it really difficult to get used to that. Unlike pasting a "snippet" in other cases, with this I pretty much always want to insert the snippet, then end up at the "top" of the inserted section, so I can modify it. Not a big deal, but it is just disconcerting to end up at the end of the inserted section and have to scroll back up every time. I have RainSend set up to insert then move back up, maybe I'm just used to that.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

jsmorley wrote:I guess there is no way short of a fairly complicated sql statement in some sqlite tool to change the behavior from "before cursor" to "after cursor", which would have to be repeated after every update. I'm finding it really difficult to get used to that. Unlike pasting a "snippet" in other cases, with this I pretty much always want to insert the snippet, then end up at the "top" of the inserted section, so I can modify it. Not a big deal, but it is just disconcerting to end up at the end of the inserted section and have to scroll back up every time. I have RainSend set up to insert then move back up, maybe I'm just used to that.
I think you are just used to doing things a certain way :p :D

But I can see where that missing feature could be frustrating.

The only caveat I have seen with this action in RainSend, is the cursor point sometimes goes too far back up the list, but it does makes sense to place it back at the point of entry.

This might be possible with Snippets, I will look into that possibility.
With my limited lua skills, hopefully this is possible inside the plugin. :)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

eclectic-tech wrote:I think you are just used to doing things a certain way :p :D

But I can see where that missing feature could be frustrating.

The only caveat I have seen with this action in RainSend, is the cursor point sometimes goes too far back up the list, but it does makes sense to place it back at the point of entry.

This might be possible with Snippets, I will look into that possibility.
With my limited lua skills, hopefully this is possible inside the plugin. :)
It is an option in the plugin. I will need to edit the snippets and run a few test, but hopefully, we can get make this change. :thumbup:

Geez!, I am still getting used to this new forum format... I thought I clicked 'Edit', but click 'Quote'! :oops: :lol:
Last edited by eclectic-tech on November 19th, 2015, 3:49 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

Post by jsmorley »

eclectic-tech wrote:I think you are just used to doing things a certain way :p :D

But I can see where that missing feature could be frustrating.

The only caveat I have seen with this action in RainSend, is the cursor point sometimes goes too far back up the list, but it does makes sense to place it back at the point of entry.

This might be possible with Snippets, I will look into that possibility.
With my limited lua skills, hopefully this is possible inside the plugin. :)
Its a shame the went the route they did, where that "setting" isn't really a setting at all, but simply puts the text to insert in a different column in the database. It would have been nice if that was some kind of overall setting for the "library", where you could simply tell which you want. The trouble with forcing it one way or the other is that what I like someone else may hate.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

jsmorley wrote:Its a shame the went the route they did, where that "setting" isn't really a setting at all, but simply puts the text to insert in a different column in the database. It would have been nice if that was some kind of overall setting for the "library", where you could simply tell which you want. The trouble with forcing it one way or the other is that what I like someone else may hate.
Yes, that would have been nice... and you are right that everyone gets into coding habits, and may, or may not want it to work that way.

It's not a big deal to offer 2 versions, but that might just be confusing.

You can manually edit the snippets and copy/paste the code to achieve this option, but that entails editing 70 or more snippets... and then an update would overwrite your changes.

Conundrum :???:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

Post by jsmorley »

eclectic-tech wrote:Yes, that would have been nice... and you are right that everyone gets into coding habits, and may, or may not want it to work that way.

It's not a big deal to offer 2 versions, but that might just be confusing.

You can manually edit the snippets and copy/paste the code to achieve this option, but that entails editing 70 or more snippets... and then an update would overwrite your changes.

Conundrum :???:
Really just need some command line driven sqlite tool that can execute sql statements. All you really need to do is move the text from one column to another. Maybe something with https://www.sqlite.org/cli.html
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

Post by jsmorley »

1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Snippets for Rainmeter

Post by eclectic-tech »

I have limited experience with the SQlite DB browser I am using, and haven't really used SQL in a few years (decades?), it may take me a little while to play with this and see what can be done.

Thanks for all the info!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Notepad++: Snippets for Rainmeter

Post by jsmorley »

eclectic-tech wrote:I have limited experience with the SQlite DB browser I am using, and haven't really used SQL in a few years (decades?), it may take me a little while to play with this and see what can be done.

Thanks for all the info!
The sql statement shouldn't be very complicated. Just want to update column B with the values from column A by "SnippetID", then NULL out the values in column A. Probably not those first two snippets, they are a bit different.