Skip to content
Iury O. G. Figueiredo edited this page Dec 7, 2019 · 6 revisions

Set a search pattern

Vy uses tcl regex scheme, you can insert a regex pattern to be used by switching to NORMAL mode then pressing:

<Alt-slash>

It will open an input text widget in which you can insert a regex pattern and perform operations by pressing key-commands while the input text is active. It is named Get mode.

Set a replacement pattern

You achieve it by presing the keycommand below after switching to search mode:

<Alt-q>

You will notice a msg on the status bar showing the replacement that was set.

Note: The following keycommands should work on Get mode it is when the input field is active.

Search up

Once a search pattern is set, it is possible to make the cursor jump to the previous occurence of the pattern from the cursor position by pressing:

<Alt-o>

In Get mode.

Search down

After having set a search pattern, press the keycommand below in Get mode:

<Alt-p>

It will make the cursor jump to the next occurrence of the pattern.

Replace on

Set a pattern and a replacement for the pattern. Make the cursor jump back/next to the pattern. Once the cursor is positioned at the pattern then press the keycommand below in Get mode:

<Alt-period>

The matched pattern will be replaced for the previously set replacement. This keycommand is specially useful when one doesn't know which matched pattern should be replaced really.

Search patterns inside selected text

This is a powerful feature. One could select ranges of text then do searches inside these ranges. The matched patterns will be highlighed.

First, use range selection or block selection or whatever other kind of selection to select some region. Press:

<Alt-n>  

insert a pattern then:

<Alt-slash>

The matched patterns will be highlighed.

Replace matched patterns inside selected text

Once a pattern is set, a replacement is set, then one can do replacement for the matched patterns inside a selected region by pressing the keycommand below in NORMAL mode:

<Alt-semicolon>
Clone this wiki locally