vi next search result command

Booting, installing, newbie
Post Reply
Message
Author
edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

vi next search result command

#1 Post by edwin.evans »

In vim, you can type 'n' to find the next search result but I haven't found any way to do this on vi on Puppy. Is there any way? (Or another simple text editor I can use from the command line?)

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

Re: vi next search result command

#2 Post by RetroTechGuy »

edwin.evans wrote:In vim, you can type 'n' to find the next search result but I haven't found any way to do this on vi on Puppy. Is there any way? (Or another simple text editor I can use from the command line?)
I use "mg" which has an emacs feel, without the size/bloat.

There is also "pico", which is a pretty simple editor.

This thread has emacs and mg both listed:

http://www.murga-linux.com/puppy/viewtopic.php?t=61318
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

postfs1

Re: vi next search result command

#3 Post by postfs1 »

edwin.evans wrote:In vim, you can type 'n' to find the next search result but I haven't found any way to do this on vi on Puppy. Is there any way? (Or another simple text editor I can use from the command line?)
Instead of "type 'n'" there is another variant: "press 'n'"

In QUIRKY LINUX 1.40:

1st step: /pattern

2nd step: n

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Re: vi next search result command

#4 Post by edwin.evans »

postfs1 wrote:
edwin.evans wrote:In vim, you can type 'n' to find the next search result but I haven't found any way to do this on vi on Puppy. Is there any way? (Or another simple text editor I can use from the command line?)
Instead of "type 'n'" there is another variant: "press 'n'"

In QUIRKY LINUX 1.40:

1st step: /pattern

2nd step: n
That is what I was doing. The issue may be that vi is actually an alias on Puppy to 'e3vi' (a lighter weight version).

postfs1

Re: vi next search result command

#5 Post by postfs1 »

edwin.evans wrote:That is what I was doing. The issue may be that vi is actually an alias on Puppy to 'e3vi' (a lighter weight version).
QUIRKY LINUX 1.40:
/etc/profile: #v4.00 run e3vi whenever vi excuted... 100530 no, busybox vi now used...

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Re: vi next search result command

#6 Post by edwin.evans »

postfs1 wrote:
edwin.evans wrote:That is what I was doing. The issue may be that vi is actually an alias on Puppy to 'e3vi' (a lighter weight version).
QUIRKY LINUX 1.40:
/etc/profile: #v4.00 run e3vi whenever vi excuted... 100530 no, busybox vi now used...
Hm? My Puppy (5.0) is using e3vi. Are you saying to use something else for editor? NOTE: I can't change from 5.0.

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

Re: vi next search result command

#7 Post by 6502coder »

edwin.evans wrote:In vim, you can type 'n' to find the next search result but I haven't found any way to do this on vi on Puppy. Is there any way? (Or another simple text editor I can use from the command line?)
e3vi does not suppport either the "n" or "N" command. However, there is an alternative.

After starting a search with "/<pattern>" you can find the next search result by entering "/" with no search pattern; i.e. just "/" and hit RETURN. This will repeat the search.

Similarly, entering "?" will repeat the search in the reverse direction.

Once a search pattern has been established with either "/<pattern>" or "?<pattern>" you can move around with "/" and "?", mixing and matching as you like.

Post Reply