all repos — nixfiles @ e2f461a316b876501ac9b1528c2c348ff4a150b0

System and user configuration, managed by nix and home-manager

Emacs: improve company tab handling
Alan Pearce alan@alanpearce.eu
Sat, 11 Jan 2020 20:44:12 +0100
commit

e2f461a316b876501ac9b1528c2c348ff4a150b0

parent

2d0f5bf60f72f70296dc55d26b8acb22ebd83f28

1 files changed, 8 insertions(+), 2 deletions(-)

jump to
M user/emacs/.emacs.d/init.eluser/emacs/.emacs.d/init.el
@@ -495,8 +495,14 @@ (global-company-mode +1)             (general-unbind company-active-map
               "RET"
               [return]))
-  :general (:states 'insert
-                    "TAB" #'company-indent-or-complete-common))
+  :general
+  (:states 'insert
+           "TAB" #'company-indent-or-complete-common)
+  (:keymaps 'company-active-map
+            "TAB" #'company-complete-common-or-cycle
+            "<tab>" #'company-complete-common-or-cycle
+            "S-TAB" #'company-select-previous
+            "<backtab>" #'company-select-previous))
 
 (use-package all-the-icons
   :config (setq all-the-icons-color-icons nil))