Hi urbanpcguru! On Mi, 08 Jun 2011, urbanpcguru wrote:
> I can open vim with sudo vim /etc/hosts for example.. But how do I > save and close it? I can't seem to find the answer to this > anywhere!? Why would one easy question be so freaking hard to > find??!!! Because you are using the one and only true editor. We don't want, that anybody simply can use our editor. After all, we don't provide documentation or man pages, have no wiki don't distribute plugins and of course won't answer questions. Drat, how did you even find our mailing list? > How do I save a file? <--- Is this too easy a question to be > answered? I have been driven mad for 3 hours trying to find this one > simple thing!! Yes, this is too easy. Remember, you are using an editor, not a saver. We don't save our files, we edit them! But here is a trick, you can use to convince vim to save your file: :w !tee % to save and quit, we use: :exe 'w !tee %' | exe '!kill -9' getpid() I've heard, some people have mapped the former to :w and the latter to :wq but that must be rumours, after all this is the true editor. There is no easier way to do what you want than using it's builtin functions. SCNR, Christian -- You received this message from the "vim_dev" 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