On Fri, Sep 24, 2021 at 9:37 AM Igor <[email protected]> wrote: > > Hi, > I would like to embed vim code inside bash script. > > I have simple text file text_file.txt with content: > aaa > > Content sample.sh file: > #!/bin/bash > echo "Start running vim commands inside bash program." > vim +"so dummy.vim" << EOF > :e text_file.txt > :s/a/b/ > :x > EOF > echo "End of running run vim commands inside bash program." > > Above code opens text_file.txt, replaces letter a with b and saves the file. > When I run sample.sh file from shell: ./sample.sh > The output on terminal is: > Start running vim commands inside bash program. > Vim: Warning: Input is not from a terminal > End of running run vim commands inside bash program. > > and script does get executed, so file text_file.txt correctly gets changed to > baa > The only little bit annoying thing is the Vim: Warning: Input is not from a > terminal message in terminal. How to suppress this message? > Thanks.
See :help --not-a-term Best regards, Tony. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXu8%2B1nFwjq6%2BaaCvRq4PkpMduKvi66_9B4Z%2BcdU6aZUkg%40mail.gmail.com.
