From 4be4ad2c865cb6208d1b2b5eb955540e707145e2 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 16 Feb 2016 11:17:36 +0100 Subject: [tabs] try to detect indentation at each buffer... (well.. it tries..) --- doc/detectindent.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 doc/detectindent.txt (limited to 'doc') 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 + +============================================================================== +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 -- cgit v1.2.3