# Use custom code editor (Emacs, Atom, VS Code...) when opening Pascal source from CGE editor

**URL:** https://forum.castle-engine.io/t/use-custom-code-editor-emacs-atom-vs-code-when-opening-pascal-source-from-cge-editor/341
**Category:** News
**Created:** [May 16, 2021, 11:56pm UTC](https://forum.castle-engine.io/t/use-custom-code-editor-emacs-atom-vs-code-when-opening-pascal-source-from-cge-editor/341 "2021-05-16T23:56:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [May 16, 2021, 11:56pm UTC](https://forum.castle-engine.io/t/use-custom-code-editor-emacs-atom-vs-code-when-opening-pascal-source-from-cge-editor/341/1 "2021-05-16T23:56:59Z")

</div>

| [![custom-code-editor](https://castle-engine.io/wp/wp-content/uploads/2021/05/custom-code-editor-200x147.png)](https://castle-engine.io/wp/wp-content/uploads/2021/05/custom-code-editor.png "custom-code-editor") |

A small but important improvement to our [CGE editor](https://castle-engine.io/manual_editor.php): Now various commands that open Pascal files can use your custom editor, configured in _Preferences -\> Code Editor_. By default we keep invoking [Lazarus](https://www.lazarus-ide.org/) but you can now freely change it.

This affects a few editor commands:

- menu item _Edit Unit…_,
- menu item _Edit Unit Associated With Open Design (F12)_,
- opening newly added unit at _New Unit…_,
- opening Pascal file by double-clicking in _Files_ browser,
- menu item _Open Project in Code Editor_ (previously called _Open Project in Lazarus_)

Note that it means you don’t even need to install [Lazarus](https://www.lazarus-ide.org/) and you still have a 100% functional CGE editor integrated with your favorite code editor. For CGE applications [using TCastleWindowBase](https://castle-engine.io/manual_window.php) (which is what we advise by default) you don’t need Lazarus or LCL, “bare” FPC installation is enough.
