ttscoff / nv

MultiMarkdown version of Notational Velocity with Markdown editing features and preview
http://brettterpstra.com/projects/nvalt
BSD 3-Clause "New" or "Revised" License
1.78k stars 197 forks source link

Auto-pairing does not work with < and > #19

Open DivineDominion opened 13 years ago

DivineDominion commented 13 years ago

As the title states -- neither auto-pairing nor "mark text and press bracket key to enclose text in brackets" works [EDIT: with < and >](is there a short name for the last feature? :))

I use nvALT 2.7 (71) with German localisation and NEO2 keyboard layout. (other layouts work neither)

elasticthreads commented 13 years ago

Not clear from the description, are you saying auto-pairing doesn't work at all for any character? or just for the "<" and ">" characters?

I did not include those two characters on purpose. There are some uses of those characters that don't involve pairing (i.e. "6>4","check a setting box in Preferences>>Editing", or "--->"). Their pairing mostly happens in HTML, but I don't see a lot of users writing HTML in nvALT. Maybe I'm wrong. TextMate, the inspiration for this feature, doesn't pair these characters either, AND a lot of users write HTML in TextMate.

I think, for now, I'm just going to have auto-pairing work for "()", "{}","[]", and double quotes.

That said, I could see in a future release letting users specify character pairings.

On Sat, Jul 2, 2011 at 3:22 AM, DivineDominion < reply@reply.github.com>wrote:

As the title states -- neither auto-pairing nor "mark text and press bracket key to enclose text in brackets" works (is there a short name for the last feature? :))

I use nvALT 2.7 (71) with German localisation and NEO2 keyboard layout. (other layouts work neither)

Reply to this email directly or view it on GitHub: https://github.com/ttscoff/nv/issues/19

DivineDominion commented 13 years ago

The cases in which auto-pairing should not be triggered seem like a valid point. Still, MMD support <http://link.to/foo> in-line links. Auto-pairing should indeed neither be triggered on closing brackets )]}> or if the cursor is just before some text, i.e. it should only be triggered when whitespace or EOL follow the cursor.

I think this is a far bigger issue than not having < and > included. Couldn't you enable "surround with brackets" for < while disabling auto-pairing? This way one could select http://link.to/foo, press < and get <http://link.to/foo>.