Author Topic: Emacs indentation  (Read 1286 times)

0 Members and 1 Guest are viewing this topic.

JohnSnow

  • Newt
  • Posts: 52
Emacs indentation
« on: September 10, 2018, 07:06:38 PM »
Hi Guys.
Just wondering if anyone uses Emacs that can help me with the indentation.
The Indentation I want is as below.
(defun c:test()
    (...) ;tab when a new structure starts
);in line with function defun







JohnK

  • Administrator
  • Seagull
  • Posts: 10646
Re: Emacs indentation
« Reply #1 on: September 11, 2018, 07:51:27 AM »
From here: http://ergoemacs.org/emacs/emacs_tabs_space_indentation_setup.html

Looks as though there is no way to always use TAB but you can use a workaround.
Code - Lisp: [Select]
  1. (defun my-insert-tab-char ()
  2.   "Insert a tab char. (ASCII 9, \t)"
  3.   (interactive)
  4.   (insert "\t"))
  5.  
  6. (global-set-key (kbd "TAB") 'my-insert-tab-char) ; same as Ctrl+i

BTW, why TAB?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org