# VS Code cursor jumps to the end of file after execution

**URL:** <https://discourse.julialang.org/t/vs-code-cursor-jumps-to-the-end-of-file-after-execution/50929>\
**Category:** VS Code\
**Tags:** vscode\
**Created:** [November 29, 2020, 8:27am UTC](https://discourse.julialang.org/t/vs-code-cursor-jumps-to-the-end-of-file-after-execution/50929 "2020-11-29T08:27:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedoroff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fedoroff/32/53209_2.png) [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Post date:** [November 29, 2020, 8:27am UTC](https://discourse.julialang.org/t/vs-code-cursor-jumps-to-the-end-of-file-after-execution/50929/1 "2020-11-29T08:27:56Z")

</div>

When I execute a file in VS Code by pressing “Shift+Enter” the cursor jumps to the end of the file. How can I avoid this behavior?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [November 29, 2020, 11:21am UTC](https://discourse.julialang.org/t/vs-code-cursor-jumps-to-the-end-of-file-after-execution/50929/2 "2020-11-29T11:21:35Z")

</div>

Shift+Enter doesn’t evaluate the file, it evaluates the current cell (delimited e.g. by `##`) and moves to the next one. Use the `Julia: Execute File` command to eval the file instead; consider assigning a keybinding yourself or use [the Juno-compatible keybindings](https://github.com/julia-vscode/julia-vscode/wiki/Keyboard-shortcuts#replicating-juno-shortcuts) instead (these might also be the [new default in the next version](https://github.com/julia-vscode/julia-vscode/pull/1785)).

---

<div class="post-metadata">

**Author:** ![fedoroff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fedoroff/32/53209_2.png) [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Post date:** [November 29, 2020, 11:29am UTC](https://discourse.julialang.org/t/vs-code-cursor-jumps-to-the-end-of-file-after-execution/50929/3 "2020-11-29T11:29:04Z")

</div>

Thank you.  
It is strange that there is no default key combination for this purpose.
