Page 1 of 2

Geany rave

Posted: Mon 22 Jan 2007, 08:39
by Lobster
I must say Geany is a real star. We changed from Beaver to Geany.

Use the ctrl + + and ctrl + - to zoom in and out
Go to View and turn on the sidebar - now you can use the arrow keys to scroll up and down through open text docs.

One of Geany greatest tricks was to compile C code (after downloading the compiler add on) without having to be set up to do this. Magic. 8)

A big thank you to the Geany developers. IMHO (In My Humble Opinion) a text editor is VERY important and Puppy has a great one
http://geany.uvena.de/

What do you use to edit text or docs? Any tips? :D

Posted: Mon 22 Jan 2007, 14:13
by rarsa
Let me tell you about a couple of Geany features that make my life easier:

- Syntax highlighting for many different languages
- The side bar shows the functions to easily navigate a program
- Collapsible sections

While I am working with Bash or tcl/tk or C, I can just execute from the UI and test.

I am sure I haven't discovered all the niceties but I sure like it.

Hints:
- Configure it to view the side bar
- When Geany does not automatically detect the file type, specify it manually
- Change the execution command for tcl scripts from tcl8.4 to just tcl
- When coding Bash scripts separate your code in functions so it is easier to navigate. (besides all the other advantages of doing it.)
- Set the tab size to your prefered size (For me it's 2 characters)
- Configure eSVN to use Geany as the text editor.

Posted: Mon 22 Jan 2007, 16:28
by GuestToo
Use the ctrl + + and ctrl + - to zoom in an out
better still, just roll the mouse wheel while holding the ctrl key down

also, you can switch between tabs by moving the cursor over the tabs and rolling the mouse wheel

Posted: Tue 23 Jan 2007, 00:05
by Pizzasgood
You can move the tabs around. The search bar on the top is also handy, because it immediately jumps to what you type. It has the standard dialog for more complicated things.

Posted: Tue 23 Jan 2007, 00:50
by rarsa
Oh, yes, the search bar. I love that functionality in Geany, Opera and Firefox

Posted: Tue 23 Jan 2007, 19:04
by Dougal
Keyboard "menu" key gives a list of open documents.
You can choose what to have in your toolbar -- I always remove the "compile/make" and "colour chooser" so the "find" and "goto" fields come into view...

Posted: Tue 23 Jan 2007, 19:42
by Pizzasgood
'Ctrl + D' will comment out any lines you have highlighted. Much faster than manually sticking a # in front of fifteen lines.

Hold 'Ctrl' and then click and drag the mouse for geometric-selecting. I used to (and will soon) work with a bunch of ascii tile-maps, so that type of thing came in very handy.

Posted: Tue 23 Jan 2007, 20:41
by Flash
FWIW, I just saw this about the Eclipse IDE.

Posted: Tue 23 Jan 2007, 21:12
by rarsa
Oh, I know Eclipse. I've even used it professionally (maybe 4 years ago). It is a great environment, actually IBM's websphere development environment (which I've also used) is built around Eclipse.

The thing here is that Geany is so light and still provides many of the nice features one wants in a development environment.

Posted: Wed 24 Jan 2007, 14:24
by Dougal
Rarsa: please note that you implied in your first message knowledge of Tcl/Tk... this means we might chuck MUT bugs in your direction...

My really favourite Geany feature is emailing Enrico suggestions and finding them implemented in the cvs version a couple of weeks later!

Posted: Mon 29 Jan 2007, 08:49
by DavidBell
I'm still setting it up but I have noticed that MinGW Dev Studio is much faster at anything to do with screen refresh but particularly scrolling large text files. I have puppy on a relatively slow computer so it matters. Using Geany 0.8, think it's been updated since then. DB

Geany Text Editor - macros

Posted: Wed 08 Apr 2020, 07:05
by LNSmith
G'day all!

I have been using Geany for some time but need for a text editor WITH MACRO capability. Haven't found macros in Geany (but maybe it's there). A keystroke recording macro would be nice.

Can anyone recommend a text-editor for Puppy Linux? Spell-checking would be a bonus.

Considered ultra-edit but they want $80.oo PER ANNUM.
It's not repeat NOT GPL.
In Windows I used Edit-Pad Pro (a commercial item). It's nice, but there is no version for Linux.

Any suggestions welcome!

Leslie

System: Hardware. Pentium P4, 3GHz with 2GB of RAM.
OS uPupBB - 32 bit. Runs well.

Re: Geany Text Editor - macros

Posted: Wed 08 Apr 2020, 08:41
by MochiMoppel
LNSmith wrote: I have been using Geany for some time but need for a text editor WITH MACRO capability. Haven't found macros in Geany (but maybe it's there).
Depends on your definition of "macro".

Geany provides 2 tools:
1) The snippets.conf file lets you define text snippets that you can trigger with a letter combination, followed by TAB key
2) Custom commands are more powerful, but well hidden: Menu -> Edit -> Format -> Send Selection to
This allows you to do stuff with selected text and write back to Geany. For example I've set up a command that lets me, with a key shortcut, turn selected text like FOO into "$FOO" because I'm too lazy to add quotation marks and $ sign manually.

Posted: Wed 08 Apr 2020, 08:43
by Keef
Go to Tools > Plugin-Manager then tick 'Macros'.

Posted: Wed 08 Apr 2020, 09:00
by MochiMoppel
No such plugin in my Geany.

Posted: Wed 08 Apr 2020, 10:21
by Keef
This is on FatDog. I've not added any extra plug-ins (as never had the need).
Just checked, and Fatdog has an additional plug-in package. Not sure if it is installed as standard, or maybe I did install it myself for some obscure reason.

Posted: Wed 08 Apr 2020, 11:09
by MochiMoppel
Is it this macro plugin?
Would have to be compiled if not included in the distro. Not for everyone.

I really like their example:
"So if you had dozens of lines where you wanted to delete the last 2 characters, you could simple start recording, press End, Backspace, Backspace, down line and then stop recording. Then simply trigger the macro and it would automatically edit the line and move to the next. You could then just repeatedly trigger the macro to do as many lines as you want. "
In other words: Trigger the macro dozens of times until your fingers fall off :lol:
Of course you could delete all last 2 characters with a single click in the Replace dialog, but that would be too simple :wink:

Geany rave - WANTED: A KEYSTROKE MACRO

Posted: Wed 08 Apr 2020, 12:09
by LNSmith
To MochiMoppel & Keef:

The options you suggest look very interesting.
I found a link demonstrating snippets.conf: https://www.youtube.com/watch?v=cbh1mVsVeU0
Great music with the demo!

The macros included in the plugins were devised for programmers.
I'm using Geany to manage straight text files - or rather text files produced by grep.
Definitely not code.

Grep might produce a file (50-200k) something like this:

cm_d10_98-0824.txt-1886-A. Yes, sir.
cm_d10_98-0824.txt-1887-
cm_d10_98-0824.txt:1888:Q. When you went out to Harry Blogg's residence you had information, you say, that he was seen leaving the train station wearing an Army jacket, correct?
cm_d10_98-0824.txt-1889-A. Yes.
cm_d10_98-0824.txt-1890-
cm_d10_98-0824.txt:1891:Q. He had told you in his record of interview that he owned an Army jacket?
cm_d10_98-0824.txt-1892-A. Yes.
cm_d10_98-0824.txt-1893-
cm_d10_98-0824.txt:1894:Q. And you were going out there because you wanted to conduct scientific examinations of that Army jacket?
cm_d10_98-0824.txt-1895-A. Yes.

THIS IS SOMETHING LIKE I WANT TO DO:
I might want to find a regular expression (or perhaps a fixed string), go to the beginning of the line, go forward two lines, select the line, delete the line and repeat to eof. I've done this sort of thing with a text editor (in Windows) but the bash CLI is VERY useful and I prefer to work in Linux. Windows has a function rather like grep (called Search-str) but (I repeat) I want to stay in Linux.

I think you get the idea. So - I find a key-stroke recording macro does this type of work well.
Again - any suggestions welcome!

Leslie

Re: Geany rave - WANTED: A KEYSTROKE MACRO

Posted: Wed 08 Apr 2020, 12:31
by MochiMoppel
LNSmith wrote: I think you get the idea
Not at all.
So - I find a key-stroke recording macro does this type of work well.
What type of work? "find a regular expression (or perhaps a fixed string)". What does this mean and how can this be created with a keystroke macro? Using your example text, could you please explain what text strings you want to find and how you want to proceed from there? I just can't see how a keystroke macro would help.

Looks like you grepped for the lines starting with Q, with 2 leading and trailing context lines. Can't you do the line deletion by sending the grep result to another command that applies a regex and deletes the stuff you want to delete?

Posted: Wed 08 Apr 2020, 12:53
by Keef
Are you just trying to delete the lines with no speech? E.g, keep the line with a Q, then the line with an A, then delete the next line.
Assuming the files are consistent and the unwanted lines all end with "-" (and no wanted ones do):

Code: Select all

sed '/-$/d' file.txt
cm_d10_98-0824.txt-1886-A. Yes, sir.
cm_d10_98-0824.txt:1888:Q. When you went out to Harry Blogg's residence you had information, you say, that he was seen leaving the train station wearing an Army jacket, correct?
cm_d10_98-0824.txt-1889-A. Yes.
cm_d10_98-0824.txt:1891:Q. He had told you in his record of interview that he owned an Army jacket?
cm_d10_98-0824.txt-1892-A. Yes.
cm_d10_98-0824.txt:1894:Q. And you were going out there because you wanted to conduct scientific examinations of that Army jacket?
cm_d10_98-0824.txt-1895-A. Yes.
To save the output, change it to:

Code: Select all

sed '/-$/d' file.txt  > new.txt
But maybe that is not what you want at all.