|
FVI, Find and edit with VI |
A 'How To' Guide for the Nanopublisher |
FVI takes a pattern and a list of files. It then searches for the pattern in those files and then opens only those files that contain the pattern in your VI editor. Once the files are open, you can use 'n' to take you to the next instance of the pattern in the current file, and 'cntl-n' to take you to the first instance of the pattern in the next file. The editor is started in 'autowrite' mode, so any changes you made to the file are automatically saved when you move to the next file.
FVI uses the editor defined in the EDITOR environment variable. If not defined, it will use vim. You can also use gvim by specifying the -g option.
fvi [options] pattern file [...]
| pattern | The pattern or string to be located. |
| file | File or files to be searched for the pattern. |
| -w | Match only whole words. |
| -l | Match only whole lines. |
| -i | Ignore case. |
| -b | Do not skip files that are not purely ACSII. |
| -g | Use gvim as editor (gui version of vim) |
The code runs under various flavors of Unix (ex. Linux). For people with Windows, it can be run under Cygwin.
After downloading, unpack the archive with
tar zxf fvi.tgz
Compile it with
cd fvi make fresh
Install with (you may need to be root to do this)
make install
![]() |
![]() |
Any questions or comments on these notes can be directed to theNurds@nurdletech.com.