Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple script that provides mechanisms to quickly find and open files in vim.
VimL
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
autoload
plugin
.gitignore
README.md

README.md

Pyxis

A simple script that provides mechanisms to quickly find and open files.

A major design goal was ease-of-installation; the script does not depend on vim being compiled with support for any "special" features. This comes at the price of not being able to (feasibly) add fancy things like approximate string matching (overrated anyway, right?) etc.

Installation

Preferred Method

Install Vundle and add Bundle 'strange/pyxis-vim' to your .vimrc.

Manual Install

Copy autoload/pyxis.vim and plugin/pyxis.vim into corresponding directories in your vim plugin directory.

Usage

:Pyxis opens an "input field". A list containing matching files will be displayed as you start typing (assuming there are files in your cwd that match what you've typed).

An in-memory cache will be populated during the first run. You can use :PyxisUpdateCache to manually update the cache.

Something like the following in your .vimrc might be nice:

noremap <leader>e :Pyxis<CR>
noremap <leader>E :PyxisUpdateCache<CR>

Use <Tab>, <S-Tab>, <Down> and <Up> to navigate between entries in the list.

<CR> opens selected file in currently active window. <C-h> and <C-v> opens the file in horizontal and vertical splits, respectively. <C-t> opens the file in a new tab.

/ and _ in quries work as matching delimiters. You can, for example, type do/ to see all files located in doc/ and help/documentation/, or h_w to match a file named hello_world.c.

Caveats

The script relies on find to populate the cache at the moment, but I'm evaluating an implementation that uses the built-in globpath instead. The native version is a little faster on small dir trees (a few ms), but a lot slower on large trees (like the Linux kernel where it takes ~5 seconds to complete on my machine, as opposed to less than 1 second using find).

Current state of the project: works for me and I prefer it over other solutions.

The script stores a list of all files in cwd in an in-memory cache. You currently update the cache manually when you remove or add files. I might fix this some day.

Something went wrong with that request. Please try again.