summaryrefslogblamecommitdiff
path: root/emacs/custom/fcuny-edit.el
blob: a65682b9e65cb27cfa265967a0385b44a91b7a0f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11






                                              



                                                 
 
         





                                       


                               
                                         




                      

                                        


                      
                                       
 


                                                                   



                                                                   
                     
(use-package autorevert
  :config
  (setq global-auto-revert-non-file-buffers t)
  (setq auto-revert-verbose nil)
  (global-auto-revert-mode t))

(use-package whitespace
  :hook ((prog-mode    . fcuny/whitespace-setup)
         (conf-mode    . fcuny/whitespace-setup)
         (outline-mode . fcuny/whitespace-setup)
         (yaml-mode    . fcuny/whitespace-setup))

  :custom
  (whitespace-style '(face))
  (show-trailing-whitespace nil)

  :init
  (defun fcuny/whitespace-setup ()
    (setq show-trailing-whitespace t)))

(use-package electric-pair-mode
  :commands electric-pair-mode
  :hook (prog-mode . electric-pair-mode))

(use-package paren
  :ensure t
  :custom
  (show-paren-delay 0)
  (show-paren-when-point-inside-paren t)
  (show-paren-when-point-in-periphery t)
  :config
  (show-paren-mode 1))

(global-set-key (kbd "M-j") 'join-line)

;; don't assume that sentences should have two spaces after period.
(setq sentence-end-double-space nil)

;; switch to view-mode whenever you are in a read-only buffer (e.g.
;; switched to it using C-x C-q).
(setq view-read-only t)

(provide 'fcuny-edit)