-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line joining and opening #339
Comments
line joining you can do by calling ergoemacs-shrink-whitespaces line opening, if you mean emacs's open-line command. (but it doesn't match Xah On Fri, Mar 13, 2015 at 2:59 PM, Tu Do notifications@github.com wrote:
|
@xahlee Oh sorry about the (defun prelude-smart-open-line (arg)
"Insert an empty line after the current line.
Position the cursor at its beginning, according to the current mode.
With a prefix ARG open line above the current line."
(interactive "P")
(if arg
(prelude-smart-open-line-above)
(progn
(move-end-of-line nil)
(newline-and-indent)))) As for line joining, |
no, it doesn't, but as i said, the modified version xah-shrink-whitespaces about prelude-smart-open-line, in my opinion it is not general enough to be Xah On Sat, Mar 14, 2015 at 9:46 PM, Tu Do notifications@github.com wrote:
|
There are many people who may use prelude, so many people may want the option. I really don't have much time to code up the open-line function and add some tests for it. If you would like to do this I'm fine with it, but I am afraid that you would have had to sign the gnu licence agreement if you want to have it included in ergoemacs-mode since it is on gnu elpa. For now you should be able to work-around it with a |
I don't think that I would add it to the core-theme, but an option you can enable/disable. |
I have added the functionality. It is disabled on the standard theme, by default. You may enable it by (ergoemacs-require '(join-line open-line)) Or select it from the ergoemacs-mode menu. I have used your suggested bindings. This implies that RET is no longer bound to I'm not sure I like the keys since they aren't that ergonomic... In the reduction theme, the join line statements take a little less stretching. |
By adding this component, many of my convenient Alt+RET key bindings have disappeared. I can't stand that ido-mode no longer opens the directory in dired without Alt+RET. Probably needs more work. |
@xahlee @mlf176f2 These are the two editing commands that I found really useful.
kill-line
, then move point to the end again. At least we need to execute between 8 commands, and we have to alternate our hands between two different command. Emacs already has stockjoin-line
, but it joins from the bottom. We can write a little function to easily achieve the reverse. You can take a look at this post forjoin-top-line
command. I suggest the key bindings for joining lines are Alt + [ tojoin-top-line
and Alt + ] for stockjoin-line
.newline-and-indent
, which is bound to RET in ErgoEmacs by default.The text was updated successfully, but these errors were encountered: