chr4 / nginx.vim

Improved nginx vim plugin (incl. syntax highlighting)
450 stars 41 forks source link

Reindentation adds extra tab on `# comments` for the next line #21

Open Znuff opened 2 years ago

Znuff commented 2 years ago

This has been bugging me for a while now, let's say you have the following config:

http {
  server {
    listen 80; # moo
    listen 443 ssl;

    server_name test;
  }
}

And you want to reindent the file with vim, by doing gg=G, this syntax will move every next line after the comment by a tab, for some reasons, and it will turn into:

http {
  server {
    listen 80; # moo
      listen 443 ssl;

    server_name test;
  }
}