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

Auto add """ for python string. #173

Closed introom closed 10 years ago

introom commented 10 years ago

This is more a language specific feature request, but I believe adding this functionality will benefit lots of people while not affecting the remaining. For python module/class doc, """, or ''' is used. Currently delimiteMate doesn't support the completion of"""some words""" once the first part """ appeared.

rougeth commented 10 years ago

+1 for that, and support not just """ but ''' to.

introom commented 10 years ago

After a second thought on this, I think for language specific stuff, it would be better to use other plugins like ultisnips and add a snippet template for """ or '''.

michaelmior commented 10 years ago

The problem is that it's not possible to type """ in sequence with delimitMate installed. When you try, you end up with ""x" where x represents the cursor position. If you try to type another quote, it just assume you're closing one of the previous quotes.

Raimondi commented 10 years ago

See :help 'delimitMate_nesting_quotes'. Might not be the best name for that option, but it's there and it seems to do the job.