Created
March 1, 2010 01:40
-
-
Save myuhe/317997 to your computer and use it in GitHub Desktop.
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
;;; 物理行の移動 | |
(global-set-key "¥C-p" 'previous-window-line) | |
(global-set-key "¥C-n" 'next-window-line) | |
(defun previous-window-line (n) | |
(interactive "p") | |
(let ((cur-col | |
(- (current-column) | |
(save-excursion (vertical-motion 0) (current-column))))) | |
(vertical-motion (- n)) | |
(move-to-column (+ (current-column) cur-col))) | |
(run-hooks 'auto-line-hook) | |
) | |
(defun next-window-line (n) | |
(interactive "p") | |
(let ((cur-col | |
(- (current-column) | |
(save-excursion (vertical-motion 0) (current-column))))) | |
(vertical-motion n) | |
(move-to-column (+ (current-column) cur-col))) | |
(run-hooks 'auto-line-hook) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment