Skip to main content

Open those files that contain a string in Vim

Project description

Author:

Ken Kundert

Version:
2.3
Released:

2026-06-28

Opens files that contains a given pattern in vim. You may specify a collection of files to search, otherwise all files in the current working directory and all sub directories are searched.

Within vim use n to move to next occurrence of pattern. Ctrl-n moves to next file and ctrl-p moves to the previous file. vim is run with autowrite set. Any directories, unreadable files, or binary files in the file list are ignored.

The pattern is a literal text string. Regular expressions are not supported.

Use – to terminate the command line options. Any thing that follows – is treated as the pattern. You can search for patterns that start with - by preceding the pattern with –.

Arguments

fvi [options] [–] pattern [file … ]

Options

-i, --ignore-case

ignore case

-w, --word

match a word

-o, --only <glob>

a glob string used to specify desired files, can use brace expansion to specify multiple globs

-e, --exclude <glob>

a glob string used to filter out unwanted files, can use brace expansion to specify multiple globs

-H, --hidden

include hidden files

-b, --binary

do not skip binary files (any not encoded in ascii or utf-8)

-g, --gvim

open files in gvim rather than vim

-v, --vim

open files in vim rather than gvim

-W, --warn

do not suppress warnings about directories and binary files

-h, --help

show help message and exit

If both --only and --exclude are specified, both must be satisfied.

Examples

Search specified files:

fvi ‘#!/usr/bin/env python3’ ~/bin/*

Search all files in current hierarchy:

fvi ‘unknown key’

Installation

Runs only on Unix systems. Requires Python 3.6 or later.

Install using:

pip install fvi

Configuration

The file ~/.config/fvi/settings.nt is read if it exists. This is a NestedText file that can contain settings: vim, gvim, and gui. The first specify the commands used to invoke vim and gvim. The last is a Boolean that indicates whether gvim is used by default (use yes or no). For example:

vim: vimx
gvim: gvim
gui: yes

In this example, vimx is used rather than vim so that copy and paste using X11 works as expected.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fvi-2.3.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fvi-2.3-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file fvi-2.3.tar.gz.

File metadata

  • Download URL: fvi-2.3.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for fvi-2.3.tar.gz
Algorithm Hash digest
SHA256 a5058741e8f0a07005614a90eb1f9b4e1ac37f6e5f1a3515958cf8532741b829
MD5 a5f433048044f3aad01cf0c90fbb9d55
BLAKE2b-256 d0e275ba24365dbe9aeb67d09c57c8c24b88db9416a44f3f58243890bf56aec1

See more details on using hashes here.

File details

Details for the file fvi-2.3-py3-none-any.whl.

File metadata

  • Download URL: fvi-2.3-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for fvi-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2e40d8b63f479e32bebf82db132c9c08c73247ad303281c7f3944b49d1448101
MD5 7a6298d8ba20ca97e830b613f5c9637c
BLAKE2b-256 fd3fd81cfa742e6fbf5a0228b5f8b9fef1d3e275a54d1513e305542a54bd8614

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page