Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

Is there a way to set "matchpair" / autocomplete for strings? example for loops? #192

Closed mike-pt closed 9 years ago

mike-pt commented 10 years ago

For example "do:end" etc?

Sorry if this is in the docs, will be honest its my first time with delimitMate and from what I read I could see out to do it...

delimitMate_matchpairs = "do:end" doesn't work for example!

mike-pt commented 10 years ago

actually it does work, does this seem right?

let delimitMate_matchpairs = "(:),[:],{:},<:>" au FileType ruby,eruby let b:delimitMate_matchpairs = "(:),[:],{:},<:>,do:end"

the only issue seems to be that g:delimitMate_expand_c and space do not work fro "do end" only the others!

vheon commented 9 years ago

@mike-pt try tpope/vim-endwise for do end. And load it after delimitMate

Raimondi commented 9 years ago

This plugin handles single characters only, I have no idea what issues you might find when using strings instead and they will not be supported in the future.

mike-pt commented 9 years ago

no worries @Raimondi the referred plugin does it but honestly doing that for do end or such is no my very useful as I initially thought. thanks