jpalardy / vim-slime

A vim plugin to give you some slime. (Emacs)
http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/
MIT License
1.83k stars 223 forks source link

Issue with SlimeCellsSendAndGoToNext and multiline comments in Julia #361

Closed fofusa closed 1 year ago

fofusa commented 1 year ago

Currently SlimeCellsSendAndGoToNext does not handle properly julia multiline comments with two or more empty lines

MWE:

##
# Normal cell, should be executed
a = 1
##
# Commented out cell using multiline comments, should not be executed
#=

a = 2
=#
##
# test cell, should return 1, not 2
a
##

Expected output (using 3x SlimeCellsSendAndGoToNext)

julia> a
1

Actual output

ERROR: syntax: incomplete: unterminated multi-line comment #= ... =#
Stacktrace:
 [1] top-level scope
   @ none:1

julia> a = 2
2

julia> =#
ERROR: syntax: unexpected "="

Note :

Removing one of the two blank lines in the commented out cell fixes the problem. Hope it helps improving vim-slime,

FoFuSa

jpalardy commented 1 year ago

Hi @fofusa

Thanks for opening this issue ⬆️

I don't use SlimeCellsSendAndGoToNext or Julia myself — so, I'll need more time to understand why it's happening. I'll report back when I find something.

jpalardy commented 1 year ago

Hi @fofusa

Hmmm… there's no SlimeCellsSendAndGoToNext in my repo, where does that come from for you?

fofusa commented 1 year ago

Hello, Argh, sorry for the noise: this comes from vime-slime-cells, not vim-slime! I installed both and I mixed up the repos, I'll re-post the issue over there.

Fofusa

jpalardy commented 1 year ago

no problem, thanks ^