diff --git a/doc/notes.txt b/doc/notes.txt index fe32a49..eef43be 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -22,6 +22,7 @@ Contents ~ 13. The |g:notes_indexscript| option 14. The |g:notes_tagsindex| option 15. The |g:notes_markdown_program| option + 16. The |g:notes_shoftwidth| option 4. Commands |notes-commands| 1. The |:Note| command 2. The |:NoteFromSelectedText| command @@ -330,6 +331,13 @@ name of this program is assumed to be simply 'markdown'. If you want to use a different program for Markdown to HTML conversion, set this option to the name of the program. +------------------------------------------------------------------------------- +The |g:notes_shoftwidth| option + +This option lets you choose the indent for lists within nodes. The shiftwidth +and the tabstop will be set to this value, By degault the value is set to 3. + + =============================================================================== *notes-commands* Commands ~ diff --git a/ftplugin/notes.vim b/ftplugin/notes.vim index 238ccc5..2f8abb6 100644 --- a/ftplugin/notes.vim +++ b/ftplugin/notes.vim @@ -5,8 +5,10 @@ if exists('b:did_ftplugin') finish -else - let b:did_ftplugin = 1 +endif + +if !exists('g:notes_tabwidth') + let g:notes_tabwidth = 8 endif " Add dash to keyword characters so it can be used in tags. {{{1 @@ -18,7 +20,7 @@ setlocal autoindent let b:undo_ftplugin = 'set autoindent<' " Set &tabstop and &shiftwidth options for bulleted lists. {{{1 -setlocal tabstop=3 shiftwidth=3 expandtab +execute "setlocal tabstop=".g:notes_tabwidth." shiftwidth=".g:notes_tabwidth." expandtab" let b:undo_ftplugin .= ' | set tabstop< shiftwidth< expandtab<' " Automatic formatting for bulleted lists. {{{1