emacs - cleanup
This commit is contained in:
parent
d15d53117e
commit
c591c68dad
1 changed files with 11 additions and 70 deletions
|
@ -452,15 +452,6 @@
|
|||
(add-hook 'global-undo-tree-mode-hook
|
||||
(lambda () (linum-mode -1))))
|
||||
|
||||
;; Easy terminal
|
||||
(setq my/default-shell (or (executable-find "zsh") (executable-find "bash")))
|
||||
|
||||
;;(use-package shell-pop
|
||||
;; :ensure t
|
||||
;; :bind ("C-x t" . shell-pop)
|
||||
;; :config
|
||||
;; (setq-default shell-pop-term-shell my/default-shell))
|
||||
|
||||
;; tabbing
|
||||
(setq-default tab-width 4)
|
||||
(setq-default LateX-indent-level 4)
|
||||
|
@ -502,12 +493,6 @@
|
|||
(global-set-key (kbd "C-x <left>") 'windmove-left)
|
||||
(global-set-key (kbd "C-x <right>") 'windmove-right)
|
||||
|
||||
; New keys
|
||||
; (global-set-key (kbd "<M-up>") 'windmove-up)
|
||||
; (global-set-key (kbd "<M-down>") 'windmove-down)
|
||||
; (global-set-key (kbd "<M-left>") 'windmove-left)
|
||||
; (global-set-key (kbd "<M-right>") 'windmove-right)
|
||||
|
||||
; Whitespace mode toggle
|
||||
(global-set-key (kbd "C-x C-l") 'whitespace-mode)
|
||||
(defalias 'wsm 'whitespace-mode)
|
||||
|
@ -517,26 +502,17 @@
|
|||
(interactive)
|
||||
(select-window (next-window)))
|
||||
|
||||
(global-set-key (kbd "<C-tab>") 'cycle-window)
|
||||
|
||||
;; Exit prompt
|
||||
;; (defun foreach (alist func)
|
||||
;; (while alist
|
||||
;; (progn
|
||||
;; (funcall func (car alist))
|
||||
;; (setq alist (cdr alist)))))
|
||||
|
||||
(defun check-for-open-buffers ()
|
||||
(interactive)
|
||||
(or (dolist
|
||||
(buffer (buffer-list))
|
||||
(cond
|
||||
((string-match "^\\*.*\\*$" (buffer-name buffer))
|
||||
nil)
|
||||
((null (buffer-modified-p buffer))
|
||||
nil)
|
||||
(t
|
||||
(yes-or-no-p (format "Buffer %s is open. Exit anyway?" (buffer-name buffer))))))))
|
||||
;; (defun check-for-open-buffers ()
|
||||
;; (interactive)
|
||||
;; (or (dolist
|
||||
;; (buffer (buffer-list))
|
||||
;; (cond
|
||||
;; ((string-match "^\\*.*\\*$" (buffer-name buffer))
|
||||
;; nil)
|
||||
;; ((null (buffer-modified-p buffer))
|
||||
;; nil)
|
||||
;; (t
|
||||
;; (yes-or-no-p (format "Buffer %s is open. Exit anyway?" (buffer-name buffer))))))))
|
||||
|
||||
;; Latex german
|
||||
(quail-define-package "latex-german" "UTF-8" "LaGe" t
|
||||
|
@ -588,11 +564,6 @@
|
|||
;; Change all prompts to y or n
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
||||
;; Insert date time, german format
|
||||
(defun datetime-german ()
|
||||
(interactive)
|
||||
(insert (format-time-string "%d.%m.%Y %H:%M")))
|
||||
|
||||
;; Insert time, german format
|
||||
(defun time-german ()
|
||||
(interactive)
|
||||
|
@ -600,37 +571,7 @@
|
|||
|
||||
(global-set-key (kbd "C-c C-d") 'time-german)
|
||||
|
||||
(defun fefe ()
|
||||
(interactive)
|
||||
(eww "https://blog.fefe.de"))
|
||||
|
||||
;; Comment fun
|
||||
|
||||
;(defun extend-comment ()
|
||||
; (interactive)
|
||||
; (if (looking-back "//" (line-beginning-position))
|
||||
; (progn
|
||||
; (newline-and-indent)
|
||||
; (insert "Hallo Welt"))
|
||||
; (newline-and-indent)))
|
||||
|
||||
;; Show in binary and decimal
|
||||
|
||||
;(defun hex-popup ()
|
||||
; (interactive)
|
||||
; (let (hexStr p1 p2)
|
||||
; (save-excursion
|
||||
; (search-backward-regexp "[^0-9A-Fa-f]" nil t)
|
||||
; (forward-char)
|
||||
; (setq p1 (point))
|
||||
; (search-forward-regexp "[^0-9A-Fa-f]" nil t)
|
||||
; (backward-char)
|
||||
; (setq p2 (point)))
|
||||
; (setq hexStr (buffer-substring-no-properties p1 p2))
|
||||
; (message "The hex number is: '%s' '%d' '%d'" hexStr p1 p2)))
|
||||
|
||||
;; Load local emacs settings
|
||||
|
||||
(let ((local-config (concat user-emacs-directory "init.local")))
|
||||
(when (file-exists-p (concat local-config ".el"))
|
||||
(load local-config)))
|
||||
|
|
Loading…
Reference in a new issue