summaryrefslogtreecommitdiffstats
path: root/ftplugin/eelixir.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/eelixir.vim')
-rw-r--r--ftplugin/eelixir.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/ftplugin/eelixir.vim b/ftplugin/eelixir.vim
index 61a59a05..cda21c9b 100644
--- a/ftplugin/eelixir.vim
+++ b/ftplugin/eelixir.vim
@@ -27,7 +27,10 @@ if !exists("b:eelixir_subtype")
let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+')
endif
if b:eelixir_subtype == ''
- let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
+ let b:eelixir_subtype = matchstr(&filetype,'^sface\.\zs\w\+')
+ endif
+ if b:eelixir_subtype == ''
+ let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.sface\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$')
endif
if b:eelixir_subtype == 'ex'
let b:eelixir_subtype = 'elixir'
@@ -97,6 +100,10 @@ if !exists('b:surround_35')
" When using surround `#` (ASCII 35) would provide `<%# selection %>`
let b:surround_35 = "<%# \r %>"
endif
+if !exists('b:surround_123')
+ " When using surround `{` (ASCII 123) would provide `{{ selection }}`
+ let b:surround_123 = "{{ \r }}"
+endif
if !exists('b:surround_5')
" When using surround `<C-e>` (ASCII 5 `ENQ`) would provide `<% selection %>\n<% end %>`
let b:surround_5 = "<% \r %>\n<% end %>"