digitalmars.D.learn - Emacs d-mode indentation, 2 spaces to 4?
- John Gabriele (3/3) Oct 04 2017 I'm using Emacs 25.2.2 with d-mode-20161022.717 on Debian
- =?UTF-8?Q?Ali_=c3=87ehreli?= (8/12) Oct 04 2017 I can't imagine it has its own tab width. d-mode is based on cc-mode.
- John Gabriele (3/16) Oct 05 2017 Thank you, but tried this and it didn't work. Aravinda's solution
- Aravinda VK (6/9) Oct 05 2017 Add below snippet to your .emacs file
- John Gabriele (2/12) Oct 05 2017 That did it! Thanks, Aravinda!
I'm using Emacs 25.2.2 with d-mode-20161022.717 on Debian Testing, and by default this mode indents by 2 spaces. Is there an easy way to configure it to use 4 spaces instead?
Oct 04 2017
On 10/04/2017 09:57 PM, John Gabriele wrote:I'm using Emacs 25.2.2 with d-mode-20161022.717 on Debian Testing, and by default this mode indents by 2 spaces. Is there an easy way to configure it to use 4 spaces instead?I can't imagine it has its own tab width. d-mode is based on cc-mode. Setting the tab width in that mode or in general should work for d-mode as well. Just research tab width for Emacs. If nothing else works and you're happy with a global tab-width of 4, add this to your .emacs file: (setq-default tab-width 4) Ali
Oct 04 2017
On Thursday, 5 October 2017 at 05:22:16 UTC, Ali Çehreli wrote:On 10/04/2017 09:57 PM, John Gabriele wrote:Thank you, but tried this and it didn't work. Aravinda's solution worked though.I'm using Emacs 25.2.2 with d-mode-20161022.717 on Debian Testing, and by default this mode indents by 2 spaces. Is there an easy way to configure it to use 4 spaces instead?I can't imagine it has its own tab width. d-mode is based on cc-mode. Setting the tab width in that mode or in general should work for d-mode as well. Just research tab width for Emacs. If nothing else works and you're happy with a global tab-width of 4, add this to your .emacs file: (setq-default tab-width 4) Ali
Oct 05 2017
On Thursday, 5 October 2017 at 04:57:09 UTC, John Gabriele wrote:I'm using Emacs 25.2.2 with d-mode-20161022.717 on Debian Testing, and by default this mode indents by 2 spaces. Is there an easy way to configure it to use 4 spaces instead?Add below snippet to your .emacs file (add-hook 'd-mode-hook (lambda () (setq c-basic-offset 4) (setq tab-width 4)))
Oct 05 2017
On Thursday, 5 October 2017 at 08:49:30 UTC, Aravinda VK wrote:On Thursday, 5 October 2017 at 04:57:09 UTC, John Gabriele wrote:That did it! Thanks, Aravinda!I'm using Emacs 25.2.2 with d-mode-20161022.717 on Debian Testing, and by default this mode indents by 2 spaces. Is there an easy way to configure it to use 4 spaces instead?Add below snippet to your .emacs file (add-hook 'd-mode-hook (lambda () (setq c-basic-offset 4) (setq tab-width 4)))
Oct 05 2017