Skip to content
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

M-; should start a comment on an empty line #34

Closed
NateEag opened this issue Aug 19, 2014 · 5 comments
Closed

M-; should start a comment on an empty line #34

NateEag opened this issue Aug 19, 2014 · 5 comments

Comments

@NateEag
Copy link

NateEag commented Aug 19, 2014

With the default setup from

(evilnc-default-hotkeys)

pressing M-; does nothing in the following situation (where | is the cursor):

|
(setq some-var nil)

It would be convenient if it started a new comment.

It handles the inverse operation correctly:

;; |
(setq some-var nil)

followed by M-; yields

|
(setq some-var nil)
@redguardtoo
Copy link
Owner

why you want to comment out an empty line, if you comment multiple lines containing empty line, that line will be commented out? or you can ignore empty line when operating on multiple lines.

the behavior is actually controlled by Emacs, insert below code into ~/.emacs

(setq comment-empty-lines t)

@NateEag
Copy link
Author

NateEag commented Aug 21, 2014

It's an easier way to start a new comment. I had it working in a previous commenting setup.

(setq comment-empty-lines t)

does not change this behavior for an unselected empty line.

@redguardtoo
Copy link
Owner

Got, give me a few minutes.

@redguardtoo
Copy link
Owner

906f532 M-; should start a comment on an empty line #34 v1.5.3 (Chen Bin)

@NateEag
Copy link
Author

NateEag commented Aug 22, 2014

Works great.

Thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants