Author Topic: *.Rmd and smart indenting  (Read 1795 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
*.Rmd and smart indenting
« on: August 28, 2018, 04:41:49 PM »
Normally when cursor is at col 1 and I hit <tab>, the cursor moves to the 1st non-blank character and the line is reindented to what Slick thinks is the correct indent amount.

In *.RMD file (R + markdown), it doesn't do this smart behavior - it simply inserts 4 spaces.
it should do the smart indent thing.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: *.Rmd and smart indenting
« Reply #1 on: August 28, 2018, 10:45:04 PM »
Right now, none of the smart keys work in embedded language code for Markdown (.markdown and .rmd).

In order for most smart keys to work for embedded languages, the outer language must at least list tags. However, in the case of R (or Kotlin, Groovy, and Scala), there's also the requirement for a statement level parser. It's doubtful we will have time to do that.

We can make smart keys work for other embedded languages without statement level tagging (just a proc_search function). However, this won't help R (or Kotlin, Groovy, and Scala).
« Last Edit: August 29, 2018, 12:27:08 AM by Clark »