summaryrefslogtreecommitdiffstats
path: root/ftplugin/crystal.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/crystal.vim')
-rw-r--r--ftplugin/crystal.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim
index c23d93f6..441e069f 100644
--- a/ftplugin/crystal.vim
+++ b/ftplugin/crystal.vim
@@ -5,6 +5,11 @@ if exists('b:did_ftplugin')
endif
let b:did_ftplugin = 1
+" This file is loaded on 'ecrystal' filetype
+if &filetype !=# 'crystal'
+ finish
+endif
+
let s:save_cpo = &cpo
set cpo&vim
@@ -76,6 +81,11 @@ if &l:ofu ==# ''
setlocal omnifunc=crystal_lang#complete
endif
+if exists('AutoPairsLoaded')
+ let b:AutoPairs = { '{%': '%}' }
+ call extend(b:AutoPairs, g:AutoPairs, 'force')
+endif
+
let &cpo = s:save_cpo
unlet s:save_cpo