C- = ascii : ^[[61;5u. Emacs, :
(global-set-key (kbd "C-=") 'djhaskin987-untab-to-tab-stop))
, :
(use-package expand-region
:ensure t
:bind (("C-=" . er/expand-region)))
I want to thank Sam Brightman for his wonderful decision. This is a very clean, albeit complex, approach that will work for any keys that cannot be sent using regular ASCII codes. I have long wanted to get C-TAB to work inside iterm2 for a long time. I was able to do this by removing the built-in settings keys for C-TAB / C-S-TAB and using its approach. Using the following, I can connect to remote Linux blocks and quickly switch between many open buffers in projects, like a desktop editor.

(use-package nswbuff
:defer 1
:after (projectile)
:commands (nswbuff-switch-to-previous-buffer
nswbuff-switch-to-next-buffer)
:config
(progn
(my/global-map-and-set-key "C-TAB" 'nswbuff-switch-to-previous-buffer)
(my/global-map-and-set-key "C-S-TAB" 'nswbuff-switch-to-next-buffer))
:init
(setq nswbuff-display-intermediate-buffers t
nswbuff-exclude-buffer-regexps '("^ "
"^\*.*\*"
"\*Treemacs.*\*"
"^magit.*:.+")
nswbuff-include-buffer-regexps '("^*Org Src")
nswbuff-start-with-current-centered t
nswbuff-buffer-list-function '(lambda ()
(interactive)
(if (projectile-project-p)
(nswbuff-projectile-buffer-list)
(buffer-list)))))
source
share