Skip to content

Commit ad5a387

Browse files
committed
remove starts_with_comment indent handler.
Fixes #367
1 parent e4e68da commit ad5a387

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

autoload/elixir/indent.vim

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function! elixir#indent#indent(lnum)
2626
\'starts_with_close_bracket',
2727
\'starts_with_binary_operator',
2828
\'inside_block',
29-
\'starts_with_comment',
3029
\'starts_with_end',
3130
\'inside_generic_block',
3231
\'follow_prev_nb'
@@ -213,14 +212,6 @@ function! elixir#indent#handle_starts_with_pipe(lnum, text, prev_nb_lnum, prev_n
213212
endif
214213
endfunction
215214

216-
function! elixir#indent#handle_starts_with_comment(_lnum, text, prev_nb_lnum, _prev_nb_text)
217-
if match(a:text, '^\s*#') != -1
218-
return indent(a:prev_nb_lnum)
219-
else
220-
return -1
221-
endif
222-
endfunction
223-
224215
function! elixir#indent#handle_starts_with_end(lnum, text, _prev_nb_lnum, _prev_nb_text)
225216
if s:starts_with(a:text, s:keyword('end'), a:lnum)
226217
let pair_lnum = searchpair(s:keyword('do\|fn'), '', s:keyword('end').'\zs', 'bnW', "line('.') == " . line('.') . " || elixir#indent#searchpair_back_skip()")

spec/indent/comment_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def run do
1717
list =
1818
File.read!("/path/to/file")
1919
|> String.split()
20-
# now start a new line
21-
# used to start here
22-
# but now starts here
20+
# now start a new line
21+
# used to start here
22+
# but now starts here
2323
end
2424
end
2525
EOF

0 commit comments

Comments
 (0)