Skip to content

jtdowney/vimux-cargo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vimux-cargo

Vint

Run cargo commands in vim and tmux using vimux.

Usage

This plugin currently assumes you have a module named tests in the current file and that modules are not nested.

Add something like this to your ~/.vimrc or inside ~/.vim/ftplugin/rust.vim if you want only use this mapping with files that have the rust filetype.

map <Leader>rc :wa<CR> :CargoRun<CR>
map <Leader>ra :wa<CR> :CargoTestAll<CR>
map <Leader>rb :wa<CR> :CargoUnitTestCurrentFile<CR>
map <Leader>rf :wa<CR> :CargoUnitTestFocused<CR>

Commands

  • CargoRun - run the project, currently this assumes there is only one binary
  • CargoTestAll - run all tests
  • CargoUnitTestCurrentFile - run the whole test module in the current file
  • CargoUnitTestFocused - find the first test above your current line and run that test

See Also

About

Run cargo commands in vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •