summaryrefslogtreecommitdiff
path: root/doc/detectindent.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/detectindent.txt')
-rw-r--r--doc/detectindent.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/doc/detectindent.txt b/doc/detectindent.txt
new file mode 100644
index 0000000..524b8b6
--- /dev/null
+++ b/doc/detectindent.txt
@@ -0,0 +1,60 @@
+*detectindent.txt* The Detect Indent Plugin 1.0, Jan 04, 2005
+
+Author: Ciaran McCreesh <ciaran.mccreesh at googlemail.com>
+
+==============================================================================
+1. Contents *detectindent* *detectindent-contents*
+
+ 1. Contents |detectindent-contents|
+ 2. :DetectIndent Command |:DetectIndent|
+ Settings |detectindent-settings|
+ 3. Uptime ChangeLog |uptime-changelog|
+
+==============================================================================
+2. :DetectIndent Command *:DetectIndent*
+
+ The :DetectIndent command tries to intelligently set the 'shiftwidth',
+ 'expandtab' and 'tabstop' options based upon the existing settings in
+ use in the active file.
+
+ Settings *detectindent-settings*
+
+ When the correct value for 'expandtab' cannot be determined, it will
+ usually retain its existing value. To specify that 'expandtab' should
+ be used where autodetection is impossible, set: >
+ :let g:detectindent_preferred_expandtab = 1
+< in your |vimrc| file.
+
+ To set a preferred value for 'shiftwidth' and 'tabstop' when they
+ cannot be automatically detected, set: >
+ :let g:detectindent_preferred_indent = 4
+< in your |vimrc| file.
+
+ To use the preferred values when both tabs and spaces are detected,
+ set: >
+ :let g:detectindent_preferred_when_mixed = 1
+< in your |vimrc| file.
+
+ To set limit for number of lines that will be analysed set: >
+ :let g:detectindent_max_lines_to_analyse = 1024
+< in your |vimrc| file.
+
+ To override |detectindent_preferred_expandtab| for specific filetypes
+ (example: use 4-character tabstops with tabs for python) set: >
+ :let b:detectindent_preferred_expandtab = 0
+ :let b:detectindent_preferred_indent = 4
+< after/ftplugin/FILETYPENAMEHERE.vim (example:
+ after/ftplugin/python.vim). Using 0 acts as if the option was never
+ set.
+
+==============================================================================
+3. DetectIndent ChangeLog *detectindent-changelog*
+
+ v1.1 (20150225)
+ * Add preferred_when_mixed.
+ * Add buffer-local options.
+ v1.0 (20050105)
+ * initial release after discussion on irc.freenode.net:#vim
+
+==============================================================================
+vim:tw=78:ts=8:ft=help