# Suggestion: VS code and automatic end statement when enter is hit

**URL:** <https://discourse.julialang.org/t/suggestion-vs-code-and-automatic-end-statement-when-enter-is-hit/74186>\
**Category:** Tooling\
**Tags:** suggestions, vscode\
**Created:** [January 7, 2022, 11:43am UTC](https://discourse.julialang.org/t/suggestion-vs-code-and-automatic-end-statement-when-enter-is-hit/74186 "2022-01-07T11:43:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheGrowingPlant443](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thegrowingplant443/32/32431_2.png) [@TheGrowingPlant443](https://discourse.julialang.org/u/TheGrowingPlant443)\
**Post date:** [January 7, 2022, 11:43am UTC](https://discourse.julialang.org/t/suggestion-vs-code-and-automatic-end-statement-when-enter-is-hit/74186/1 "2022-01-07T11:43:45Z")

</div>

I know there is auto completion in the julia vs code extensions. My surggestion is this when on a code line that starts with `for` or `if` and so on then when enter button is pressed at the end of that line then a end statement appears on the next line. This would make so you dont have to think about pressing enter for the auto completion.

If there already exist such a tool I would love to know about it.

---

<div class="post-metadata">

**Author:** ![czylabsonasa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/czylabsonasa/32/8663_2.png) [@czylabsonasa](https://discourse.julialang.org/u/czylabsonasa)\
**Post date:** [October 11, 2024, 8:22am UTC](https://discourse.julialang.org/t/suggestion-vs-code-and-automatic-end-statement-when-enter-is-hit/74186/2 "2024-10-11T08:22:45Z")

</div>

not exactly the “close it with enter”, but it it works:

> [@Configure vscode to automatically complete code blocks with 'end' as appropriate](https://discourse.julialang.org/t/configure-vscode-to-automatically-complete-code-blocks-with-end-as-appropriate/56430):
>
> I find myself manually typing ‘end’ several lines down from a function header, then moving the cursor back into the function body to create the function. Is it possible to configure VSCode to do this automatically whenever I write ‘function’, ‘begin’, etc…?
