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

doesn't work well with gj/gk #23

Open
peterwu opened this issue Dec 22, 2020 · 2 comments
Open

doesn't work well with gj/gk #23

peterwu opened this issue Dec 22, 2020 · 2 comments

Comments

@peterwu
Copy link

peterwu commented Dec 22, 2020

Let's say I have the following emacs-lisp code and the cursor rests at the letter t on the :ensure t line.

(use-package evil-commentary
  :ensure t
  :config
  (evil-commentary-mode +1))

If I do gcj, I'll get correct result. However, if I do gcgj, I'll get this:

(use-package evil-commentary
  :ensure ;; t
  ;; :config
  (evil-commentary-mode +1))

Note the ;; is in front of the letter t, instead for the entire line. This is not how vim behaves with the tpope/vim-commentary plugin.

This issue happens when (setq evil-respect-visual-line-mode t) as j/k are mapped to gj/gk respectively.

@jdhao
Copy link

jdhao commented Oct 3, 2021

Same issue here. An additional issue after using (setq evil-respect-visual-line-mode t) is that the number of commented lines changes. For example, if we use gc2j:

  • before setting the variable: 3 lines of text including the current line get commented
  • after setting the variable: 2 lines of text including the current line get commented

jdhao added a commit to jdhao/emacs-conf that referenced this issue Oct 3, 2021
@linktohack
Copy link
Owner

Thanks for the report, this issues has been raised for several times so I'll have a look.

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

3 participants