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

Not clear how to show a right margin line. #4856

Closed
amichail opened this issue Jan 29, 2016 · 7 comments

Comments

@amichail
Copy link

@amichail amichail commented Jan 29, 2016

I would like to limit most lines of code to 100 characters.

Is there a recommended package for making this easy to do by showing a right margin line? If so, maybe it should be mentioned in the documentation?

@JAremko

This comment has been minimized.

Copy link
Collaborator

@JAremko JAremko commented Jan 29, 2016

@JAremko

This comment has been minimized.

Copy link
Collaborator

@JAremko JAremko commented Jan 29, 2016

Also SPC t f display the fill column (by default the fill column is set to 80)

docs

Don't forget to close the issue

@StreakyCobra

This comment has been minimized.

Copy link
Contributor

@StreakyCobra StreakyCobra commented Jan 29, 2016

Yes, SPC t f is what you want. You can activate it on all relevant buffers with this:

  ;; Activate column indicator in prog-mode and text-mode
  (add-hook 'prog-mode-hook 'turn-on-fci-mode)
  (add-hook 'text-mode-hook 'turn-on-fci-mode)

You can also press M-q to automatically fill paragraphs to the value of fill-column. Note it can be customized with:

(setq-default fill-column 100)

in your user-init. Does this answer your question?

@amichail

This comment has been minimized.

Copy link
Author

@amichail amichail commented Jan 29, 2016

Is there a way to make the line color more subtle for fci-mode?

@nixmaniack

This comment has been minimized.

Copy link
Contributor

@nixmaniack nixmaniack commented Jan 29, 2016

@amichail (setq fci-rule-color "#FF0000"). You can choose the color you want instead of "#FF0000"

@amichail

This comment has been minimized.

Copy link
Author

@amichail amichail commented Jan 29, 2016

I got it working! Thanks!

@amichail amichail closed this Jan 29, 2016
@DanBurton

This comment has been minimized.

Copy link

@DanBurton DanBurton commented Oct 29, 2018

Googled this up, and @StreakyCobra's answer is exactly what I was looking for.

Weirdly, (setq-default fill-column 100) in my user-init wasn't working, so I did this instead:

(defun fill-column-100 ()
  (set-fill-column 100))

;; later, in user-init
  (add-hook 'prog-mode-hook 'fill-column-100)
  (add-hook 'text-mode-hook 'fill-column-100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.