From 5f17475253c3af28d62200f36dbd9fa026f8e776 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 9 Aug 2023 04:17:59 +0300 Subject: misc: Add insert-brackes func function to insert brackets --- emacs.org | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3