Stop auto adjustment of a closing curly bracket in vim (neovim)

217 Views Asked by At

I currently use neovim to code in c++ and I have a specific coding style preference when it comes to closing curly brackets, i.e.

int main(){
    return 0;
    }

instead of

int main(){
    return 0;
}

I realize that its uncommon, however, it makes my code a lot more readable for me, so please don't tell me to stop doing that.

Question: How do I stop neovim from moving a closing curly bracket one tab to the left? I am using some plugins with packer, however, I tried disabling all of them and the behavior did not change, so I assume its built into neovim (correct me if I'm wrong).

I have tried using the default indentation options for vim like cindent, smartindent and so on, but they don't seem to change the behavior at all. I am no expert in vim and it seems like that is a feature that nobody wants turned off, so I was completely unsuccessful at looking up the solutions.

0

There are 0 best solutions below