0

I'm currently using pear-tree as an automatic brackets closing plugin. So when I type, for example:

print(

I get

print(|)

The functionality I'm looking for is to get the cursor out of the brackets as soon as I hit the spacebar. So:

print(SOMEVAR|)

~ hitting the spacebar ~

print(SOMEVAR)|

Obviously I don't mind using any other plugin or custom made edit / script in my .vmrc. The only (quite primitive solution I can think of, but not sure how to implement, is an 'if' statement that will temporarily remap the spacebar somehow in case I'm inside brackets, but I'm sure there's a better solution).

Thanks.

  • 2
    Most bracket-plugins will get you out of the current pair if you type its closing character that is next the cursor, in your example: ). In lh-bracket I also have a mapping that makes me jump after all the direct next closing characters (<Meta-end> in gvim, <C-L>$ in vim). – Luc Hermitte Nov 15 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.