Bram Moolenaar | ce001a3 | 2022-04-27 15:25:03 +0100 | [diff] [blame] | 1 | " Elixir filetype plugin |
| 2 | " Language: Elixir |
| 3 | " Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com> |
Christian Brabandt | d1cea03 | 2023-12-27 19:30:41 +0100 | [diff] [blame] | 4 | " Last Change: 2023 Dec 27 |
Bram Moolenaar | ce001a3 | 2022-04-27 15:25:03 +0100 | [diff] [blame] | 5 | |
| 6 | if exists("b:did_ftplugin") |
| 7 | finish |
| 8 | endif |
| 9 | let b:did_ftplugin = 1 |
| 10 | |
Bram Moolenaar | e1f3fd1 | 2022-08-15 18:51:32 +0100 | [diff] [blame] | 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 | |
Bram Moolenaar | 9fbdbb8 | 2022-09-27 17:30:34 +0100 | [diff] [blame] | 26 | setlocal shiftwidth=2 softtabstop=2 expandtab iskeyword+=!,? |
| 27 | setlocal comments=:# |
Bram Moolenaar | ce001a3 | 2022-04-27 15:25:03 +0100 | [diff] [blame] | 28 | setlocal commentstring=#\ %s |
Bram Moolenaar | e1f3fd1 | 2022-08-15 18:51:32 +0100 | [diff] [blame] | 29 | |
George GuimarĂ£es | 7e27411 | 2023-12-27 15:06:05 -0300 | [diff] [blame] | 30 | setlocal indentkeys=0#,!^F,o,O |
| 31 | " Enable keys for blocks |
| 32 | setlocal indentkeys+=0=after,0=catch,0=do,0=else,0=end,0=rescue |
| 33 | " Enable keys that are usually the first keys in a line |
| 34 | setlocal indentkeys+=0->,0\|>,0},0],0),> |
| 35 | |
Christian Brabandt | d1cea03 | 2023-12-27 19:30:41 +0100 | [diff] [blame] | 36 | let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< indk<' |
Bram Moolenaar | 9fbdbb8 | 2022-09-27 17:30:34 +0100 | [diff] [blame] | 37 | |
Bram Moolenaar | e1f3fd1 | 2022-08-15 18:51:32 +0100 | [diff] [blame] | 38 | let &cpo = s:save_cpo |
| 39 | unlet s:save_cpo |