Skip to content

irexiz/vimux-cargo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

vimux-cargo

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>cr :wa<CR> :CargoRun<CR>
map <Leader>ct :wa<CR> :CargoTestAll<CR>
map <Leader>rb :wa<CR> :CargoUnitTestCurrentFile<CR>
map <Leader>rf :wa<CR> :CargoUnitTestFocused<CR>
map <Leader>ch :wa<CR> :CargoCheck<CR>
map <Leader>cp :wa<CR> :CargoClippy<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

Languages

  • Vim Script 100.0%