2022-04-27 08:48:35 -07:00
|
|
|
" Elixir filetype plugin
|
|
|
|
" Language: Elixir
|
|
|
|
" Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com>
|
2023-12-27 11:34:28 -07:00
|
|
|
" Last Change: 2023 Dec 27
|
2022-04-27 08:48:35 -07:00
|
|
|
|
|
|
|
if exists("b:did_ftplugin")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let b:did_ftplugin = 1
|
|
|
|
|
2022-08-16 00:53:04 -07:00
|
|
|
let s:save_cpo = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
|
|
|
" Matchit support
|
|
|
|
if exists('loaded_matchit') && !exists('b:match_words')
|
|
|
|
let b:match_ignorecase = 0
|
|
|
|
|
|
|
|
let b:match_words = '\:\@<!\<\%(do\|fn\)\:\@!\>' .
|
|
|
|
\ ':' .
|
|
|
|
\ '\<\%(else\|catch\|after\|rescue\)\:\@!\>' .
|
|
|
|
\ ':' .
|
|
|
|
\ '\:\@<!\<end\>' .
|
|
|
|
\ ',{:},\[:\],(:)'
|
|
|
|
endif
|
|
|
|
|
2022-09-28 03:48:36 -07:00
|
|
|
setlocal shiftwidth=2 softtabstop=2 expandtab iskeyword+=!,?
|
|
|
|
setlocal comments=:#
|
2022-04-27 08:48:35 -07:00
|
|
|
setlocal commentstring=#\ %s
|
2022-08-16 00:53:04 -07:00
|
|
|
|
2023-12-27 11:06:20 -07:00
|
|
|
setlocal indentkeys=0#,!^F,o,O
|
|
|
|
" Enable keys for blocks
|
|
|
|
setlocal indentkeys+=0=after,0=catch,0=do,0=else,0=end,0=rescue
|
|
|
|
" Enable keys that are usually the first keys in a line
|
|
|
|
setlocal indentkeys+=0->,0\|>,0},0],0),>
|
|
|
|
|
2023-12-27 11:34:28 -07:00
|
|
|
let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< indk<'
|
2022-09-28 03:48:36 -07:00
|
|
|
|
2022-08-16 00:53:04 -07:00
|
|
|
let &cpo = s:save_cpo
|
|
|
|
unlet s:save_cpo
|