-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd404e6
commit da123c9
Showing
5 changed files
with
84 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(require 'compile) | ||
;; Ibuffer | ||
(global-set-key (kbd "C-x C-b") 'ibuffer) | ||
|
||
;; Better copy-paste | ||
(global-set-key "\C-w" 'clipboard-kill-region) | ||
(global-set-key "\M-w" 'clipboard-kill-ring-save) | ||
(global-set-key "\C-y" 'clipboard-yank) | ||
|
||
;; Backspace deleting | ||
(global-set-key (kbd "C-.") 'help-command) | ||
(global-set-key (kbd "M-?") 'mark-paragraph) | ||
(global-set-key (kbd "C-h") 'delete-backward-char) | ||
(global-set-key (kbd "M-h") 'backward-kill-word) | ||
|
||
;; Move Region | ||
(global-set-key (kbd "M-p") 'move-region-up) | ||
(global-set-key (kbd "M-n") 'move-region-down) | ||
|
||
;; Aliases | ||
(defalias 'wm 'whitespace-mode) | ||
(defalias 'rs 'replace-string) | ||
(defalias 'll 'goto-line) | ||
(defalias 'rbhash 'ruby-update-hash) | ||
; do this on save | ||
(defalias 'cws' 'delete-trailing-whitespace) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(defun move-line-region-up (start end n) | ||
(interactive "r\np") | ||
(if (region-active-p) (move-region-up start end n) (move-line-up n))) | ||
|
||
(defun move-line-region-down (start end n) | ||
(interactive "r\np") | ||
(if (region-active-p) (move-region-down start end n) (move-line-down n))) | ||
|
||
(defun move-region (start end n) | ||
"Move the current region up or down by N lines." | ||
(interactive "r\np") | ||
(let ((line-text (delete-and-extract-region start end))) | ||
(forward-line n) | ||
(let ((start (point))) | ||
(insert line-text) | ||
(setq deactivate-mark nil) | ||
(set-mark start)))) | ||
|
||
(defun move-region-up (start end n) | ||
"Move the current line up by N lines." | ||
(interactive "r\np") | ||
(move-region start end (if (null n) -1 (- n)))) | ||
|
||
(defun move-region-down (start end n) | ||
"Move the current line down by N lines." | ||
(interactive "r\np") | ||
(move-region start end (if (null n) 1 n))) |
Binary file not shown.