How can I circumvent the errors, such as E212 and E13, in the commands?
:'a,'bw set_question_tags.php
:'a,'bw >> set_question_tags.php
In some cases, even with Pavel's command:
"create_a_file_and_save.php" E212: Can't open file for writing
How can I circumvent the errors, such as E212 and E13, in the commands?
:'a,'bw set_question_tags.php
:'a,'bw >> set_question_tags.php
In some cases, even with Pavel's command:
"create_a_file_and_save.php" E212: Can't open file for writing
(Sorry, since the OP completely changed his question, my answer stopped making sense)
So, you basically need a command that appends text to the file even if it doesn't exist? Try using exclamation mark:
:'a,'bw! set_question_tags.php
:'a,'bw!>> set_question_tags.php
E212 problem solved
:'a,'bw! !sudo tee save_to_new_file_with_different_user.php
:'a,'bw! !sudo tee -a append_to_a_file_with_different_user.php