Quantcast
Channel: Programming Archives - SysTutorials
Viewing all articles
Browse latest Browse all 130

How to make Vim indent C++11 lambdas correctly?

$
0
0

Vim seems not indent C++11 lambas very well. How to make Vim indent C++11 lambdas correctly? For this following program, Vim indents it as #include <iostream> #include <string> #include <vector> #include <algorithm> int main () { std::vector<std::string> strs({"one", "two"}); std::vector<std::string> newstrs; std::transform(strs.begin(), strs.end(), std::back_inserter(newstrs), [](const std::string& s) -> std::string { if (s == "one") { […]

The post How to make Vim indent C++11 lambdas correctly? appeared first on SysTutorials.


Viewing all articles
Browse latest Browse all 130

Trending Articles