This project tries to mimic Spacemacs key bindings in IDEs based on the IntelliJ platform, i.e. IntelliJ IDEA, PyCharm, CLion, PhpStorm, WebStorm, RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive, and Android Studio.
For instance, SPC f f in Spacemacs opens a file, so it makes sense to map it
to the “GotoFile” IntelliJ action.
This project can be seen as a set of configuration files for the IdeaVim plugin,
which enables vim emulation inside IntelliJ platform.
~/.ideavimrc is the file where IdeaVim lets you add Vim initialization
commands, i.e. this file is like ~/.vimrc for vim.
IdeaVim parses the most common vim commands, together with the custom
:action {name} command, used to execute arbitrary IDE actions.
To list all IDE actions use the command :actionlist [pattern].
IntelliSpace provides different files, which can be included individually in
your own .ideavimrc file, in order to get only the functionalities you want.
IntelliSpace is composed of three modules:
- spacemacs
- This module contains spacemacs settings and key bindings that can be replicated with a similar behaviour in the IntelliJ platform.
- extra
- This module contains settings and key bindings not present in spacemacs, but that may be useful in the IntelliJ platform.
- major
- This module contains key bindings that start with
SPC m, that may or may not be present in some spacemacs major mode.
Furthermore, IntelliSpace provides some of the features of spacemacs hybrid
mode, which may be enabled by sourcing the file ./intelli-space/hybrid.vim.
Read ./KEYBINDINGS.org to see all available key bindings.
- Install IdeaVim by using the IDE’s plugin manager (File -> Settings -> Plugins -> Search for IdeaVim -> Install IdeaVim).
- Clone this repository in your home directory:
cd ~ git clone https://github.com/MarcoIeni/intelli-space
- In your home directory, create the file
.ideavimrcand edit it in order to include the modules you want by sourcing the relative source files. In the following there is an example of.ideavimrcfile that includes all the functionalities offered by IntelliSpace. In this file you can also include your own vim commands." selected IntelliSpace modules source ./intelli-space/spacemacs.vim source ./intelli-space/extra.vim source ./intelli-space/major.vim source ./intelli-space/hybrid.vim " my own vim commands nnoremap Y y$
- (optional) source your vimrc file by adding the line
source ~/.vimrcin.ideavimrc(you may break something).
In order to update run git pull inside the intelli-space directory.
The key bindings work only when you are inside the code.
For example, if you are inside the project window they don’t work.
Press <Esc> to focus the last visited code window and you will be able to
use IntelliSpace key bindings again.
In order to scroll menus without using arrow keys, press SPC f e d to go to
IDE’s settings and set a custom shortcut for the actions Down and Up in the
menu Keymap -> Editor Actions.
For example, you can bind them to Ctrl + j and Ctrl + k.
If you have some conflicts, search the editor action the key is assigned to,
right click and remove the binding.
Open a file in Emacs with keyboard shortcut follow this guide.
- VSpaceCode - Spacemacs’ like key bindings for Visual Studio Code (thanks for the inspiration)