tags:

views:

181

answers:

2

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
+1  A: 

(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
Pavel Shved
It is not different, I rollbacked it to the original adding only more relevant information.
HH
You see, this site is not about solving your problems. It is about answering questions. So if your problem is not solved after question is answered, you're to ask another one instead of editing the original one.
Pavel Shved
A: 

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
HH