1
0
Fork 0
bascht.com/content/tech/2010-05-05-skip-closing-bra...

13 lines
696 B
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Skip closing Brackets in VIM
---
<p>I love VIM and I recently stumbled upon a feature that you probably know <br>from TextMate: Skip the Closing bracket when typing. </p>
<p></p> Sure. VIM can do that. <p></p>
<div class="CodeRay">
<div class="code"><pre>inoremap ( () inoremap ) strpart(getline('.'), col('.')-1, 1) == ")" ? "\" : ")"</pre></div>
</div>
<p><br>This just skips the closing bracket and you can go on typing without <br>having to leave insert mode or do some awkward Emacs movements. </p>
<p></p> Found at <a href="http://vim.wikia.com/wiki/Automatically_append_closing_characters">http://vim.wikia.com/wiki/Automatically_append_closing_characters</a>
<p> </p>