News:

Let's find out together what makes a PIC Tick!

Main Menu

Does anyone out there use Clippings

Started by JohnB, Feb 03, 2023, 05:56 PM

Previous topic - Next topic

JohnB

Does anyone use the Clippings tool window in Positron Studio.
I am beginning to think it is of little practical use but other might think differently.

I am thing of dropping it so please let me know if you want it retained
JohnB

keytapper

If you're referring to use snippets, I'm not, for one, using much. But the difference is between the OS, for Linux the clipboard offer a wider option to memorize more events, that in Windows is possible only with an additional program that works in background.

I find this difference when using kate, which offers its own memorization of several clips, besides there's a further plugin for that.

The good thing in Linux is that the copy/paste is possible to use the mouse only. So any highlighted text is temporary memorized, then by the click to the middle mouse button will be pasted almost anywhere.
Ignorance comes with a cost

flosigud

You can copy paste with the mouse only with all operating systems.

John Lawton

Yes, but Keytapper is saying Highlighted Text, not highlighted and copies text, subtle difference.

TimB


The way I was hoping snippets would be enabled is the same as the Always on top note pad plugin some one wrote before for the old IDE

It was that you could copy a load of code from another prog and either compare it to what you have in your code or work your way through pasting it into your current code

The important elements were that you could highlight some code and paste it somewhere safe then have both it and your current code visible. Being able to almost line it up side by side.

 

RGV250

Hi Tim,
Quoteand paste it somewhere safe then have both it and your current code visible. Being able to almost line it up side by side.
Have you tried WinMerge   https://winmerge.org/?lang=en   a really useful program.

Bob

John Lawton


keytapper

Back to the discussion, most of us is considering that the  Positron Studio clip history may not be necessary.
On the other hand there's a way to get the windows 10 clipboard history, as old shareware programs were doing.
Ignorance comes with a cost

Stephen Moss

Obviously if there is a piece of code that is used often in a program such as a print routine it would be better to place it in a Sub/Proc or include file.
However the line specifying the printed data would be differ throughout the code and need to be repeated multiple times, i.e.
Print_Line = 1   'Specify Print Line
Print_Col = 3   'Specify Print Position
Print_String = "test" 'Specify print Text
LDC_Print(Print_line, Print_Col, Print_String) 'Pass data to Print Procedure

Print_Line = 2
Print_Col = 1
Print_String = "Sensor Failure"
LDC_Print(Print_line, Print_Col, Print_String)
It can be useful to store this in the clipping area for quick insertion and yes, you can copy (Ctrl+C) and paste (Ctrl+V), but you first have to locate an instance to copy if you have performed an other copy operation either within or without the IDE that will have overwritten the OS clipboard data in between pastings of your repeated code block, so having it stored in the clipping area can be useful.

That said I don't use it all the time and have not done any real PIC work for some time so cannot remember how much of the time I have used it was under real use conditions and how much was during testing. I do think it can be occasionally useful, so it is a nice feature to have for when you need it. However, if it were removed one can one can always create a "Clippings" file and keep thing likes your default LCD, MSSP & ADC setup in, keeping it open in the IDE and copy from there.

Quote from: TimB on Feb 06, 2023, 07:46 PMThe way I was hoping snippets would be enabled is the same as the Always on top note pad plugin some one wrote before for the old IDE

It was that you could copy a load of code from another prog and either compare it to what you have in your code or work your way through pasting it into your current code

The important elements were that you could highlight some code and paste it somewhere safe then have both it and your current code visible. Being able to almost line it up side by side.

With regard to using a "clippings" file instead, you can view both that file and you current code file at the same time is Positron Studio by undocking the "Clippings" file from the standard (Center) location and docking it either above, below, left or right of the other code windows. 
 

keytapper

Quote from: Stephen Moss on Feb 07, 2023, 10:49 AMObviously if there is a piece of code that is used often in a program
I would, for one, rather write a macro, which optionally permits some parameters to be passed in ;). Whenever the space is limited, then a procedure can save, particularly as the routine is called more than twice.

For repeated similar lines, in place, I'd suggest to use an editor macro, that will copy the current highlighted line(s) below (or above). Then one can modify the little amount of line(s) letters, to make a different sentence. In my POW is the fastest option that doesn't need to move the hands away from the keyboard.

Copying text from another files, can be opened in a new tab, and if needed detached from the main windows.
Ignorance comes with a cost