I’m starting to do a lot of coding with vim, particularly C. While I’ve added some tricks to my vimrc file for code colour formatting, line numbers, etc., I’m wondering if there’s a way to achieve the following functionality:
This –
int main() {
becomes this –
int main() {
}
Does anyone have any ideas or suggestions? I’ll give anything a try as long as it saves me from forgetting another bracket ever again!
There are a bunch of plugins for doing that “smartly”: autoclose, closepairs, others… I use delimitmate.
But you can also go the lo-tech way: