Chris Stryczynski

Software Developer / Consultant

Spacemacs to Vim migration guide

Posted on: 01/03/2020

I give up on Spacemacs/Emacs it’s just too fucking unreliable sometimes. I started with Vim, switched to Spacesmacs/Emacs for 3 years and now I’m going back to vim.

So here is a rough migration guide or at least a documentation of my experience… Because I do actually think emacs shortcuts are better- often utilizing ALT etc, and maybe just have better default - while with Vim I’m usually too lazy to configure things.

After a few months I’ve realized I only need a few essential keyboard shortcuts setup:

let mapleader=" "


map <leader>fr :History<cr>
map <leader>fs :w<cr>
map <leader>/ :Rg  
map <leader>* :Rg <C-R><C-W><cr>
map <leader>wF :silent execute '!gnome-terminal -- zsh -i -c "cd ' shellescape(expand("%:h")) '; vim' shellescape(expand("%:p")) '; zsh -i"' <cr>
nnoremap - :Ranger<CR>

The cryptic looking command for <leader>wF just opens a new terminal window with the current file, which is the substitute for opening a new frame in emacs.

And here is the list of plugins I’ve ended up with:

Plug 'bluz71/vim-nightfly-guicolors'
Plug 'tyrannicaltoucan/vim-deep-space'
Plug 'neovimhaskell/haskell-vim'
Plug 'yegappan/mru'
Plug 'francoiscabrol/ranger.vim'
Plug 'rbgrouleff/bclose.vim'
Plug 'LnL7/vim-nix'
Plug 'vim-scripts/vim-auto-save'
Plug 'tpope/vim-commentary'
Plug 'masukomi/vim-markdown-folding'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'Shougo/denite.nvim'
Plug 'dunstontc/projectile.nvim'
Plug 'Yggdroot/indentLine'
Plug 'luochen1990/rainbow'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/vim-easy-align'
Plug 'sbdchd/neoformat'
Comments

No comments, yet!

Submit a comment