user2427770
user2427770

Reputation: 130

Vim: How set a trigger function after input the symbol?

I want set a trigger function for input symbol, but not an ':abbreviate'.

For example, a user wrote:

function a(b) ^----- at this moment I want insert ' (' instead of '('

Upvotes: 0

Views: 101

Answers (1)

qiubix
qiubix

Reputation: 1332

If you want to add space before ( every time you type (, you can remap it. Add to your .vimrc the following line:

inoremap ( (<Left> <Esc>A

Upvotes: 1

Related Questions