emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding literal tab to C-Tab


From: Josh
Subject: Binding literal tab to C-Tab
Date: Fri, 6 Mar 2020 00:12:30 -0800 (PST)
User-agent: Alpine 2.21 (LRH 202 2017-01-01)

Hi all,

I have a need to insert literal tab characters into my org-mode files frequently. I would like to bind a key to insert literal tabs (ASCII 9). I thought Control-TAB would be a good option. So I inserted the following lines into my .emacs file. It works when in normal emacs, but not in org-mode. Is there a way to get this to work in org-mode? If this is a bad key combination for org-mode, I'm ok switching to another key combo.

(defun my-insert-tab-char ()
  "Insert a tab char. (ASCII 9, \t)"
  (interactive)
  (insert "\t"))

(global-set-key (kbd "C-<tab>") 'my-insert-tab-char)

Thanks!

Josh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]