aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/init.el
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs/init.el26
1 files changed, 21 insertions, 5 deletions
diff --git a/emacs/init.el b/emacs/init.el
index ebaf0d7..994f76b 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -66,11 +66,20 @@
(setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist)) ; OpenCL source files
-
-;; Load configurations from installed for other packages
-((lambda ()
- (dolist (file (directory-files (expand-file-name "~/.config/emacs/") t "^init-.*\\.el$"))
- (load-file file))))
+;; M-up and M-down to transpose line
+(defun move-line-up ()
+ "Move the current line up one line."
+ (interactive)
+ (transpose-lines 1)
+ (forward-line -2))
+(defun move-line-down ()
+ "Move the current line down one line."
+ (interactive)
+ (forward-line 1)
+ (transpose-lines 1)
+ (forward-line -1))
+(global-set-key (kbd "M-<up>") #'move-line-up)
+(global-set-key (kbd "M-<down>") #'move-line-down)
;; Disable Emacs overriding the terminal's background
@@ -78,6 +87,13 @@
(set-face-attribute 'default nil :background "unspecified-bg")
(set-face-attribute 'default nil :foreground "unspecified-fg"))
+
;; Disable Emacs take control over the terminal's mouse features
;; (This is important for copy and paste between Emacs and other applications)
(unless (display-graphic-p) (xterm-mouse-mode -1))
+
+
+;; Load configurations from installed for other packages
+((lambda ()
+ (dolist (file (directory-files (expand-file-name "~/.config/emacs/") t "^init-.*\\.el$"))
+ (load-file file))))