Answer the question
In order to leave comments, you need to log in
How to delete .swp file?
Good afternoon!
I am learning git. A file with the swp extension appeared in the folder. And it never gets removed. Not through git, not through the del button.
I understand that this file was created by git's vim editor. Because of this file, I can not change the branch in the git - it says error: cannot stat '.one.css.swp': Permission denied Tell me
how you can delete this damn file.
Answer the question
In order to leave comments, you need to log in
In the project root directory:
killall vim
find ./ -name *.swp -exec rm {} +
mkdir -p ~/.vim/backup
echo 'set dir=$HOME/.vim/backup' >> ~/.vimrc
vim
[выйти из вима]
find ./ -name *.swp -exec rm {} +
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question