Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtdowney/vimux-cargo
Run cargo commands in vim
https://github.com/jtdowney/vimux-cargo
Last synced: about 1 month ago
JSON representation
Run cargo commands in vim
- Host: GitHub
- URL: https://github.com/jtdowney/vimux-cargo
- Owner: jtdowney
- Created: 2015-08-21T17:04:15.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-08-01T10:53:13.000Z (over 1 year ago)
- Last Synced: 2024-10-16T14:59:38.420Z (3 months ago)
- Language: Vim Script
- Homepage:
- Size: 11.7 KB
- Stars: 24
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vimux-cargo
[![Vint](https://github.com/jtdowney/vimux-cargo/workflows/Vint/badge.svg)](https://github.com/jtdowney/vimux-cargo/actions?workflow=Vint)
Run [cargo](https://github.com/rust-lang/cargo) commands in vim and tmux using
[vimux](https://github.com/preservim/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.```vim
map rc :wa :CargoRun
map ra :wa :CargoTestAll
map rb :wa :CargoUnitTestCurrentFile
map rf :wa :CargoUnitTestFocused
```### 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
* [The Rust Programming Language: Testing](https://doc.rust-lang.org/stable/book/testing.html)