Reputation: 1236
When I write C++ code in emacs, there is a problem:
template <typename ROLE_BASIC_ARRAY, typename Index0T,
..........typename Index1T = NullIndex1<typename
but I want to indent like this:
template <typename ROLE_BASIC_ARRAY, typename Index0T,
....typename Index1T = NullIndex1<typename
How can I configure my emacs ? thanks.
Upvotes: 1
Views: 3144
Reputation: 1286
Here is how you should do it
(setq-default c-basic-offset 4)
Reference: http://www.emacswiki.org/emacs/IndentingC
Upvotes: 4
Reputation: 1236
done used code:
(c-add-style "microsoft"
'("stroustrup"
(c-offsets-alist
(innamespace . -)
(inline-open . 0)
(inher-cont . c-lineup-multi-inher)
(arglist-cont-nonempty . +)
(template-args-cont . +))))
(setq c-default-style "microsoft")
http://www.emacswiki.org/emacs/IndentingC
Upvotes: 0