/README

http://github.com/fgallina/multi-web-mode · #! · 82 lines · 57 code · 25 blank · 0 comment · 0 complexity · 7de3d25474e8618553b0d0ecd83056af MD5 · raw file

  1. This package contains multi-web-mode.
  2. 0. Info
  3. Author: Fabi??n Ezequiel Gallina
  4. Contact: fabian at gnu dot org dot ar
  5. Project homepage: http://github.com/fgallina/multi-web-mode
  6. Wiki: http://github.com/fgallina/multi-web-mode/wikis
  7. My Blog: http://www.from-the-cloud.com
  8. Downloads page: http://github.com/fgallina/multi-web-mode/downloads
  9. 1. Introduction
  10. Multi Web Mode is a minor mode which makes web editing in Emacs
  11. much easier.
  12. Basically what it does is select the appropriate major mode
  13. automatically when you move the point and also calculates the
  14. correct indentation of chunks according to the indentation of the
  15. most relevant major mode.
  16. Currently it is focused to work on buffers which contain html, css,
  17. javascript and/or php, but adding other modes is really simple: you
  18. just need to add your own mode to the `mweb-tags'. You can do that
  19. by using M-x customize-group RET multi-web-mode and looking for the
  20. `mweb-tags' variable.
  21. All third packages were removed from the project repo (they were
  22. included with mweb previously), mainly because it is difficult to
  23. track new versions for everything and because it favored the user
  24. laziness to check the basic configuration :).
  25. The last multi-web-mode release which contained all packages was
  26. 0.2.1. It is still available from here:
  27. * http://github.com/fgallina/multi-web-mode/tree/0.2.1
  28. 2. Requirements
  29. You don't need any special libraries to run this package. Just the
  30. ones you want to integrate to it.
  31. Regarding the version of Emacs, this package was tested successfully
  32. with >= 23.0.60.
  33. 3. Installation
  34. To install Multi Web Mode you'll need to do something like this in
  35. your .emacs:
  36. (require 'multi-web-mode)
  37. (setq mweb-default-major-mode 'html-mode)
  38. (setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
  39. (js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
  40. (css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
  41. (setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
  42. (multi-web-global-mode 1)
  43. Restart Emacs or use M-x load-file ~/.emacs.
  44. 4. Usage
  45. Multi Web Mode binds the following keystrokes:
  46. M-<f11> : Prompts the user to override the default major mode.
  47. M-<f12> : Prompts the user to override the calculated extra
  48. indentation. Useful when the automatic calculation is not good
  49. enough.
  50. 5. Bug Reports
  51. If you find a bug please report it sending an email listed in the
  52. top of the file.
  53. 6. License
  54. multi-web-mode.el is free software under the GPL v3,
  55. see LICENSE file for details.
  56. For other files included in the package check their licenses in the
  57. top of the files.