shada.vim 414 B

12345678910111213141516171819
  1. if exists('b:did_ftplugin')
  2. finish
  3. endif
  4. let b:did_ftplugin = 1
  5. function! ShaDaIndent(lnum)
  6. if a:lnum == 1 || getline(a:lnum) =~# '\mwith timestamp.*:$'
  7. return 0
  8. else
  9. return shiftwidth()
  10. endif
  11. endfunction
  12. setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
  13. setlocal indentexpr=ShaDaIndent(v:lnum) indentkeys=<:>,o,O
  14. let b:undo_ftplugin = 'setlocal et< ts< sts< sw< indentexpr< indentkeys<'