Published on

Intellij to Spacemacs Cheatsheet


I have been using Spacemacs on and off for a few years now. But I have never really dug into it properly to get more out of it.

Having used it more and more recently I have started to gravitate towards it. I have found how to do many of the things I am used to from IntelliJ in Spacemacs.

I installed Spacemacs as described on the official site. I then started it up the first time and chose the evil mode options which gives you vim keybindings.

My cheatsheet which I will update as I dig more into Spacemacs is below:

IntelliJ ActionSpacemacs EquivalentComment/s
File name searchSPC p fThis will do a fuzzy filename search against all files in the current project
Search all file contentsSPC /Fuzzy search the contents of files for a term. Install ag for the best results
Change ProjectSPC p pThis will let you change projects and then fuzzy file name search on changing
File treeSPC f tThis toggles the file tree on and off
Split window horizontallySPC w -
Split window verticallySPC w /
Moving between splits (including the file tree)ctrl w arrow
Formatting CodeSPC m =See here for more details

Project Wide Find and Replace

This is a bit more involved. I found the answer on how to do this in this post basically what you do is:

  • SPC /: To do a helm-ag search for the term you wish to find/replace.
  • Ctrl-c Ctrl-e: To enter a helm-ag-edit buffer - this will allow you to find replace the results you see.
  • %s/termToFind/replacement/g: To actually make the find and replace, use gc if you want to be able to confirm each selection.
  • Ctrl-c Ctrl-c: to save changes.