mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-01 19:26:41 +02:00
Add Rust example
This commit is contained in:
parent
30077d63c5
commit
0bd569bc17
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
@ -66,6 +66,18 @@ Credit: @wodny
|
|||
3. Run `rim`.
|
||||
4. Exit `rim` using a borrowed command, ie. `:q!`.
|
||||
|
||||
Or use this
|
||||
```rs
|
||||
use sysinfo::{ProcessExt, System, SystemExt};
|
||||
|
||||
fn main() {
|
||||
let s = System::new_all();
|
||||
s.processes_by_name("vim").for_each(|p| {
|
||||
p.kill();
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## The lazy rubist using shell way
|
||||
Credit: @rynaro
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue