Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to send a text object to a quickterm #37

Open
devth opened this issue Feb 23, 2019 · 1 comment
Open

Ability to send a text object to a quickterm #37

devth opened this issue Feb 23, 2019 · 1 comment

Comments

@devth
Copy link

devth commented Feb 23, 2019

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.

@pchampio
Copy link

pchampio commented Mar 28, 2019

(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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants