« Back to blog

Re-tab the current document in vim

Often when editing an old file it's useful to re-tab the document based on your current preferences.  My current vim tabbing preferences are:

Based on this, I was able to very easily fix an entire document using :retab. I was happy to find I didn't need to install yet another plugin to do this.

Read more at: http://vim.wikia.com/wiki/Converting_tabs_to_spaces