The second < tab > didn't work like define but jump to the ${2}
Disable Vim SnipMate brackets replacement
-
19-09-2022 - |
Question
In Vim, after I installed vim-snipmates, I want to use this snippet to auto complete brackets.
snippet (
(${1})${2}
But, I encountered a problem, if I input things like this:
The last bracket is completed by the snippet when I input the first ( and tab, and this time when I press tab, I want to add another ) to the end and make things like this:
But, it turns out the Vim thinks I want to input a ) to finish everything, so it replaces the last ), and there is still one ) at the end of the line.
I want to know which plugin did this replacement and how can I disable it.
.vimrc
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "garbas/vim-snipmate"
Bundle "honza/vim-snippets"
I feel it's very hard to describe it.
Solution 2
OTHER TIPS
Rather than using a snippet plugin, say Snipmate, Neosnippet or Ultisnips, the job of auto close parens, brackets or quotes )}]"' is better suited for an autoclose plugin, such as Delimitmate or autopairs.