Fork me on GitHub
#vim
<
2018-11-16
>
dominicm06:11:19

@schmee cpp is what you want?

schmee07:11:50

@dominicm I think you meant to ping @lwhorton? 🙂

dominicm07:11:10

I did yes. Your slack squares are very similar!

lwhorton15:11:43

not quite, cpp evals the form under cursor (awesome). i want something that is like a shortcut to select-copy-paste into the repl.

dave15:11:23

@lwhorton you might have a look at neoterm: https://github.com/kassio/neoterm i'm not sure if it will work out-of-the-box for clojure, but it seems equipped to do that exact thing

👍 4
schmee16:11:37

I just switched from “macvim + rebel-readline in a separate terminal” to “neovim + neoterm” and it’s so good!

dave16:11:24

@schmee cool! did you have to do anything special to get clojure working with neoterm? i've never tried it

schmee16:11:08

not really, I added some shortcuts and changed the default REPL, otherwise it just works out of the box:

nnoremap <leader>r :T (do (require 'user :reload) (user/refresh))<cr>
nnoremap <leader>e :T (do (require 'user :reload) (user/reload))<cr>
let g:neoterm_default_mod = 'vertical'
nmap gl <Plug>(neoterm-repl-send)
augroup Clj
  au!
  au FileType clojure call neoterm#repl#set('lr')
augroup END
nmap ga glab

schmee16:11:35

I use parinfer-rust so ga means “evalute the parenthesised form currently under the cursor”

schmee16:11:18

and gl allows me to eval an arbitrary motion command’s worth of code

schmee16:11:06

@lwhorton this sounds like what you’re after ^

👍 4
schmee16:11:10

neovim only though 😕

dave18:11:40

that sounds great!

dave18:11:45

i'll have to try it sometime