I am very new to Vim and this problem has stumped me.
I am using vim to delete all lines containing a certain word. I have tried saving the edited text with to a new file but it always contains the exact same lines as the original file. What command do I use to save my edited text to a new file and keep the original file? Bear in mind, my file is very large and will take a long time to move to the bottom.
vim +g/word/d +'w bar' +q! foo
, wherefoo
is the original file andbar
is the target file, andword
is the filtering word. What happens? – muru Nov 8 '15 at 18:51