sleuth.vim : Heuristically set buffer options
| script karma
Downloaded by 2394
Comments, bugs, improvements
script versions (upload new version)
|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.
|Extract in ~/.vim (~\vimfiles on Windows).|
Click on the package to download.
ip used for rating: 220.127.116.11
||Add option to limit number of other files checked, defaulting to 20.
Add global and local options to disable automatic detection.
Provide :Sleuth for manual detection.
Add indicator for flagship.vim.
Skip over Python style triple quoted strings.
Skip over XML/HTML style comments.
Skip over backtick quoted strings in Go files only.
Avoid activating on help buffers.
Check vimrc when sleuthing under Vim filetype.
Disallow odd 'shiftwidth' values greater than 3.
||Support custom tabstop in pure tabs files.
Fix performance issue with globbing for other files.
Skip over POD comments.