Last active
November 16, 2018 00:27
-
-
Save tek-nishi/a7fc3933be5e62c7eeaa to your computer and use it in GitHub Desktop.
insert newline and indent
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
(defun my-insert-newline-and-indent(arg) | |
"カーソル行の上や下に一行挿入してインデント(前置引数が4だと下の行に挿入)" | |
(interactive "p") | |
(let ((p (if (eq arg 4) | |
2 | |
1))) | |
(move-beginning-of-line p) | |
(open-line 1) | |
(indent-for-tab-command))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment