From d03d37f6b22f9095e76e2d097c5edbeb94f74d12 Mon Sep 17 00:00:00 2001 From: Carlo Sciolla Date: Mon, 21 Sep 2015 17:28:46 +0200 Subject: [PATCH] Prepare for the new version --- README.md | 34 +++++++++++++++++++++++++++++++++- puml-mode.el | 7 ++++--- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1865d5c..aedaab6 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,42 @@ Make sure you have [MELPA](http://melpa.org/) enabled in your ``emacs.d``. Then, Enjoy! +Features +======== + +- Syntax highlight +- Autocompletion +- Preview + +Enable the major mode +===================== + +You can automatically enable `puml-mode` for files with extension `.puml` or `plantuml` by adding the following to your `.emacsrc`: + + ;; Enable puml-mode for PlantUML files + (add-to-list 'auto-mode-alist + '("\\.puml\\'" . puml-mode) + '("\\.plantuml\\'" . puml-mode)) + +Of course, you can always enable manually the major mode by typing `M-x puml-mode` once in the desired PlantUML file buffer. + Usage ===== -Currently, the only available documentation is that provided by [Zhang's post](http://zhangweize.wordpress.com/2010/09/20/update-plantuml-mode/). +You can either tell `puml-mode` to autocomplete the word before the cursor by typing `M-x puml-complete-symbol`. This will open a popup with all the available completions as found in the list of keywords given by running PlantUML with the `-language` flag. + +To render the PlantUML diagram within Emacs, you can also hit `M-x puml-preview`. This will run PlantUML and display the result in the `*PUML-Preview*` buffer. The format used to render the diagram is automagically chosen from what's supported by your Emacs. It will be one of the following, in order of preference: + +- SVG +- ~~PNG~~ still unsupported, see #6 +- Unicode ASCII art + +Default key bindings +==================== + +The following shortcuts are enabled by default: + + C-c C-c renders a PlantUML diagram from the current buffer in the best supported format License ======= diff --git a/puml-mode.el b/puml-mode.el index fccb547..793c350 100644 --- a/puml-mode.el +++ b/puml-mode.el @@ -2,11 +2,11 @@ ;; Filename: puml-mode.el ;; Description: Major mode for PlantUML diagrams sources -;; Compatibility: Tested with Emacs 24.3 and 24.4 on OS X 10.10 +;; Compatibility: Tested with Emacs 24.3 through 24.5 on OS X 10.10 ;; Author: Zhang Weize (zwz) ;; Maintainer: Carlo Sciolla (skuro) -;; Keywords: uml ascii -;; Version: 0.4 +;; Keywords: uml plantuml ascii +;; Version: 0.5 ;; You can redistribute this program and/or modify it under the terms ;; of the GNU General Public License as published by the Free Software @@ -27,6 +27,7 @@ ;;; Change log: ;; +;; version 0.5, 2015-09-21 Added preview capabilities ;; version 0.4, 2015-06-14 Use a puml- prefix to distinguish from the other plantuml-mode ;; version 0.3, 2015-06-13 Compatibility with Emacs 24.x ;; version 0.2, 2010-09-20 Initialize the keywords from the -language output of plantuml.jar instead of the hard-coded way.