mirror of
https://github.com/sahinakkaya/til.git
synced 2024-11-25 01:59:36 +01:00
fix: Executing vim commands from terminal
This commit is contained in:
parent
6fbd3cb1d8
commit
90750ec3d8
@ -1,15 +1,12 @@
|
|||||||
You can execute vim commands in terminal by prefixing your command with `+` symbol:
|
You can execute vim commands in terminal by prefixing your commands with `+` symbol:
|
||||||
|
|
||||||
```
|
```
|
||||||
vim filename +/searchterm
|
vim filename +/searchterm
|
||||||
vim +PlugInstall
|
vim +PlugInstall
|
||||||
vim filename +g/foo/d
|
vim filename +g/foo/d
|
||||||
vim filename "+g/foo/norm dap"
|
vim filename "+g/foo/norm dap"
|
||||||
```
|
vim filename "+g/test/norm dap" +wq
|
||||||
|
|
||||||
These commands will open vim and perform your command. And if you want to immediately save and exit (useful for shell scripts):
|
|
||||||
```
|
|
||||||
ex "+g/test/norm dap" "+wq" filename
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user