nvimux icon indicating copy to clipboard operation
nvimux copied to clipboard

Ability to send a text object to a quickterm

Open devth opened this issue 5 years ago • 1 comments

Would love to be able to send current line, text object or visual selection to a quickterm with a hotkey, similar to how neoterm does it.

devth avatar Feb 23 '19 00:02 devth

(Not using quickterm)

I use neoterm with nvimux. The config is a bit tricky, I had to set new_window = 'enew | Tnew'.

Here the full conf:

" abstraction on top of neovim terminal
Plug 'kassio/neoterm'

" send stuff to REPL using NeoTerm
nnoremap <silent> <c-s>l :TREPLSendLine<CR>
vnoremap <silent> <c-s>l :TREPLSendSelection<CR>

" simulate tmux shortcuts in neovim
Plug 'Vigemus/nvimux', {'do': 'cp -r ./lua $HOME/.config/nvim/'}

lua << EOF
local nvimux = require('nvimux')
-- Nvimux configuration
nvimux.config.set_all{
  prefix = '<C-Space>',
  new_window = 'enew | Tnew',
  open_term_by_default = true,
  new_window_buffer = 'single',
}
-- Nvimux custom bindings
nvimux.bindings.bind_all{
  {'i', ':NvimuxHorizontalSplit', {'n', 'v', 'i', 't'}},
  {'s', ':NvimuxVerticalSplit', {'n', 'v', 'i', 't'}},
}
-- Required so nvimux sets the mappings correctly
nvimux.bootstrap()
EOF

Hope it can help.

pchampio avatar Mar 28 '19 14:03 pchampio