Giter VIP home page Giter VIP logo

bbcode-mode's People

Contributors

lckarssen avatar swsnr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lckarssen lassik

bbcode-mode's Issues

Keybindings fail with `void-function` error

Using GNU Emacs 24.2.93.1 (latest pretest from http://emacsformacosx.com) keybindings to insert tags fail with void-function error.

However, invoking the corresponding function manually with M-x still works.

STR:

  1. C-x C-f test.bbcode
  2. C-c C-t b
  3. See the error Symbol's function definition is void: bbcode/insert-tag-b appear in the minibuffer.

However, M-x bbcode/insert-tag-b inserts [b][/b] tag as expected.

Customizable Prefix Keys

It would be nice to be able to customize prefix keys in case users would rather use something besides C-c C-l as the prefix for all list related tags, for example.

Lists of many lines?

First off, thans for making this mode.

Maybe I'm missing something, but [lsit]foo[/list] works, but usually my lists loook like

[list]
[*] foo
[*] bar
[/list]

Which is not revognized.

Insert Tag Fails Without Mark

If no mark is present then any tag insert command, e.g. C-c C-t b, will fail and Emacs will complain about there being no mark. It seems like this only started when I upgrade to Emacs 24.2.91.1. It happens with all versions of BBCode Mode.

How should tag coloring be done

Currently bbcode-mode only colors matching pairs of opening/closing tags. It doesn't color orphaned opening or closing tags at all (i.e. an opening tag without a matching closing tag or vice versa). This can be quite confusing to newcomers since the behavior is different from popular Emacs modes like xml-mode, html-mode and web-mode, all of which color orphaned tags as well as properly paired ones. (xml-mode goes a step further and colors orphaned closing tags in red to highlight that there's a syntax error, but that's tricky to do.)

As a related issue, bbcode-mode tries to implement tag pair matching using a regexp. This does not work properly with nested tags - in particular, nested [quote]s are problematic. It's very difficult if not impossible to properly parse nested structures using regexps.

In light of these points, I'd like to propose that the font-lock patterns should simply match individual opening/closing tags and not worry about pairing them up. This would make bbcode-modes font-lock behavior consistent with existing popular markup modes and would make the font-lock patterns much simpler to implement as well. What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.