FStarLang / fstar-mode.el

Emacs support for F*
Apache License 2.0
67 stars 17 forks source link

Subscripts? #6

Closed nikswamy closed 9 years ago

nikswamy commented 9 years ago

Any chance we could render things like x_0, y_1 etc. with subscripts?

cpitclaudel commented 9 years ago

Done! Does this match what you had in mind?

nikswamy commented 9 years ago

Cool! Thanks for tackling this so quickly.

Some observations/suggestions:

  1. x_1 renders by putting both the _ and the 1 in subscript. Is it possible to swallow the _ and just show the 1 ?
  2. Things like x_1=0 do not trigger the subscript on the LHS.
  3. x_1=x_2 triggers the subscript on the RHS, but not the LHS.
  4. x_1 =x_2 triggers the subscript on the LHS but not the RHS
  5. x_1 = x_2 subscripts both sides.
cpitclaudel commented 9 years ago

My pleasure :) I fixed 2,3,4,5. Let me see 1.

cpitclaudel commented 9 years ago

This seems to work ok. Could you give it a try and see it it feels right? Interaction is always a bit tricky when some characters are made invisible.

nikswamy commented 9 years ago

Looks good! Thanks

cpitclaudel commented 9 years ago

Great!