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

Line Number layout too close when using spacemacs in iTerm(and OSX terminal) #5609

Closed
boboRAY opened this issue Mar 27, 2016 · 8 comments
Closed

Comments

@boboRAY
Copy link

boboRAY commented Mar 27, 2016

When using Gui Emacs
There is a space between line number and code region
image

But using spacemacs in iTerm2 (Terminal the same), they become too close
image

@boboRAY boboRAY closed this as completed Mar 27, 2016
@boboRAY boboRAY changed the title t Line Number layout too close when using spacemacs in iTerm(and OSX terminal) Mar 27, 2016
@boboRAY boboRAY reopened this Mar 27, 2016
@jupl
Copy link
Contributor

jupl commented Mar 28, 2016

This is probably because fringes are not available in the terminal.

You could add padding yourself using linum-format.

(unless (display-graphic-p)
  (setq linum-format "%d "))

;; Alternatively
(unless (display-graphic-p)
  (setq linum-format (concat linum-format " ")))

@MephistoMMM
Copy link

MephistoMMM commented Jul 23, 2016

it does not work while dotspacemacs-line-numbers set to relative

dotspacemacs-line-numbers 'relative

I have resolved the it...

;; codes in linum-relative.el
(defcustom linum-relative-format "%3s "
   "Format for each line. Good for adding spaces/paddings like so: \" %3s \""
   :type 'string
   :group 'linux-relative)

..., so, what we should do is just adding following snippets into user-config:

(unless (display-graphic-p)
        (setq linum-relative-format "%3s "))

;; Alternatively
(unless (display-graphic-p)
  (setq linum-relative-format (concat linum-relative-format " ")))

@brezal
Copy link

brezal commented Dec 17, 2017

I still have this issue. @MephistoMMM Did I miscomprehend how to use the workaround?

screen shot 2017-12-16 at 7 35 10 pm

That is the bottom of my .spacemacs file. I have restarted emacs with this configuration, and that is what linum-mode looks like.

@MephistoMMM
Copy link

MephistoMMM commented Dec 17, 2017

@brezal

Well, I mean, add the snippets into dotspacemacs/user-config function, as follows:

(defun dotspacemacs/user-config ()

    (unless (display-graphic-p)
           (setq linum-relative-format "%3s "))

    ;; Alternatively
    (unless (display-graphic-p)
          (setq linum-relative-format (concat linum-relative-format " ")))

)

Not the bottom of your .spacemacs file

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@marcw
Copy link

marcw commented Apr 13, 2020

This issue is still valid on the latest version of emacs and spacemacs on iTerm2. This solution works but I'm confused as I thought display-line-numbers was the default and not linum.

@duianto duianto removed the stale marked as a stale issue/pr (usually by a bot) label Apr 24, 2020
@duianto
Copy link
Collaborator

duianto commented Apr 24, 2020

display-line-numbers are the default line numbers when Emacs 26+ is used on the Spacemacs develop branch.

@lebensterben
Copy link
Collaborator

Closing due to its age.

For future references a work around is available for users of linum here: #5609 (comment)

But Spacemacs now requires >Emacs 27 and display-line-numbers is the default so it's not relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Forum
  
To close
Development

No branches or pull requests

8 participants