put cursor on found text in less or vi?

Little Girl littlergirl at gmail.com
Wed Sep 25 13:19:09 UTC 2024


Hey there,

Karl Auer wrote:
>Nils Kassube via ubuntu-users wrote:
>> Karl Auer wrote:

>> > I am looking at a text file with thousands of very long lines.

I'm not sure how it would do with the length of lines you described,
but my weapon of choice is Geany and I absolutely adore it. I'd have
to say that it's the most customizable text editor/IDE that I've ever
messed around with and that it's the Linux equivalent to the
Windows Notepad++ program. It's a lot of fun to explore and offers
seemingly endless customization.

>> First you could install joe.
>
>Thanks! I tried joe, and it does indeed display the found text
>location. Then with ^K-space, I can display the line details too.
>This solves my problem. Plus it loaded a quite-large file with very
>long lines in no time at all.

The search box at the top of Geany will highlight and take you to the
first occurrence of any search term you type into it and will continue
highlighting and taking you to successive occurrences every time you
press the Enter key or press Ctrl+g or click the magnifying glass.

As an alternative, The "Find..." menu (also accessible with ctrl+f)
highlights and searches for the next occurrence of the
currently-selected word and takes you to successive occurrences every
time you press the Enter key or press Ctrl+G or click the magnifying
glass. This menu offers a variety of ways to search and it can be
opened without making a selection first.

Geany offers more than forty plug-ins (I've got 9 of them installed)
and one of my favorites is the "Addons" plugin, which provides the
ability to highlight all occurrences of any word you double-click.
I'm so spoiled by that that I'd be lost without it.

One of its plug-ins is the vimode plug-in, which will run Geany in Vim
mode. I've never tried it and am not sure if you'd consider that a
good thing or a bad thing, as a Vi user, but it's worth a mention as
something of possible interest.

> And - bonus points - it has a read-only mode.

Geany offers the "Read Only" option in the "Document" menu.

>Every GUI editor I have ever tried has failed to handle either large
>file, or long lines, or both. I don't bother trying them any more. If
>there's a specific one that you know works, do tell!

Geany may or may not pass your large-file test. I'd be curious how it
does. I can't recommend it highly enough. It's one of my most
frequently-used programs and one of the first programs I install in
any Linux release.

-- 
Little Girl

There is no spoon.



More information about the ubuntu-users mailing list