- Published on
Intellij to Spacemacs Cheatsheet
- Authors
- Name
- Yair Mark
- @yairmark
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 Action | Spacemacs Equivalent | Comment/s |
---|---|---|
File name search | SPC p f | This will do a fuzzy filename search against all files in the current project |
Search all file contents | SPC / | Fuzzy search the contents of files for a term. Install ag for the best results |
Change Project | SPC p p | This will let you change projects and then fuzzy file name search on changing |
File tree | SPC f t | This toggles the file tree on and off |
Split window horizontally | SPC w - | |
Split window vertically | SPC w / | |
Moving between splits (including the file tree) | ctrl w arrow | |
Formatting Code | SPC 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, usegc
if you want to be able to confirm each selection.Ctrl-c Ctrl-c
: to save changes.