rstudio/rstudio — pull request #167 by kevinushey (2014-10-05 21:11:47+00:00)
Title: Feature/cpp indentation

This PR brings better indentation rules for C/C++ modes in the IDE. It's not completely finished (I rely too much on heuristics / regexes vs. token walking) but it does surprisingly well (given the automated tests).

I've tried using this to re-indent e.g. code within the RStudio sources as well as Rcpp itself, and it does a good job overall -- there are still some hiccups for 'irregular' code that would be fixed by better token walking, but it does a good job of handling the 'common' indentation styles.

The best way to play around with this PR is to open the `src/gwt/test/autoindent_test_cpp.html` file and play around / see what succeeds and fails.