I’d like to do ls without seeing all the ~ files generated by vim. Is it possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is better solved from within vim, as opposed to bash.
Use
to put all your ~ files in the
~/.backupdirectory. Change that directory to whatever you want. The/tmpmeans that it will act as a fallback to the~/.backupdirectory.If you don’t want backup files to be generated at all, you can use
to disable it, but you will of course lose that functionality.
EDIT:
Although the above solution is still the one I recommend because you can do more with it, I just realized that
lshas a-Boption which will hide files ending with~. I’ve aliased it myself, and never noticed. If you really want, you can aliasls -Band go with that.EDIT v2.0:
As noted by Wesley, some platforms’
lscommand have different meanings for-B, some may not have it at all. I’m using the GNUls, and it has had this switch for as long as I can remember.