From 90750ec3d80a43ce0445eacf6547de8d950e50b2 Mon Sep 17 00:00:00 2001 From: Asocia Date: Wed, 3 Nov 2021 00:33:46 +0300 Subject: [PATCH] fix: Executing vim commands from terminal --- vim/executing-vim-commands-from-terminal.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/vim/executing-vim-commands-from-terminal.md b/vim/executing-vim-commands-from-terminal.md index 83d17c9..d5d1e56 100644 --- a/vim/executing-vim-commands-from-terminal.md +++ b/vim/executing-vim-commands-from-terminal.md @@ -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 +PlugInstall vim filename +g/foo/d vim filename "+g/foo/norm dap" -``` - -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 +vim filename "+g/test/norm dap" +wq ``` +