When I am editing .Rmd file within a polymode chunk, the mode switches from ESS to Markdown mode whenever I press enter. However, it switches back to ess-mode whenver I save the file.
I will try to demonstrate this: C-hvmajor-modeEnter
major-mode is a variable defined in ‘C source code’.
Its value is ‘ess-r-mode’
Original value was fundamental-mode
Local in buffer hw5.Rmd[R]; global value is fundamental-mode
x <- runif(100)
I run this command with no problem but then I hit enter
```{r}
x <- runif(100)
```
C-hvmajor-modeEnter
major-mode is a variable defined in ‘C source code’.
Its value is ‘markdown-mode’
Original value was fundamental-mode
Local in buffer hw5.Rmd; global value is fundamental-mode
Obviously, I have now lost the ess functionality until I save the file.
C-xC-s
Now it is back to ess-mode. C-hvmajor-modeEnter
major-mode is a variable defined in ‘C source code’.
Its value is ‘ess-r-mode’
Original value was fundamental-mode
Local in buffer hw5.Rmd[R]; global value is fundamental-mode