Doom updates
This commit is contained in:
parent
a092f2e800
commit
1b1f707d9a
3 changed files with 70 additions and 6 deletions
|
@ -43,6 +43,8 @@
|
|||
(nconc i-keys (mapcar
|
||||
(lambda (number) (setq command (format "i%c" number)))
|
||||
(number-sequence 93 250)))
|
||||
|
||||
(setq my-unignored-buffers '("*ielm*" "*scratch*" "*ansi-term*" "*term*"))
|
||||
(defun eval-string (string)
|
||||
"Evals all the commands inside the string"
|
||||
(eval (car (read-from-string (format "(progn %s)" string)))))
|
||||
|
@ -140,14 +142,31 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(defun make-buffer-uninteresting ()
|
||||
"rename the current buffer to begin with a space"
|
||||
(interactive)
|
||||
(unless (string-match-p "^ " (buffer-name))
|
||||
(rename-buffer (concat " " (buffer-name)))))
|
||||
|
||||
(defun make-buffer-interesting ()
|
||||
"rename the current buffer to begin with a space"
|
||||
(interactive)
|
||||
(if (string-match-p "^ " (buffer-name))
|
||||
(rename-buffer (concat " " (buffer-name)))))
|
||||
(map! :n "g r" #'evil-replace-with-register)
|
||||
(evil-replace-with-register-install)
|
||||
(map! :n "SPC w D" #'delete-other-windows)
|
||||
(defvar my-term-shell "/bin/zsh")
|
||||
(setq tramp-shell-prompt-pattern "$ ")
|
||||
;; (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
|
||||
(defadvice ansi-term (before force-bash)
|
||||
(interactive (list my-term-shell)))
|
||||
(ad-activate 'ansi-term)
|
||||
(map! :map 'pdf-view-mode-map
|
||||
:n "f" #'pdf-links-action-perform)
|
||||
(map! :n "SPC f z" #'counsel-fzf)
|
||||
(map! :n "SPC b j" #'ivy-switch-buffer)
|
||||
(map! :n "SPC j j" #'ivy-switch-buffer)
|
||||
(defun ii-mode (mode-map mode-map-name)
|
||||
(mapcar
|
||||
(lambda (command)
|
||||
|
@ -374,13 +393,19 @@
|
|||
)
|
||||
|
||||
(add-hook! 'term-mode-hook
|
||||
(map!
|
||||
:g "C-#" #'singpolyma/term-insert-literal
|
||||
))
|
||||
(map!
|
||||
:g "C-#" #'singpolyma/term-insert-literal
|
||||
))
|
||||
(defalias 'open 'find-file)
|
||||
(defalias 'openo 'find-file-other-window)
|
||||
;; (apply 'eshell/alias '("config" "/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME"))
|
||||
;; (add-hook 'eshell-mode-hook 'eshell-load-bashrc-aliases)
|
||||
(defun my-ido-ignore-func (name)
|
||||
"Ignore all non-user (a.k.a. *starred*) buffers except those listed in `my-unignored-buffers'."
|
||||
(and (string-match "^\*" name)
|
||||
(not (member name my-unignored-buffers))))
|
||||
|
||||
(setq ido-ignore-buffers '("\\` " my-ido-ignore-func))
|
||||
(after! haskell-mode
|
||||
(progn
|
||||
(setq
|
||||
|
|
|
@ -96,6 +96,8 @@ If you intend to use org, it is recommended you change this!
|
|||
(nconc i-keys (mapcar
|
||||
(lambda (number) (setq command (format "i%c" number)))
|
||||
(number-sequence 93 250)))
|
||||
|
||||
(setq my-unignored-buffers '("*ielm*" "*scratch*" "*ansi-term*" "*term*"))
|
||||
#+END_SRC
|
||||
* Custom functions
|
||||
|
||||
|
@ -203,10 +205,25 @@ Xah Lee, read .bashrc:
|
|||
)
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun make-buffer-uninteresting ()
|
||||
"rename the current buffer to begin with a space"
|
||||
(interactive)
|
||||
(unless (string-match-p "^ " (buffer-name))
|
||||
(rename-buffer (concat " " (buffer-name)))))
|
||||
|
||||
(defun make-buffer-interesting ()
|
||||
"rename the current buffer to begin with a space"
|
||||
(interactive)
|
||||
(if (string-match-p "^ " (buffer-name))
|
||||
(rename-buffer (concat " " (buffer-name)))))
|
||||
#+END_SRC
|
||||
|
||||
* Custom keybindings
|
||||
Replace with Regiser:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :n "g r" #'evil-replace-with-register)
|
||||
(evil-replace-with-register-install)
|
||||
#+END_SRC
|
||||
|
||||
Delete other windows:
|
||||
|
@ -217,6 +234,8 @@ Delete other windows:
|
|||
zsh as ansi-term shell
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar my-term-shell "/bin/zsh")
|
||||
(setq tramp-shell-prompt-pattern "$ ")
|
||||
;; (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))
|
||||
(defadvice ansi-term (before force-bash)
|
||||
(interactive (list my-term-shell)))
|
||||
(ad-activate 'ansi-term)
|
||||
|
@ -227,6 +246,15 @@ zsh as ansi-term shell
|
|||
:n "f" #'pdf-links-action-perform)
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :n "SPC f z" #'counsel-fzf)
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(map! :n "SPC b j" #'ivy-switch-buffer)
|
||||
(map! :n "SPC j j" #'ivy-switch-buffer)
|
||||
#+END_SRC
|
||||
|
||||
** 'ii' in INSERT mode to escape to NORMAL mode:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun ii-mode (mode-map mode-map-name)
|
||||
|
@ -501,9 +529,9 @@ Eshell:
|
|||
)
|
||||
|
||||
(add-hook! 'term-mode-hook
|
||||
(map!
|
||||
:g "C-#" #'singpolyma/term-insert-literal
|
||||
))
|
||||
(map!
|
||||
:g "C-#" #'singpolyma/term-insert-literal
|
||||
))
|
||||
#+END_SRC
|
||||
|
||||
Aliases:
|
||||
|
@ -513,6 +541,16 @@ Aliases:
|
|||
;; (apply 'eshell/alias '("config" "/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME"))
|
||||
;; (add-hook 'eshell-mode-hook 'eshell-load-bashrc-aliases)
|
||||
#+END_SRC
|
||||
|
||||
Interesting buffers filter:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun my-ido-ignore-func (name)
|
||||
"Ignore all non-user (a.k.a. *starred*) buffers except those listed in `my-unignored-buffers'."
|
||||
(and (string-match "^\*" name)
|
||||
(not (member name my-unignored-buffers))))
|
||||
|
||||
(setq ido-ignore-buffers '("\\` " my-ido-ignore-func))
|
||||
#+END_SRC
|
||||
** Haskell
|
||||
Haskell-mode configs:
|
||||
# ;; Ancient code for hindent
|
||||
|
|
|
@ -54,3 +54,4 @@
|
|||
(package! highlight-operators)
|
||||
(package! highlight)
|
||||
(package! yafolding)
|
||||
(package! ido-vertical-mode) ; not being used
|
||||
|
|
Loading…
Reference in a new issue