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

Skipping over whitespace (#95) is bad #130

Closed lilyball closed 11 years ago

lilyball commented 11 years ago

I just updated my delimitMate (yeah it's been a while), and the new behavior introduced by the "fix" for #95 is terrible. It assumes that I always keep all my delimiters balanced at all times, and therefore trying to type a close-delimiter should always try to jump if possible. But writing code is not ideal, and my delimiters aren't always balanced. If I have psueod-code like

loop {
    doSomething();

    another_loop {
        code
        more code
        even more code here
    |
}

(where | is the cursor), then pressing } jumps past the final } instead of inserting the much-needed close-brace.

The only time I ever expect a delimiter to be jumped-past is when my cursor is already at the delimiter. Any other time, it should just insert the delimiter that I requested.

lilyball commented 11 years ago

Excellent, thank you