vim.in 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. " vim: set ft=vim sw=4 :
  2. " START_INDENT
  3. func Some()
  4. let x = 1
  5. endfunc
  6. let cmd =
  7. \ 'some '
  8. \ 'string'
  9. if 1
  10. let x = [
  11. \ ]
  12. endif
  13. " TODO: add searchpair() to find matching {
  14. "for x in [
  15. "{
  16. "key: 'value'
  17. "},
  18. "]
  19. "eval 0
  20. "endfor
  21. for x in [
  22. {key: 'value'},
  23. ]
  24. eval 0
  25. endfor
  26. let t = [
  27. \ {
  28. \ 'k': 'val',
  29. \ },
  30. \ ]
  31. def Func()
  32. var d = dd
  33. ->extend({
  34. })
  35. eval 0
  36. enddef
  37. " END_INDENT
  38. " START_INDENT
  39. " INDENT_EXE let g:vim_indent_cont = 6
  40. let cmd =
  41. \ 'some '
  42. \ 'string'
  43. " END_INDENT
  44. " START_INDENT
  45. " INDENT_EXE let g:vim_indent_cont = 5
  46. let list = [
  47. \ 'one',
  48. \ 'two']
  49. " END_INDENT
  50. " START_INDENT
  51. " INDENT_EXE unlet g:vim_indent_cont
  52. let list = [
  53. 'one',
  54. 'two',
  55. ]
  56. echo
  57. " END_INDENT
  58. " START_INDENT
  59. " INDENT_AT this-line
  60. func Some()
  61. let f = x " this-line
  62. endfunc
  63. " END_INDENT
  64. " START_INDENT
  65. " INDENT_NEXT next-line
  66. func Some()
  67. " next-line
  68. let f = x
  69. endfunc
  70. " END_INDENT
  71. " START_INDENT
  72. " INDENT_PREV prev-line
  73. func Some()
  74. let f = x
  75. " prev-line
  76. endfunc
  77. " END_INDENT
  78. " START_INDENT
  79. let a =<< END
  80. nothing
  81. END
  82. " END_INDENT
  83. " START_INDENT
  84. " INDENT_AT this-line
  85. let a=<< trim END
  86. blah
  87. blah
  88. blah this-line
  89. END
  90. " END_INDENT