Switch from spacemacs to vim painlessly
It’s obvious that I am both a vimmer and spacemacs user (not a spacemacs hacker, yet). I was really amazed by spacemacs’ beautiful GUI and mnemonic keybindings when using it at the first time. Now, I oftern use spacemacs in GUI environment. However, I still prefer vim in terminal, for it’s much faster than emacs, especially when opening some small files.
Vim is definitely my first choice in terminal, but spacemacs’ beautiful appearance is utterly appealing and its efficient keybindings indeed contribute to help me remember much more key mappings in vim. Hence I write a vim colorscheme space-vim-dark based on spacemacs-theme. What’s more, I reconfigure my vim configuration based on spacemacs’ priciples, which is space-vim.
Mnenomic keybindings. commands have mnemonic prefixes like
SPC bfor all the buffer commands.
Meanwhile, the whole key bindings have been well adapted for vim for the lack of great plugins similar to which-key in emacs. Most key bindings are limited to no more than two keystrokes without counting
SPC x dto delete trailing whitespaces.
For different language layers,
,as default in space-vim, can be seen as the major-mode prefix in spacemacs.
I use the similar layer concept to organize the vim configuraitons.
" You can enable the existing layers in space-vim and " exclude the partial plugins in a certain layer. " The command Layer and Exlcude are vaild in the function Layers(). function! Layers() " Default layers, recommended! Layer 'fzf' Layer 'unite' Layer 'better-defaults' endfunction " Put your private plugins here, e.g., change the colorscheme. function! UserInit() " Space has been set as the default leader key, " Comma has been set at the default localleader key. " If you want to change it, uncomment and set it here. " let g:spacevim_leader = "your leader key" " let g:spacevim_localleader = 'your localleader key' " Install private plugins Plug 'morhetz/gruvbox' endfunction " Override the existing configurations and add extras here. function! UserConfig() " color gruvbox endfunction
For more details, please see space-vim. Hope you like it too.