Lisp in Vim with Slimv or Vlime(susam.in)
susam.in
Lisp in Vim with Slimv or Vlime
https://susam.in/blog/lisp-in-vim-with-slimv-or-vlime/
4 comments
Which plugins did you experiment with?
Can you share your two keybindings with us?
Can you share your two keybindings with us?
Sure, but note they're NeoVim-specific(the terminal buffer works a bit differently there). And I adapted them to work without my other custom shortcuts, so they're longer(and even more indecipherable for sane people...I'm sure this could be done in a cleaner way).
Open a terminal running SBCL on the right with "\ls":
Open a terminal running SBCL on the right with "\ls":
nmap <leader>ls :vsplit<CR><C-w>l:terminal<CR>i sbcl<CR><C-\><C-N><C-w>h
Execute paragraph around cursor with "\e": nmap <leader>e vipy<C-w>lpi<CR><C-\><C-N><C-w>hIs there any modern editor that supports Lisp-oriented development environment like SLIME or one of these plugins? I am not familiar with Vim and I find it hard to get used to all the numerous shortcuts available in Vim.
There was a related article by Steve Losh[1] last year where he too suggested Vlime or Slimv for working with Lisp in Vim. Looks like I finally have to git it a shot.
[1] http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/
[1] http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/
From the OP:
git clone https://github.com/kovisoft/slimv.git ~/.vim/bundle/slimv
echo 'set runtimepath^=~/.vim/bundle/slimv' >> ~/.vimrc
vim +'helptags ~/.vim/bundle/slimv/doc' +q
Is this a common way of installing Vim plugins?I'm not sure what's the mainstream way right now, but I don't think it's commonly done by echoing stuff to the end of the .vimrc file.
My plugin manager is Vundle, where you basically just add a line in the .vimrc with the repository name, and then run :PluginInstall. Quick and easy.
My plugin manager is Vundle, where you basically just add a line in the .vimrc with the repository name, and then run :PluginInstall. Quick and easy.
All I did was set up two keybindings; one that opens a terminal buffer and starts SBCL, and one that copy-pastes the expression around the cursor into that terminal buffer, executes it and jumps back. Worked surprisingly well and allowed me to edit Lisp code in a file while being able to quickly run it on the side.
I do recommend using a plugin like rainbow parentheses, I find that helpful in all languages but especially in Lisp.