akinsho / toggleterm.nvim

A neovim lua plugin to help easily manage multiple terminal windows
GNU General Public License v3.0
4.06k stars 170 forks source link

[BUG] is there a way to paste in toggle term? #556

Closed justrajdeep closed 4 months ago

justrajdeep commented 4 months ago

Is there an existing issue for this?

Current Behavior

Hi

I am using the suggested mapping

_G.set_terminal_keymaps = function ()
  local opts = {buffer = 0}
  vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
  -- vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
  vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
  vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
  vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
  vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
  vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
end

-- if you only want these mappings for toggle term use term://*toggleterm#* instead
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')

i can press ESC and move around and copy stuff. But I am not able to paste stuff in the terminal

Is there a way to paste stuff in the terminal.

I looked though the issues and document but could not find anything.

TIA

Expected Behavior

Not sure.

Steps To Reproduce

using zsh in my terminal with fzf, C-r opens fzf command picker.

Environment

- OS:
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.5.1804 (Core) 
Release:    7.5.1804
Codename:   Core

- neovim version:
:Verbose :version

NVIM v0.10.0-dev-a89ce8974
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Compilation: /home/rmondal/.local/bin/cc -O2 -g -Og -g -flto=auto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always  -DUNIT_TESTING -DHAVE_UNIBILIUM -D_GNU_SOURCE -DINCLUDE_GENERATED_DECLARATIONS -I/home/scratch.rmondal_mobile/home/neovim/core_neovim/.deps/usr/include/luajit-2.1 -I/home/scratch.rmondal_mobile/home/neovim/core_neovim/.deps/usr/include -I/home/scratch.rmondal_mobile/home/neovim/core_neovim/build/src/nvim/auto -I/home/scratch.rmondal_mobile/home/neovim/core_neovim/build/include -I/home/scratch.rmondal_mobile/home/neovim/core_neovim/build/cmake.config -I/home/scratch.rmondal_mobile/home/neovim/core_neovim/src -I/usr/include 

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/home/rmondal/bin/share/nvim"

Run :checkhealth for more info

- Shell: zsh with zsh

Anything else?

No response

akinsho commented 4 months ago

@justrajdeep how to paste in a terminal is a more general neovim terminal usage question than it is one that constitutes an issue with this plugin so I'm going to close this issue out since unfortunately I don't really have capacity to do a lot of how-to questions and I get quite a few of those so I just redirect them straight away to the help documentation or Reddit