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

disable the feature that typing closing delimiter or quote jumps out of the delimiters or quotes #219

Closed Naitreey closed 9 years ago

Naitreey commented 9 years ago

Suppose I have the following block:

{
        {

        }
}

I then accidentally deleted the line containing inner closing brace (| is cursor position):

{
        {
                |
}

On the remaining empty line (the third line above), I went into Insert Mode by S, and wanted to add a } on the line. Instead of a } char being added on the line, the cursor was reset to next to outer closing brace:

{
        {

}|

Is this issue caused by the feature that typing closing delimiter (}) jumps out of the delimiter scope? If true, is there an option/method to disable this feature?

Raimondi commented 9 years ago

See :help 'delimitMate_jump_expansion.

Naitreey commented 9 years ago

Thank you for your response. How did I miss it? I actually read through the whole help doc, including the fancy ascii arts at the beginning and end of it...

Naitreey commented 9 years ago

There is another related issue: as my title said, I want to disable the feature that typing closing delimiter jumps out of the delimiters. And I only want my mapping of <Plug>delimitMateS-Tab to do this job. Is it possible?

For example, if I have the following delimiters and | is cursor position:

(| )

And I want to insert a right parenthesis at the cursor position. But typing ) will jumps out of the parenthesis pair altogether:

( )|

Can I disable this feature?