matlab.in 935 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. % vim: set ft=matlab sw=4 :
  2. % START_INDENT
  3. if true
  4. disp foo
  5. elseif false
  6. disp bar
  7. end
  8. % END_INDENT
  9. % START_INDENT
  10. try
  11. statements
  12. catch exception
  13. statements
  14. end
  15. % END_INDENT
  16. % START_INDENT
  17. if true, ...
  18. if true
  19. disp hello
  20. end
  21. end
  22. % END_INDENT
  23. % START_INDENT
  24. switch a
  25. case expr
  26. if true, foo; end
  27. disp hello
  28. otherwise
  29. disp bar
  30. end
  31. % END_INDENT
  32. % START_INDENT
  33. if true
  34. A(1:end - 1)
  35. C{1:end - 1}
  36. disp foo
  37. end
  38. % END_INDENT
  39. % START_INDENT
  40. A = [{
  41. }
  42. ] ...
  43. disp foo
  44. disp bar
  45. % END_INDENT
  46. % START_INDENT
  47. if true
  48. % end
  49. %% end
  50. disp foo
  51. end
  52. % END_INDENT
  53. % START_INDENT
  54. % INDENT_EXE let b:MATLAB_function_indent = 0
  55. function foo
  56. disp foo
  57. function nested
  58. disp bar
  59. end
  60. end
  61. % END_INDENT
  62. % START_INDENT
  63. % INDENT_EXE let b:MATLAB_function_indent = 1
  64. function foo
  65. disp foo
  66. function nested
  67. disp bar
  68. end
  69. end
  70. % END_INDENT
  71. % START_INDENT
  72. % INDENT_EXE let b:MATLAB_function_indent = 2
  73. function foo
  74. disp foo
  75. function nested
  76. disp bar
  77. end
  78. end
  79. % END_INDENT