mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-05-03 12:16:18 +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`.
|
3. Run `rim`.
|
||||||
4. Exit `rim` using a borrowed command, ie. `:q!`.
|
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
|
## The lazy rubist using shell way
|
||||||
Credit: @rynaro
|
Credit: @rynaro
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue