ReverseFlux

Smart parens

Feb 5th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. ;; Package: smartparens
  2. (require 'smartparens-config)
  3. (show-smartparens-global-mode +1)
  4. (smartparens-global-mode 1)
  5.  
  6. ;; when you press RET, the curly braces automatically
  7. ;; add another newline
  8. (sp-with-modes '(c-mode c++-mode)
  9. (sp-local-pair "{" nil :post-handlers '(("||\n[i]" "RET")))
  10. (sp-local-pair "/*" "*/" :post-handlers '((" | " "SPC")
  11. ("* ||\n[i]" "RET"))))
Advertisement
Add Comment
Please, Sign In to add comment