0

I just noticed that my current box with vim is missing a crucial feature, but I am unable to bring it back.

A long time ago I had a vim setup where I could press Ctrl+J (IIRC) and then my cursor would jump to the next occurance of <++>. Actually, this was sort of a template system where I could put a name between the + signs, to tell me/the user about the information that has to go there.

For instance I could copy paste the following text to any new document:

Hello <+name+>,
how are you today? I am feeling <+feeling+>.
Hope to hear from you soon
<+signature+>

and then I could Ctrl+J and vim would jump to <+name+> in insert mode and with my typing I would overwrite <+name+>. Then I'd press Ctrl+J again and vim would jump to <+feeling+> in insert mode so that I could overwrite that and so on and so forth.

Does anybody know that functionality and how I can install it on my current machine? I am fairly certain I did not code that myself ...

1 Answer 1

1

I remember two plugins with this feature:

  • vim-latex implements jump on <c-j>.
  • my lh-brackets plugin implements jump on <c-j> with vim, or on <m-del> with gvim -- default keybindings can be changed. mu-template that relies on lh-brackets exploits this feature to implement its placeholders.

PS: I don't provide here the underlying code as it's quite complex, and not that trivial to implement correctly.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.