Skip to content

Instantly share code, notes, and snippets.

@blue0513
Created December 13, 2018 13:25
Show Gist options
  • Save blue0513/5ed517c02dac64822db6b2b5a8695120 to your computer and use it in GitHub Desktop.
Save blue0513/5ed517c02dac64822db6b2b5a8695120 to your computer and use it in GitHub Desktop.
my settings for fill-column-indicator.el
;; load package
(add-to-list 'load-path "~/github/Fill-Column-Indicator")
(require 'fill-column-indicator)
;; invoke when prog-mode
(add-hook 'prog-mode-hook 'fci-mode)
;; when ruby-mode, rule-column is 80
(add-hook 'ruby-mode-hook
(lambda () (setq fci-rule-column 80)))
;; when company-mode is ON, fci-mode should be OFF
;; https://github.com/alpaker/Fill-Column-Indicator/issues/54
(defun on-off-fci-before-company(command)
(when (string= "show" command)
(turn-off-fci-mode))
(when (string= "hide" command)
(turn-on-fci-mode)))
(advice-add 'company-call-frontends :before #'on-off-fci-before-company)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment