Format text in Geany?

Using applications, configuring, problems
Post Reply
Message
Author
Wognath
Posts: 423
Joined: Sun 19 Apr 2009, 17:23

Format text in Geany?

#1 Post by Wognath »

I am in the (bad?) habit of using geany to write down notes. It would be great if I could bold, underline or color some text to improve readability. Of course, Geany automatically does all kinds of formatting in program files, but I can't discover how to manually format text in a .txt file.

Is there a reasonably straightforward way to do this?

Thanks

User avatar
Galbi
Posts: 1098
Joined: Wed 21 Sep 2011, 22:32
Location: Bs.As. - Argentina.

Re: Format text in Geany?

#2 Post by Galbi »

Wognath wrote:Is there a reasonably straightforward way to do this?
Yes, but not with Geany, instead, with a RTF (rich text format) editor. Like Ted.

.txt are not supposed to do that.
Remember: [b][i]"pecunia pecuniam parere non potest"[/i][/b]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Hi wognath.

Taking notes in geany is an excellent habit !!! ;) I do the same!

Except geany is strictly a text editor. It doesn't do italics, bolds, etc.

The easiest way to improve the look of your text, once you're satisfied
with its contents, if probably to fire up OpenOffice or Abiword and work
the layout and finishing touches there.

There exist however typesetting systems such as groff and latex which let
you introduce layout codes within your text in your text editor. Then you
send such pre-formatted text to a groff or latex capable app and finally
this app prints it out as a pdf or to an html file or on paper.

You may want to look up the "groff" and "latex" wikipedia articles.

If that is too involved for you, you may like a markup language variant
https://en.wikipedia.org/wiki/Lightweig ... p_language which
again would be triggered by "words" or "signs" you put in your "txt" text. :)
Puppies usually have a utility called "Markup" to do just that.

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#4 Post by Sailor Enceladus »

musher0 wrote:If that is too involved for you, you may like a markup language variant
https://en.wikipedia.org/wiki/Lightweig ... p_language which
again would be triggered by "words" or "signs" you put in your "txt" text. :)
Puppies usually have a utility called "Markup" to do just that.
Yes, there's a program called mdview by jamesbond in recent puppies that can do this also. :)

You can kind-of do colours in Geany by saving your file like this, then closing it, then opening it again

Code: Select all

#!/bin/bash

# red text

"ORANGE TEXT"

black text

12345
In leafpad you can do ALLCAPS or **text** for important, or --- or === under it for underline I guess. Just gotta be creative :D

Wognath
Posts: 423
Joined: Sun 19 Apr 2009, 17:23

#5 Post by Wognath »

Thanks for the replies.
musher0 wrote:Taking notes in geany is an excellent habit !!!
Good, so I have one. You're right, switching to Abiword or converting to pdf is most reasonable but too involved for me ;) I will most likely stick with boring black-and-white text.
Galbi wrote: .txt are not supposed to do that
Understood. I hoped there might be a way to use some kind of markup within Geany to trigger its formatting abilities. This might be a case of "buscar tres pies al gato;" as the screenshot shows, though, it's awkward but not impossible. Edit: I just had a look at Ted--maybe I like it :) Thanks for mentioning it.
Sailor Enceladus wrote:You can kind-of do colours
Thanks, you posted while I was drafting my reply. I'll have to look into mdview and Leafpad. Edit: the colored text in my example untitled.txt does not survive save/reopen unless file is renamed untitled.sh or (as you say) it has #!/bin/bash :oops:
Attachments
xscreenshot-20170615T170402.png
(10.27 KiB) Downloaded 310 times

mostly_lurking
Posts: 328
Joined: Wed 25 Jun 2014, 20:31

#6 Post by mostly_lurking »

As some people mentioned already, a plain text document can't contain formatting, and Geany is not capable of storing text formatting information. The coloring that you see when working with code is called "syntax highlighting", and it is something Geany applies to the text on screen (but not to the actual content of the file) based on certain instructions that it has for highlighting specific elements of the code, like keywords, numbers or comments.

I sometimes take notes with Geany, too, and like Sailor suggested, I use caps or special characters like *** for emphasis.

My Wary Puppy 5.1.2 came with a notes manager called "Notecase". I have never actually used it, but from some quick testing, it seems to be capable of doing what you want (see picture below). Check if your Puppy has it already (on mine, its in the Menu > Personal category), or if your package manager offers it. If not, there are some packages here:
http://distro.ibiblio.org/puppylinux/
You haven't said which Puppy you are using, but there are packages available for various specific Puppies, as well as two packages in the "pet_packages-common" folder.

(The files that Notecase creates are HTML-like files, btw. So if you ever need to open your notes, but are lacking the program, you can use a browser to view them instead.)
Attachments
notecase.png
(61.53 KiB) Downloaded 290 times

Wognath
Posts: 423
Joined: Sun 19 Apr 2009, 17:23

#7 Post by Wognath »

Thanks to all. Ted, mdvidw and notecase all seem like good options. You have provided the nudge I needed to overcome the barrier of laziness and make a change. Tomorrow ;)
mostly_lurking, thanks for mentioning notecase. It comes with Fatdog; there's even some documentation in ncd format, but I'd never considered using it for this purpose. :shock: With my memory, I often have several documents open at once, and notecase seems designed to reduce the confusion.
Attachments
xscreenshot-20170616T114718.png
(23.84 KiB) Downloaded 255 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

Hello wognath.

Glad to hear you will be deciding something tomorrow! ;)

I re-read the thread trying to discover which Puppy you're using.

In any case, please note that for the budding DPupStretch-7.0.0 series of
Puppies, the old notecase had to be seriously edited to get it to work.
Please see the DPupStretch thread for the smallish history of this edit.

You see, the public licence Notecase available in the Puppy repos hasn't
been updated in ages,

If you're considering using a recent Pup released this year, may I suggest
that you consider also using an organizer named CherryTree instead of
the aging notecase.

A modern version of notecase does exist, but it's not open source
anymore: you'll have to dish out $70 for it, IIRC. Whereas CherryTree has
a GPL licence (meaning: it's open source and free) AND, perhaps this is
more important for us Puppyists, it's Notecase-compatible. In addition,
CherryTree has a good editor and can import a number of organizer
formats.

IHTH. BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#9 Post by tallboy »

I agree that Notecase is old, but it is very quick and easy to use. Cherrytree looks very interesting, but it seems like it require more work to set up to one's liking. I recommend to learn some of the Notecase keyboard shortcuts, they are listed in the helpfile. For example, in the screenshot in mostly_lurking's post, there is a text describing how to create a new file, an easier method is to just press the Insert key. Another very useful shortcut, only mentioned in the changelogs, is Ctrl+P, to toggle focus between tree and text. Leaving the keyboard to mouseclick just to change focus is very annoying. I always try to avoid mouseclicks! :D

BTW: You all seem to have overlooked the massive 46 posts contribution to Geany by Puppus Dogfellow: Geany as Launcher, Bookmarks Manager, and Word Processor You may find what you are looking for in there somewhere.

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

step
Posts: 1349
Joined: Fri 04 May 2012, 11:20

#10 Post by step »

@Wognath,
CherryTree for Fatdog-710 by smokey01. Needs python. I use it. Much richer feature set than notecase, and maintained. Needs more resources.

But most often I write little text files using markdown markup. Naming such files filename.md makes some text editors that are capable of syntax highlighting display the markup. Even Geany does, but it can only do color formatting, no bolding nor italicizing.

What's nice about markdown is that it's simple to remember and ubiquitous, with many online and offline tools. What's not so nice is that there are many markdown dialects with different feature sets.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]

Wognath
Posts: 423
Joined: Sun 19 Apr 2009, 17:23

#11 Post by Wognath »

We already know that Geany can display red, green, blue and orange text. I visited the developer's site thinking to suggest adding some kind of markup symbols to display those colors in a plain text file. But the wish list list is already so long that it has been closed. Anyway, as I learned from this thread, there are better solutions.

Musher, thanks for the information about Notecase vs. CherryTree. I need to give the latter a try. I have already started to tinker with Notecase, and it works very well in Fatdog.

tallboy, I too prefer not to click a menu so I immediately looked for the Notecase keyboard shortcuts, and even added new ones by Edit/Configure Shortcuts. I'm pretty content with Notecase at the moment. I saw Puppus Dogfellow's tome on Geany, but couldn't find anything that addressed my issue. In particular, "nooby's word processor" seems to be a few scripts for adding markup symbols, which do not change the appearance of text within Geany. But nooby's posts brought fond memories.

step, thanks pointing out the CherryTree.txz. It will save me some time messing with python issues. It's also good to know about markdown. It produces exactly what I was looking for, but not within Geany.

Thanks for very useful information. In future I'll use Geany mostly for its intended purpose.

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#12 Post by tallboy »

I may add that I have Xpad in my tray at the bottom of the desktop (I use JWM) It is very handy for notes that are not to be saved, a link or a tip for including somewhere else later, or any temporary reference.
I use Notecase for genealogical listings - not massive work but maybe one family line, any tips or trix for my cars or engines, copies of all modified configs placed in a list, e.t.c.. It is incredible useful as soon as you get used to using it! :D

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

Post Reply