How can you put a list of files to Vim's -o -mode?
I have a list of files as Grep's output. I run unsuccessfully
grep -il sid * | vim -o
grep -il sid * | xargs vim -o
grep -il sid * | xargs vim
vim -o `grep -il sid *`
vim -o | grep -il sid *
Open a new or existing file with vim filename . Type i to switch into insert mode so that you can start editing the file. Enter or modify the text with your file. Once you're done, press the escape key Esc to get out of insert mode and back to command mode.
You simply type vim into the terminal to open it and start a new file. You can pass a filename as an option and it will open that file, e.g. vim main.
Ctrl-W w to switch between open windows, and Ctrl-W h (or j or k or l ) to navigate through open windows. Ctrl-W c to close the current window, and Ctrl-W o to close all windows except the current one. Starting vim with a -o or -O flag opens each file in its own split.
Try
vim -p `grep -il sid *`
if you want to open the files in different tabs in the same window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With