I use Vim in a C++ code with openmp sentences.
And in my ~/.vimrc
set ai " auto indent
my problem: when I use an openmp sentence (this begins with #) the cursor jumps to the beginning of the line without the auto indent.
Example:
int main()
{
int idx = 100;
#pragma omp parallel private(idx) // jump to begin of line
, when I like this:
int main()
{
int idx = 100;
#pragma omp parallel private(idx) // This is OK
Can I set this in the autoindent in Vim?
Vim puts a line in column 1 when it starts with
#(preprocessor directives), ifcinkeyscontains#.So you can remove
#fromcinkeysto disable this feature: