vim搜索、替换tab

bibtex 中的缩进可能不一致,强迫症犯了想将:

  • 缩进空格改 tab;
  • 行首的多个 tab 改为单个

参考 [1],空格换 tab 可以:

:set noexpandtab
:%retab!

行首的多个 tab 换单个:

:%s/^\t\+/\t/g

References

  1. Replace tabs with spaces in vim
  2. Regular Expressions

你可能感兴趣的:(latex,vim,latex,bibtex)