Mercurial > vim
annotate runtime/ftplugin/elixir.vim @ 34872:d8c90ada53f5
Added tag v9.1.0302 for changeset 23dc393eadc70893fb2ba0a451f3ae85eed0d945
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 10 Apr 2024 22:45:03 +0200 |
parents | 9552a4f3d0b5 |
children |
rev | line source |
---|---|
28620 | 1 " Elixir filetype plugin |
2 " Language: Elixir | |
3 " Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com> | |
34030
9552a4f3d0b5
runtime(elixir): missing undo_ftplugin for indentkeys
Christian Brabandt <cb@256bit.org>
parents:
34024
diff
changeset
|
4 " Last Change: 2023 Dec 27 |
28620 | 5 |
6 if exists("b:did_ftplugin") | |
7 finish | |
8 endif | |
9 let b:did_ftplugin = 1 | |
10 | |
29756 | 11 let s:save_cpo = &cpo |
12 set cpo&vim | |
13 | |
14 " Matchit support | |
15 if exists('loaded_matchit') && !exists('b:match_words') | |
16 let b:match_ignorecase = 0 | |
17 | |
18 let b:match_words = '\:\@<!\<\%(do\|fn\)\:\@!\>' . | |
19 \ ':' . | |
20 \ '\<\%(else\|catch\|after\|rescue\)\:\@!\>' . | |
21 \ ':' . | |
22 \ '\:\@<!\<end\>' . | |
23 \ ',{:},\[:\],(:)' | |
24 endif | |
25 | |
30547 | 26 setlocal shiftwidth=2 softtabstop=2 expandtab iskeyword+=!,? |
27 setlocal comments=:# | |
28620 | 28 setlocal commentstring=#\ %s |
29756 | 29 |
34024
5491229840a3
runtime(elixir): fix indentation (#13771)
Christian Brabandt <cb@256bit.org>
parents:
30547
diff
changeset
|
30 setlocal indentkeys=0#,!^F,o,O |
5491229840a3
runtime(elixir): fix indentation (#13771)
Christian Brabandt <cb@256bit.org>
parents:
30547
diff
changeset
|
31 " Enable keys for blocks |
5491229840a3
runtime(elixir): fix indentation (#13771)
Christian Brabandt <cb@256bit.org>
parents:
30547
diff
changeset
|
32 setlocal indentkeys+=0=after,0=catch,0=do,0=else,0=end,0=rescue |
5491229840a3
runtime(elixir): fix indentation (#13771)
Christian Brabandt <cb@256bit.org>
parents:
30547
diff
changeset
|
33 " Enable keys that are usually the first keys in a line |
5491229840a3
runtime(elixir): fix indentation (#13771)
Christian Brabandt <cb@256bit.org>
parents:
30547
diff
changeset
|
34 setlocal indentkeys+=0->,0\|>,0},0],0),> |
5491229840a3
runtime(elixir): fix indentation (#13771)
Christian Brabandt <cb@256bit.org>
parents:
30547
diff
changeset
|
35 |
34030
9552a4f3d0b5
runtime(elixir): missing undo_ftplugin for indentkeys
Christian Brabandt <cb@256bit.org>
parents:
34024
diff
changeset
|
36 let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< indk<' |
30547 | 37 |
29756 | 38 let &cpo = s:save_cpo |
39 unlet s:save_cpo |