Say I have any code on VS Code:
function es(n::Int)
isprime = trues(n)
isprime[1] = false
for i in 2:isqrt(n)
if isprime[i]
for j in i^2:i:n
isprime[j] = false
end
end
end
return filter(x -> isprime[x], 1:n)
end
If I place the cursor on the first line and I press ctrl+Enter only the first line is executed. Other programs such as Rstudio+R would execute the whole block detecting automatically its closing end or brackets.
I know we can manually select the lines we want and execute them, but it’s a much slower procedure and strangelly breaks all indentation to the right.
What combination of keys let me execute the whole block from my position?
Or do we need to modify something on the settings?