Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Oct 4, 2012
  1. Use the documented global setting when the file is ambiguous

    The documented setting, 'g:guessindent_prefer_tabs' was
    non-functional in favor of a differently named setting. Now the
    code agrees with the documentation.
  2. Set softtabstop=0 when noexpandtab is set

    softtabstop is useful when expandtab is set because it makes the
    tab key a useful tool for indenting. When noexpandtab is set,
    it causes the tab, >, and < keys to insert mixed spaces for
    indentation which isn't a useful behavior. Setting to 0 disables
    this and allows true tab characters to be used.
    Fixes #1
Commits on Oct 1, 2012
  1. Add a README

  2. Move to new filename

  3. Make the indentation guessing much less invasive.

    1.  Never set tabstop: just let the default from vimrc take priority.
        The only interesting case is when leading tabs and spaces are
        mixed, and in my experience the only sane guess in that situation
        is "4". This change removes the need for
    2.  Count how many times we see leading tabs vs. leading spaces, so
        that we can make a better guess about what the file is using.
        This change makes g:detectindent_preferred_expandtab just a
        hint as to which setting to lean towards when guessing.
    3.  If we don't see any leading tabs or spaces, don't do anything.
        Users can set filetype defaults easily for this kind of
        situation anyways.
Commits on Jun 26, 2011
  1. @ciaranm

    Merge pull request #9 from jonasb/master

    ciaranm authored
    Made some minor improvements
Commits on Jun 23, 2011
  1. @jonasb

    Add the line number of the shortest leading spaces to the verbose out…

    jonasb authored
    …put for debugging purposes
  2. @jonasb
  3. @jonasb

    Add support for Java

    jonasb authored
Commits on May 23, 2011
  1. @ciaranm

    Merge pull request #8 from blueyed/patch-1

    ciaranm authored
    Fix verbose_msg for no spaces/tabs.
  2. @blueyed

    Fix verbose_msg for no spaces/tabs.

    blueyed authored
    Also, use "and" in general for these messages.
Commits on May 19, 2011
  1. @ciaranm

    Merge pull request #7 from blueyed/command-with-bar

    ciaranm authored
    Add `-bar` to definition of `:DetectIndent`.
  2. @blueyed

    Add `-bar` to definition of `:DetectIndent`.

    blueyed authored
    This will allow to use the bar (`|`) after the command, which comes in
    handy in a custom mapping.
Commits on Mar 28, 2011
  1. @blueyed

    Improve verbosity.

    blueyed authored
      - Output internal states (`has_leading_tabs`, `has_leading_spaces`,
        `shortest_leading_spaces_run`, `longest_leading_spaces_run`).
      - Show differences from internal buffer values for &et, &sw, &ts and
Commits on Mar 23, 2011
  1. @blueyed
Commits on Mar 20, 2011
  1. @blueyed

    Be more verbose.

    blueyed authored
    This adds a new setting g:detectindent_verbosity (default: 1) and lets
    the plugin be more chatty if &verbose is >= this setting.
Commits on Oct 12, 2010
  1. @brandonaaron
Commits on Aug 10, 2009
  1. @suokko @ciaranm

    Limit number of lines that are analysed to improve oepning speed if f…

    suokko authored ciaranm committed
    …ile is very large.
    Default number of lines to analyse is 1024. Default can be changed with g:detectindent_max_lines_to_analyse variable.
    Signed-off-by: Pauli Nieminen <>
Commits on Jul 14, 2009
  1. @jamessan
  2. @jamessan
  3. @jamessan
  4. @jamessan
  5. @jamessan

    Ignore whitespace only lines.

    jamessan authored
    Paying attention solely to lines with actual content should improve the
    heuristics as those lines are more likely to be paid due attention.  Lines of
    pure whitespace probably go unnoticed by most people and are therefore less
    likely to follow the proper indent style.
  6. @jamessan

    Correct line index bug in “skip comments” loop.

    jamessan authored
    Since the loop was retrieving the next line to examine before advancing the
    line index, the index ended up being two lines past the end of the comment
    instead of the expected one line.
Commits on Jul 9, 2009
  1. @ciaranm


    ciaranm authored
Something went wrong with that request. Please try again.