Auto-move to beginning of line


I’m not sure how to fix this certain problem. I’ve selected the c++ grammar and when I’m building a linked list and type

class Node

the public: moves to the beginning of the line as soon as you hit the colon button. I’m not sure how to fix this .


If you’re familiar with how to edit the Atom configuration file, you can add these lines to it:

    decreaseIndentPattern: '(?x)
       ^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\}
      |^ \\s* (\\s* /[*] .* [*]/ \\s*)* \\)
      |^ \\s* @(public|private|protected) \\s* $

This takes the editor.decreaseIndentPattern from the language-c package and removes the rule that decreases the indentation on lines containing public:, private:, or protected: