Mehr emacs gebastel
This commit is contained in:
parent
3e6267e659
commit
bd4026de0f
1 changed files with 27 additions and 17 deletions
44
emacs/.emacs
44
emacs/.emacs
|
@ -76,28 +76,38 @@
|
|||
(defun term-split ()
|
||||
"creates terminal window below"
|
||||
(interactive)
|
||||
(select-window (split-window-below -7))
|
||||
(term "/bin/zsh"))
|
||||
(let (window (split-window-below -7))
|
||||
(select-window window)
|
||||
(term "/bin/zsh")
|
||||
(set-window-dedicated-p window t)))
|
||||
|
||||
(global-set-key (kbd "C-x t") 'term-split)
|
||||
|
||||
;; Kill term buffer on exit
|
||||
;; (defun term-handle-exit--close-buffer (&rest args)
|
||||
;; (when (null (get-buffer-process (current-buffer)))
|
||||
;; (kill-buffer (current-buffer))))
|
||||
;;
|
||||
;; (advice-add 'term-handle-exit :after #'term-handle-exit--close-buffer)
|
||||
;(defun term-handle-exit--close-buffer (&rest args)
|
||||
; (when (null (get-buffer-process (current-buffer)))
|
||||
; (progn
|
||||
; (let (window (get-buffer-window (current-buffer))
|
||||
; (when (window-dedicated-p ))
|
||||
; (kill-buffer (current-buffer))
|
||||
; Fix...
|
||||
|
||||
;; Latex german
|
||||
;; (defun latex-german-umlauts ()
|
||||
;; "Sets keys like ä to write \"a"
|
||||
;; (message "Latex German Umlauts loaded.")
|
||||
;; (defun local-map (key ins)
|
||||
;; (local-set-key (kbd key) (lambda () (interactive) `(insert v))))
|
||||
;; (local-map "ä" "\"a"))
|
||||
;; ;;(local-set-key (kbd "ä") (lambda () (interactive) (insert "\"a")))
|
||||
;;
|
||||
;; (add-hook 'latex-mode-hook 'latex-german-umlauts)
|
||||
; (advice-add 'term-handle-exit :after #'term-handle-exit--close-buffer)
|
||||
|
||||
; Latex german
|
||||
(defun evil-is-insert () (string= evil-state "insert"))
|
||||
(defun latex-german-umlauts ()
|
||||
"Sets keys like ä to write \"a"
|
||||
(message "Latex German Umlauts loaded.")
|
||||
(local-set-key (kbd "ä") (lambda () (interactive) (when (evil-is-insert) (insert "\"a"))))
|
||||
(local-set-key (kbd "ö") (lambda () (interactive) (when (evil-is-insert) (insert "\"o"))))
|
||||
(local-set-key (kbd "ü") (lambda () (interactive) (when (evil-is-insert) (insert "\"u"))))
|
||||
(local-set-key (kbd "Ä") (lambda () (interactive) (when (evil-is-insert) (insert "\"A"))))
|
||||
(local-set-key (kbd "Ö") (lambda () (interactive) (when (evil-is-insert) (insert "\"O"))))
|
||||
(local-set-key (kbd "Ü") (lambda () (interactive) (when (evil-is-insert) (insert "\"U"))))
|
||||
(local-set-key (kbd "ß") (lambda () (interactive) (when (evil-is-insert) (insert "\"s")))))
|
||||
|
||||
(add-hook 'latex-mode-hook 'latex-german-umlauts)
|
||||
|
||||
;; Split windows horizontally preferred
|
||||
(setq split-height-threshold 6)
|
||||
|
|
Loading…
Reference in a new issue