IDEmacs aims to be a set of Emacs configurations which provide an out-of-the-box experience similar (if not identical) to popular GUI IDEs and editors.
It is aimed at…
- Programmers coming to Emacs from other IDEs, or even first-time programmers familiar with only office applications.
-
Beginner Common Lisp and Scheme programmers, who need the functionality of Emacs (Sly/Geiser + structural editing) without having to perform unnecessary setup and without dealing with an alien style of keybindings. In other words, similar to Portacle or Guile Studio.
- Some may say that we should improve support for Common Lisp and Scheme in other editors and IDEs instead. Still others may say that we should work on a better Lisp IDE than Emacs instead (such as Second Climacs or Lem). All great points. IDEmacs is just a band-aid for the present situation, where Emacs + Sly/Geiser is the best Lisp/Scheme IDE.
- Non-programmers who want a fully-featured Org, Markdown, or LaTeX editor with idiomatic shortcuts and mouse-friendly GUI.
It provides…
-
GUI and mouse support, in addition to a keyboard-driven interface.
-
Keybindings that follow popular GUI and IDE conventions.
- CUA mode is just the start - much more keybinding configuration is needed to provide an unsurprising experince. And that's before we even get to the IDE-specific keybindings.
- This excludes starter kits that use Evil by default, such as Spacemacs or Doom.
-
A fully-featured, fast, and configuration-free Emacs experience, like any starter kit/distro.
- The configuration uses idiomatic Elisp and contains a generous amount of comments, valuable to anyone interested in learning to configure Emacs using Elisp.
Perfectly imitating the GUIs and subtle behaviour differences of IDEs is desirable, but not top priority. Given our limited resources, we aim for "good enough".
We hope this gives new users a comfortable starting point, and make them more likely to stick around to discover the possibilities of Emacs' malleability, rather than being driven off by the default experience.
VSCode configuration (WIP)
This is the first and currently the only IDE configuration provided.
init.el source with vscode-dark-plus theme, treemacs, centaur-tabs, minimap, idle-highlight-mode, blamer, diff-hl, and breadcrumb.
Currently, it brings together -
- VSCode Dark Plus theme
- Treemacs for the sidebar file browser ("Explorer")
- Centaur Tabs for the tab bar
breadcrumbto show file paths as breadcrumbsidle-highlight-modeto automatically highlight occurrences of the symbol at point- Emulation of most keybindings listed in the "General", "Basic Editing", "Rich Languages Editing", and "Multi-cursor and selection" sections of the VSCode keyboard shortcuts cheatsheet.
- All editing packages required for emulation, including
whole-line-or-region,expand-region,multiple-cursors, andsmartparens vcandmagitfor version controldiff-hlandblamerto show in-buffer version control information- A comprehensive collection of completion packages - Vertico,
orderless, Consult,marginalia, andcompany. - Lisp editing packages -
sly,geiser, andadjust-parens(similar to Parinfer) eatfor terminals- Sensible Emacs defaults, and other goodies -
org-superstar,pdf-tools,undo-tree,helpful,rainbow-mode, …
use-package is used to keep the code organized.
Keybinding coverage
An empty command cell means we haven't bound anything to these keys yet.
General
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
C-S-p |
Show Command Palette | execute-extended-command |
VSCode also binds F1 to this, but we currently leave that to the Emacs help prefixes. |
C-p |
Quick Open, Go to File | consult-locate |
FIXME - behaviour differs from VSCode. Without a search term, VSCode suggests currently- and recently-opened files. Once a search term is entered, it searches for currently- and recently-opened files and the files in the currently opened project. |
C-S-n |
New window/instance | make-frame |
|
C-w |
Close window/instance | idemacs-kill-buffer-noprompt |
|
C-, |
User Settings | customize |
|
C-k C-s |
Keyboard Shortcuts | We need to make an interface for this. |
Keys not mentioned in the VSCode keyboard shortcuts PDF
| Keybinding | IDEmacs-VSCode command | Notes |
|---|---|---|
<escape> |
idemacs-escape |
Tries to provide VSCode behaviour while also acting as C-g |
C-a |
idemacs-select-all |
|
C-k C-o |
treemacs-select-directory |
FIXME - behaviour differs from VSCode. This should not just open a directory in Treemacs but also load the corresponding desktop file for it. |
Basic editing
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
C-x |
Cut line (empty selection) | cua-cut-handler |
empty selection behaviour is TODO |
C-c |
Copy line (empty selection) | cua-copy-handler |
empty selection behaviour is TODO |
M-<up> / M-<down> |
Move line up/down | drag-stuff-up / drag-stuff-down |
|
C-S-k |
Delete line | whole-line-or-region-kill-region |
|
C-RET / C-S-RET |
Insert line below/above | idemacs-open-line / idemacs-open-line-above |
|
C-S-\ |
Jump to matching bracket | ||
C-] / C-[ |
Indent/Outdent line | ||
<home> / <end> |
Go to beginning/end of line | move-beginning-of-line / move-end-of-line |
vanilla Emacs defaults |
C-<home> / C-<end> |
Go te beginning/end of file | beginning-of-buffer / end-of-buffer |
vanilla Emacs defaults |
C-<up> / C-<down> |
Scroll line up/down | scroll-down-line / scroll-up-line |
|
M-<prior> (Page Up) / M-<next> (Page Down) |
Scroll page up/down | ||
C-S-[ / C-S-] |
Fold/unfold region | ||
C-k C-[ / C-k C-] |
Fold/unfold all subregions | ||
C-k C-0 / C-k C-j |
Fold/unfold all regions | ||
C-k C-c |
Add line comment | idemacs-comment-line |
In VSCode, subsequent presses add additional comment characters to the start of the line, whereas IDEmacs-VSCode just toggles the comment. |
C-k C-u |
Remove line comment | idemacs-comment-line |
In VSCode, subsequent presses remove additional comment characters from the start of the line, whereas IDEmacs-VSCode just toggles the comment. |
C-/ |
Toggle line comment | ||
C-S-a |
Toggle block comment | ||
M-z |
Toggle word wrap | toggle-truncate-lines |
Rich languages editing
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
C-SPC, C-i |
Trigger suggestion | ||
C-S-SPC |
Trigger parameter hints | ||
C-S-i |
Format document | ||
C-k C-f |
Format selection | ||
<f12> |
Go to definition | xref-find-definitions |
|
C-S-<f10> |
Peek definition | ||
C-k <f12> |
Open definition to the side | ||
C-. |
Quick fix | ||
S-<f12> |
Show references | xref-find-references |
|
<f2> |
Rename symbol | ||
C-k C-x |
Trim trailing whitespace | delete-trailing-whitespace |
|
C-k m |
Change file language |
Multi-cursor and selection
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
M-<down-mouse-1> |
Insert cursor | mc/toggle-cursor-on-click |
|
M-S-<up> / M-S-<down> |
Insert cursor above/below | mc/mark-previous-lines / mc/mark-next-lines |
|
C-u |
Undo last cursor operation | ||
M-S-i |
Insert cursor at end of each line selected | mc/edit-ends-of-lines |
|
C-l |
Select current line | ||
C-S-l |
Select all occurrences of current selection | mc/mark-all-like-this |
|
C-<f2> |
Select all occurrences of current word | mc/mark-all-words-like-this |
|
M-S-<right> |
Expand selection | er/expand-region |
|
M-S-<left> |
Shrink selection | er/contract-region |
|
M-S-<down-mouse-1> |
Column (box) selection | idemacs-mouse-drag-rectangle |
Display
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
<f11> |
Toggle full screen | toggle-frame-fullscreen |
vanilla Emacs defaults |
M-S-0 |
Toggle editor layout (horizontal/vertical) | ||
C-\= / C-- |
Zoom in/out | text-scale-increase / text-scale-decrease |
|
C-b |
Toggle sidebar visibility | ||
C-S-e |
Show Explorer/ Toggle focus | idemacs-treemacs |
|
C-S-f |
Show Search | ||
C-S-g |
Show Source Control | magit-status |
|
C-S-d |
Show Debug | ||
C-S-x |
Show Extensions | list-packages |
We need to write a better interface. Elpaca may be an option. |
C-S-h |
Replace in files | isearch-query-replace |
We need an incremental, multi-file replacement UI. |
C-S-j |
Toggle Search details | ||
C-S-c |
Open new command prompt/terminal | ||
C-k C-h |
Show output panel | ||
C-S-v |
Open Markdown preview | ||
C-k v |
Open Markdown preview to the side | ||
C-k z |
Zen Mode (Esc Esc to exit) |
Search and replace
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
C-t |
Show all symbols | ||
C-g |
Go to line | consult-line |
|
C-p |
Go to file | consult-locate |
FIXME - behaviour differs from VSCode |
C-S-o |
Go to symbol | consult-imenu-multi |
FIXME - behaviour differs from VSCode |
C-S-m |
Show problems panel | ||
<f8> |
Go to next error or warning | ||
S-<f8> |
Go to previous error or warning | ||
C-S-<tab> |
Navigate editor group history | ||
C-M-- |
Go back | ||
C-S-- |
Go forward | ||
C-m |
Toggle Tab moves focus |
Editor management
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
C-w |
Close editor | idemacs-kill-buffer-noprompt |
FIXME - behaviour differs from VSCode |
C-k f |
Close folder | ||
C-\ |
Split editor | split-window-right |
|
C-1 / C-2 / C-3 |
Focus into 1st, 2nd, 3rd editor group | select-window-1, select-window-2, select-window-3 |
FIXME - behaviour differs from VSCode |
C-k C-<left> |
Focus into previous editor group | ||
C-k C-<right> |
Focus into next editor group | ||
C-S-<prior> |
Move editor left | ||
C-S-<next> |
Move editor right | ||
C-k <left> |
Move active editor group left/up | ||
C-k <right> |
Move active editor group right/down |
File management
| Keybinding | VSCode description | IDEmacs-VSCode command | Notes |
|---|---|---|---|
C-n |
New file | untitled-new-buffer |
|
C-o |
Open file | find-file |
|
C-s |
Save | save-buffer |
|
C-S-s |
Save As | write-buffer |
|
C-w |
Close | idemacs-kill-buffer-noprompt |
|
C-k C-w |
Close all | ||
C-S-t |
Reopen closed editor | ||
C-k Enter |
Keep preview mode editor open | ||
C-<tab> |
Open next | ||
C-S-<tab> |
Open previous | ||
C-k p |
Copy path of active file | ||
C-k r |
Reveal active file in Explorer | ||
C-k o |
Show active file in new window/instance |
Help needed!
Users -
- Use IDEmacs. Observe newbies as they use IDEmacs.
- Provide your feedback in our Jabber/XMPP room or in the issues.
- Tell others about IDEmacs!
Developers -
Prior art
-
https://github.com/seamus-brady/mousemacs
From the author -
I created this abomination so I could learn Lisp without having to worry too much about learning Emacs. It was originally envisaged for me to use and then switch off as I learned Emacs. But I actually liked it better and now it is my main editor.
Mousemacs works pretty much like Sublime Text or Visual Studio Code out of the box. But it has the full power of Emacs underneath. All I did was take all the most useful Emacs packages and wrap them in a mouse friendly distribution. It is not perfect and certainly not for everyone, but it might be useful for some. It comes with a simple plain theme but it is still Emacs.