All Projects → CodyReichert → shakespeare-mode

CodyReichert / shakespeare-mode

Licence: other
An emacs major mode for editing hamlet, lucius, and julius files

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to shakespeare-mode

eshell-up
Quickly go to a specific parent directory in eshell
Stars: ✭ 28 (-20%)
Mutual labels:  melpa
ssh-config-mode-el
emacs mode for editing ssh config files.
Stars: ✭ 46 (+31.43%)
Mutual labels:  melpa
emacs-counsel-tramp
Tramp ivy interface for ssh and docker and ‎vagrant
Stars: ✭ 49 (+40%)
Mutual labels:  melpa
osx-trash
Make Emacs' delete-by-moving-to-trash do what you expect it to do on OS X.
Stars: ✭ 22 (-37.14%)
Mutual labels:  melpa
emacs-antiproxy
🔓 anti proxy/firewall setup using git repo mirrors of package archives. (local melpa)
Stars: ✭ 24 (-31.43%)
Mutual labels:  melpa
emacs2nix
Automatically generate Nix expressions for Emacs packages
Stars: ✭ 23 (-34.29%)
Mutual labels:  melpa
flatmap.io
🚀 The place where people meet technologies
Stars: ✭ 29 (-17.14%)
Mutual labels:  yesod
slime-company
Company-mode completion backend for Slime.
Stars: ✭ 66 (+88.57%)
Mutual labels:  melpa
psysh.el
PsySH on Emacs, PHP interactive shell (REPL)
Stars: ✭ 27 (-22.86%)
Mutual labels:  melpa
clipetty
Manipulate the system (clip)board with (e)macs from a (tty)
Stars: ✭ 91 (+160%)
Mutual labels:  melpa
wolfram.el
Wolfram Alpha integration
Stars: ✭ 69 (+97.14%)
Mutual labels:  melpa
emacs-company-dict
A port of ac-source-dictionary to company-mode, plus annotation and documentation support.
Stars: ✭ 31 (-11.43%)
Mutual labels:  melpa
svg-tag-mode
A minor mode for Emacs that replace keywords with nice SVG labels
Stars: ✭ 314 (+797.14%)
Mutual labels:  melpa
emacs-easy-jekyll
Emacs major mode for managing jekyll
Stars: ✭ 53 (+51.43%)
Mutual labels:  melpa
helm-gitignore
Helm interface for generating .gitignore files
Stars: ✭ 20 (-42.86%)
Mutual labels:  melpa
elcord
Discord Rich Presence / Gamebridge support for Emacs!
Stars: ✭ 149 (+325.71%)
Mutual labels:  melpa
company-flow
No description or website provided.
Stars: ✭ 32 (-8.57%)
Mutual labels:  melpa
flycheck-dmd-dub
flycheck and DCD dub support to enable D IDE features in Emacs
Stars: ✭ 14 (-60%)
Mutual labels:  melpa
auctex-latexmk
This library adds LatexMk support to AUCTeX.
Stars: ✭ 81 (+131.43%)
Mutual labels:  melpa
lsp-metals
lsp-mode ❤️ metals
Stars: ✭ 49 (+40%)
Mutual labels:  melpa

shakespeare-mode.el http://melpa.org/packages/shakespeare-mode-badge.svg http://stable.melpa.org/packages/shakespeare-mode-badge.svg

A major mode that provides syntax highlighting and indentation for editing Shakespearean templates (hamlet, lucius, julius).

https://cloud.githubusercontent.com/assets/7034627/5676535/fced8f2a-979c-11e4-8619-683bba400707.jpg

Installation

You can install this package from the MELPA repository:

M-x package-install RET shakespeare-mode RET

Note: shakespeare-mode is also available via melpa-stable .

Alternatively, clone this repo and add the directory to your emacs load path by adding the following lines to your .emacs:

(add-to-list 'load-path "/path/to/this/clone")
(require 'shakespeare-mode)

And that’s it. Open up a hamlet, lucius, or julius file to make sure it worked.

Usage

After installation, you’ll have three major modes. .hamlet, .lucius, and .julius files should inherit their mode automatically.

shakespeare-hamlet-mode
shakespeare-julius-mode
shakespeare-lucius-mode

They each have mode-maps and hooks you use to add functions and key bindings to them individually.

Alternatively, a minor mode is also loaded with mode-maps and mode-hooks that runs in all shakespeare buffers. To use this, just hook into shakespeare-mode.

Features

Currently, shakespeare-mode supports basic syntax highlighting and indentation for hamlet, lucius, and julius. Cassius files are not yet supported.

Variable Interpolation

All of the modes support syntax highlighting for variable interpolation:

 #{...}
 @{...}
 ^{...}
@?{...}
 _{...}

Hamlet Mode

shakespeare-hamlet-mode has full support for most hamlet features (submit an issue if any are missing!):

  • control flow statements ($if, $forall, $maybe, etc)
  • shorthand class and id attributes (<p .some-class #some-id>)
  • optional quotes around attribute values (<input type=text>)
  • no need to explicitly tag div elements. (<.mydiv>)

Lucius Mode

shakespeare-lucius-mode supports a lot of the same things as shakespeare-hamlet-mode

  • url and variable interpolation
  • indentation for nested css blocks
  • variable declaration
  • lucius mixins

Julius Mode

shakespeare-julius-mode is the most basic of the modes, but supports Javascript syntax highlighting indentation and the variable interpolation mentioned above.

Todo (in order of priority)

  • Support for setting option attributes with colons, as dicussed here.
  • Support far Cassius (shakespeare-cassius-mode)
  • Integration with html2hamlet for quick formatting of buffers and regions (eg, copy in html and quickly reformat to hamlet.)

Thanks

less-css-mode I was originally using less-css-mode for editing lucius files, so I used parts of this mode’s modified syntax-table to compose lucius’.

hamlet mode I was able to use parts of the regexp’s from this repo for syntax highlighting, and parts of the syntax-table. There’s been some reformatting and minor restructure but this was a big help.

License

This software is licensed under the GNU General Publice License Version 3.0

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].