sponsor Vim development Vim logo Vim Book Ad

sleuth.vim : Heuristically set buffer options

 script karma  Rating 24/9, Downloaded by 258    Comments, bugs, improvements  Vim wiki

created by
Tim Pope
 
script type
utility
 
description
This plugin automatically adjusts 'shiftwidth' and 'expandtab' heuristically based on the current file, or, in the case the current file is new, blank, or otherwise insufficient, by looking at other files of the same type in the current and parent directories.  In lieu of adjusting 'softtabstop', 'smarttab' is enabled.

Compare to DetectIndent (vimscript #1171).  I wrote this because I wanted something fully automatic.  My goal is that by installing this plugin, you can remove all indenting related configuration from your vimrc.

https://github.com/tpope/vim-sleuth
 
install details
Extract in ~/.vim (~\vimfiles on Windows).
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
sleuth.zip 1.1 2013-01-21 7.0 Tim Pope Support custom tabstop in pure tabs files.
Fix performance issue with globbing for other files.
Skip over POD comments.
sleuth.zip 1.0 2012-12-30 7.0 Tim Pope Initial upload
ip used for rating: 54.211.50.5

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo