can git-gutter support nlinum-mode? #124

Open
redguardtoo opened this Issue May 16, 2016 · 6 comments

Projects

None yet

3 participants

@redguardtoo
Contributor

git-gutter runs perfectly in linum-mode.

The only issue is linum-mode itself is slower than nlium-mode.

@syohex
Owner
syohex commented May 16, 2016

I don't understand well nlinum-mode. I try to understand it and support it.

@redguardtoo
Contributor
redguardtoo commented Jun 20, 2016 edited

Some user reported his code file could contain 20000 lines (redguardtoo/emacs.d#457).

In this case, he has to turn off linum-mode.

I suggest avoid displaying visual signs when linum-mode is off but keep other non-visual functionality.

Although I'm heavy git-gutter user, I don't check visual signs now. I usually just jump to closest hunk.

@syohex syohex referenced this issue Jun 24, 2016
Merged

Add display flag #130

@syohex
Owner
syohex commented Jun 24, 2016

See #130.

@zw963
zw963 commented Jun 25, 2016

(linum-mode) performance loss problem is exist so long ...

here is a issue I just create for helm.

though, those problem is somelike not caused by helm, just linum-mode and another package.

I switch from linum-mode to nlinum-mode just now, performance better.
if file is larger, it maybe have a great improved.

@zw963
zw963 commented Jun 25, 2016

@redguardtoo , your's nlium-mode is worked with emacsclient ?

It worked with emacs, but not worked with daemon mode.
my emacs version is 24.5.1
when connect to emacs server with emacsclient -nc one_file, get

*ERROR*: Invalid face: linum
@zw963
zw963 commented Jun 25, 2016

following piece code worked for me.

(defun initialize-nlinum (&optional frame)
  (require 'nlinum)
  (add-hook 'prog-mode-hook 'nlinum-mode))
(when (daemonp)
  (add-hook 'window-setup-hook 'initialize-nlinum)
  (defadvice make-frame (around toggle-nlinum-mode compile activate)
  (nlinum-mode -1) ad-do-it (nlinum-mode 1)))

Those code make my emacs 24.5.1 daemon mode worked with nlinum-mode
very well. No matter what open a frame from terminal or create a new frame in emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment