summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-08-09 04:17:59 +0300
committerThanos Apollo <[email protected]>2023-08-09 04:17:59 +0300
commit5f17475253c3af28d62200f36dbd9fa026f8e776 (patch)
treeaafa6227c9a351ae48e6bd3b866a698e0403219f
parent22b3b0504579e661321ad3fe2f16fd279b85a0b7 (diff)
misc: Add insert-brackes func
function to insert brackets
-rwxr-xr-xemacs.org7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs.org b/emacs.org
index d87e954..6344961 100755
--- a/emacs.org
+++ b/emacs.org
@@ -619,6 +619,7 @@ Generate a random password between 20 and 40 characters
(global-set-key (kbd "M-.") 'xref-find-definitions)
(global-set-key (kbd "C-c l") 'display-line-numbers-mode)
+
(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(define-key company-active-map (kbd "TAB") 'company-indent-or-complete-common)
@@ -632,6 +633,12 @@ Generate a random password between 20 and 40 characters
(dap-ui-mode)
(setq indent-tabs-mode nil)
+
+ (defun insert-brackets (&optional arg)
+ (interactive "P")
+ (insert-pair arg ?\[ ?\]))
+
+ (global-set-key (kbd "C-x M-[") 'insert-brackets)
#+end_src
** Magit
#+begin_src emacs-lisp