title: How are MacVim's settings related to .swp files unique from other versions of Vim and how can I override them?
body: <p>I have been using Vim casually for around 3 years (mostly for git commit messages) and recently started using it exclusively for text editing and coding while I work my way through a series of intermediate tutorials and resources. Up until a few weeks ago, I primarily used either Vim, NeoVim or iVim (on iOS). </p>
  
  <p>Recently I installed MacVim and started using it exclusively when I'm working in iTerm on a Mac. I have noticed some differences in the way <code>.swp</code> files are created and managed. In the other versions of Vim that I have used, <code>.swp</code> files are only created when I have a file open in more than one instance of Vim at the same time. It seems that MacVim creates <code>.swp</code> files for every open file (I'm guessing for backup/restore purposes). MacVim also seems to put .swp files into the working directory. I don't recall other versions of Vim doing this but it recently led me to add <code>*.swp</code> to my global Git ignore settings.</p>
  
  <p>Before drafting this question I did a quick search for: <code>vim macvim swp files</code> and found one result that gave me a few ideas on how to work around one of the issues that I've noticed:</p>
  
  <p><a href="https://stackoverflow.com/questions/28901886/vim-swap-files-not-deleting">Vim Swap Files Not Deleting</a></p>
  
  <p>I also found <a href="https://stackoverflow.com/questions/11255877/vim-swp-files-interfere-with-repository-vimdiff">this post</a> that gives the impression that the following settings are involved:</p>
  
  <pre><code>backup / nobackup
  writebackup / nowritebackup
  swapfile /noswapfile
  </code></pre>
  
  <p>But this doesn't really answer my question, which is "What is different?". I am editing my <code>.vimrc</code> regularly and would like to add in the appropriate settings to get the same behavior in MacVim by default (while also <a href="https://dougblack.io/words/a-good-vimrc.html" rel="nofollow noreferrer">understanding what I am adding</a>). What is unique about the way MacVim is setup related to swap files? Is there a specific combination of the three settings mentioned above or are more settings involved?  How can I set up the same default behavior I have noticed in Vim, NeoVim, and iVim?</p>
  
  <p>I have read the <a href="https://github.com/macvim-dev/macvim/wiki/FAQ" rel="nofollow noreferrer">MacVim FAQ</a> and <a href="https://github.com/macvim-dev/macvim/wiki/Troubleshooting" rel="nofollow noreferrer">Troubleshooting Guide</a> but didn't find any relevant information. </p>