Skip to content

A nvim plugin which searches a file and runs a command on it

License

Notifications You must be signed in to change notification settings

mrded/nvim-zond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nvim-zond

A nvim plugin which searches a file and runs a command on it

Use case

Find and run a test in a split.

image

nnoremap <C-t> <cmd>lua require('zond').find_and_run({ title = 'Run a test', filter = '.spec.ts$', cmd = 'vsplit term://npx jest %s' })<cr>

Required dependencies

Installation

Using vim-plug

Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' }
Plug 'mrded/nvim-zond'

Using dein

call dein#add('nvim-telescope/telescope.nvim', { 'rev': '0.1.0' })
call dein#add('mrded/nvim-zond')

Using packer.nvim

use {
  'mrded/nvim-zond',
  requires = { {'nvim-telescope/telescope.nvim', tag = '0.1.0'} }
}

Usage

require('zond').find_and_run({
  title = 'Run a test',               -- (optional) a modal title.
  filter = '.spec.ts$',               -- (optional) a regex filter for the file search.
  cmd = 'vsplit term://npx jest %s'   -- a command to be run. %s will be replaced with a file path.
})

About

A nvim plugin which searches a file and runs a command on it

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages