4

I would like to automatically add spaces between braces and content when using emacs, for example:

std::vector<std::string> values{"content", "moreContent", "andMoreContent"};

becomes

std::vector<std::string> values{ "content", "moreContent", "andMoreContent" };

when pressing }. I'm already using autopair-mode which automatically pairs braces and quotes. Another example, when declaring variables:

int myVar{5};

becomes

int myVar{ 5 };

How do I do this?

Dan
  • 32,584
  • 6
  • 98
  • 168
jagged
  • 41
  • 2

0 Answers0