3

From :h cino-(, I see that we can only indent the parameters for the function calls with respect to the opening bracket. This is problematic for functions with long names or within multiple namespaces. For example, with cino+=(0, I get this atrocity:

  void Load(int, char**)
  {
    this->connections.push_back(
                                event::Events::ConnectPreRender(
                                                                std::bind(&SystemGUI::Update, this)));
  }

I want something sane like this:

    void Load(int /*_argc*/, char ** /*_argv*/)
    {
      this->connections.push_back(
          event::Events::ConnectPreRender(
            std::bind(&SystemGUI::Update, this)));
    }
3
  • 1
    According to the documentation, the indentation is added from the line with the unclosed parenthesis (not with respect to the opening bracket), and that seems to be the behavior you're seeing in your first example. Maybe something like (4 or (1s gives a better result in your case.
    – r_31415
    Commented Jun 16, 2022 at 17:04
  • 1
    @RobertSmith turn that into an answer, please :)
    – D. Ben Knoble
    Commented Jun 16, 2022 at 17:42
  • @D.BenKnoble Here you go :)
    – r_31415
    Commented Jun 16, 2022 at 17:53

1 Answer 1

2

According to the documentation, the indentation is added from the line with the unclosed parenthesis (not with respect to the opening bracket), and that seems to be the behavior you're seeing in your first example.

Maybe something like (4 or (1s gives a better result in your case.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.