Skip to Content

Vim - Retab

Posted on

Sometime I copy and paste code from source file to destination file, but it copies space/tabs too. The most common case is Source file uses tab = 4 spaces and I need to use tab = 2 spaces in destination file.

Today I found the way to convert tab to space =))

:set tabstop=2 shiftwidth=2 expandtab | retab


comments powered by Disqus