Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But it's not necessary right? If you omit the first step, vim will still open, and the file will get created when you first save it.


Maybe it takes into account if the user doesn't have write access to the folder? If the user didn't have access, the touch command would fail, whereas going directly to vim, it would only fail when trying to save (potentially losing the work done in the file)?


vim will make a swap file for you and will stop you from quitting on an unsaved file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: