I am using vim in C ++ code with openmp suggestions. And in my~/.vimrc
set ai " auto indent
my problem: when I use the openmp clause (it starts with #), the cursor jumps to the beginning of the line without automatic indentation.
Example:
int main()
{
int idx = 100;
#pragma omp parallel private(idx)
when i like it
int main()
{
int idx = 100;
#pragma omp parallel private(idx)
ok Can I set this to autoindent in vim?
source
share