Commits

Anonymous committed 566d2e8

Added multi-web-mode.el, updated ibuffer.el, added html config in smartparens.el

  • Participants
  • Parent commits f12a345

Comments (0)

Files changed (7)

File .mc-lists.el

 (setq mc/cmds-to-run-for-all
       '(
         end-of-region
+        my-emacs-lisp-open-line
         sp-cua-replace-region
         sp-wrap-cancel
         sp-wrap-tag-done
 
 (setq mc/cmds-to-run-once
       '(
+        eval-and-replace
         handle-switch-frame
         mc/mark-all-like-this-dwim
         typopunct-insert-mp

File files/advices.el

-(defadvice sgml-delete-tag (after reindent-buffer activate)
+(defadvice sgml-delete-tag (after reindent-buffer)
   (cleanup-buffer))
 
 (defadvice sr-tabs-add (after remove-sunrise-from-name activate)

File files/global.el

 
 (setq-default cursor-type 'box)
 ;; variable width font in text buffers ...
-(dolist (hook '(text-mode-hook
-                LaTeX-mode-hook
+(dolist (hook '(LaTeX-mode-hook
                 org-mode-hook
                 markdown-mode-hook
                 gnus-article-mode-hook))

File files/ibuffer.el

                ("emacs-config"
                 (or (filename . ".emacs.d")))
                ("emacs"
-                (or (mode . emacs-lisp-mode)))
+                (or (mode . emacs-lisp-mode)
+                    (mode . lisp-interaction-mode)
+                    (mode . inferior-emacs-lisp-mode)))
                ("TeX"
                 (or (mode . tex-mode)
                     (mode . TeX-mode)
                ("Web"
                 (or (mode . html-mode)
                     (mode . css-mode)
-                    (mode . PHP-mode)))
+                    (mode . php-mode)
+                    (mode . js-mode)))
                ("Sunrise"
                 (or (mode . sr-mode)))
                ("Tramp"
                  (mode . perl-mode)
                  (mode . python-mode)
                  (mode . cc-mode)
-                 (mode . js-mode)
                  ;; etc
                  ))))))
 

File files/multi-web-mode.el

+(require 'multi-web-mode)
+(setq mweb-default-major-mode 'html-mode)
+(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
+                  (javascript-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
+                  (css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
+(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
+(multi-web-global-mode 1)

File files/smartparens.el

 ;;; add new pairs
 (sp-add-pair "*" "*")
 (sp-add-pair "$" "$")
+(sp-add-pair "<" ">") ;; in html only!
 
 ;;; global
 (sp-add-ban-insert-pair-in-string "'")
 ;;; tex-mode latex-mode
 (sp-with '(tex-mode latex-mode) ;; yes, this works with lists too!
          (sp-add-local-allow-insert-pair "$"))
+
+;;; python-mode
+(sp-with 'python-mode
+         (sp-add-local-ban-insert-pair "`"))
+
+;;; html-mode
+(sp-with '(html-mode sgml-mode)
+         (sp-add-local-allow-insert-pair "<"))
 (load "files/undo-tree")
 (load "files/expand-region")
 (load "files/emacs-lisp-mode")
+(load "files/multi-web-mode")
 
 ;; vendor
 (vendor 'smex)
  '(imenu-auto-rescan t)
  '(ls-lisp-dirs-first t)
  '(menu-bar-mode nil)
+ '(sp-autoescape-string-quote-if-empty (quote (python-mode)))
+ '(sp-autoinsert-inhibit-functions nil)
  '(sp-autoinsert-quote-if-followed-by-closing-pair nil)
  '(sp-ignore-modes-list (quote (calc-mode dired-mode ibuffer-mode minibuffer-inactive-mode sr-mode help-mode)))
  '(sp-navigate-consider-symbols t)
  '(sr-tabs-max-tabsize 18)
  '(sr-traditional-other-window nil)
  '(sr-windows-locked nil)
- '(text-mode-hook (quote (init-text-based-modes text-mode-hook-identify)))
+ '(text-mode-hook (quote (text-mode-hook-identify)))
  '(tool-bar-mode nil)
  '(tooltip-mode nil))
 (custom-set-faces