# Formatting code in vscode

**URL:** <https://discourse.julialang.org/t/formatting-code-in-vscode/68927>\
**Category:** VS Code\
**Created:** [September 29, 2021, 12:35pm UTC](https://discourse.julialang.org/t/formatting-code-in-vscode/68927 "2021-09-29T12:35:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scheinerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scheinerman/32/35303_2.png) [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Post date:** [September 29, 2021, 12:35pm UTC](https://discourse.julialang.org/t/formatting-code-in-vscode/68927/1 "2021-09-29T12:35:33Z")

</div>

I used to be able to format Julia code in VS Code by right-clicking on the file name and a menu would appear with an option to format my code. (I can use JuliaFormatter in the REPL, but doing this in VS Code was particularly convenient.)  
Recently this menu option has vanished and I can’t figure out how to restore it.  
(I’m using VS Code on a Mac.)  
Thanks.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [September 29, 2021, 1:50pm UTC](https://discourse.julialang.org/t/formatting-code-in-vscode/68927/2 "2021-09-29T13:50:57Z")

</div>

`Control-Shift-I` apparently (I usually just use `Control-Shfit-P` and search for `Format...` there.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [September 29, 2021, 2:47pm UTC](https://discourse.julialang.org/t/formatting-code-in-vscode/68927/3 "2021-09-29T14:47:54Z")

</div>

Clicking anywhere in the jl file code and hitting SHIFT+ ALT + F, formats the whole document (or right click menu). Not sure if this is the default keybinding of Julia Formatter extension. Not available in the VSCode explorer file tree though.

---

<div class="post-metadata">

**Author:** ![scheinerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scheinerman/32/35303_2.png) [@scheinerman](https://discourse.julialang.org/u/scheinerman)\
**Post date:** [September 29, 2021, 6:15pm UTC](https://discourse.julialang.org/t/formatting-code-in-vscode/68927/4 "2021-09-29T18:15:12Z")

</div>

Thanks all. I see that if I right click in the editing window (not on the file explorer tree) the Format option is present.
