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

why i can't work in the same termninal #25

Closed
likelxl opened this issue Apr 16, 2021 · 4 comments
Closed

why i can't work in the same termninal #25

likelxl opened this issue Apr 16, 2021 · 4 comments

Comments

@likelxl
Copy link

likelxl commented Apr 16, 2021

i use the latest neovim and plugin,my config is below:

require"toggleterm".setup{
  size = 20,
  open_mapping = [[<c-A-\>]],
  shade_filetypes = {},
  shade_terminals = true,
  shading_factor = '<number>',
  start_in_insert = true,
  persist_size = true,
  direction = 'horizontal',
}

before i can use number and this keymap([c-a-]) use the same serial number term to run diffrent command in their respective term,but now it can't, every time it open a new term with clear info, then the command I ran is missing, it can't be reduced.
What can I do to achieve the previous effect?

@akinsho
Copy link
Owner

akinsho commented Apr 16, 2021

@likelxl I'm not sure I understand entirely what you mean. I've just tested my mapping and everything still works. The open mapping you are using doesn't look like a valid vim mapping I don't think you can bind those keys like that. I think what that mapping should look like is <c-a>\ maybe. But in any case I need more information about what exactly you are doing step by step that isn't working

@likelxl
Copy link
Author

likelxl commented Apr 17, 2021

录屏_deepin-terminal_20210417091202
the command I ran is missing, because it open a new term
before it works like this video:
录屏_deepin-terminal_20210417092002

@akinsho
Copy link
Owner

akinsho commented Apr 17, 2021

@likelxl I was able to reproduce your issue and it seems to happen if you don't set hidden in your neovim config. I just assumed that everyone using vim has this setting on tbh. Not sure why the refactor has exposed this problem. Probably because it now uses nvim apis to close the window. Can add
set hidden or vim.o.hidden = true (if using lua to your config and see if fixes this for you)

@likelxl
Copy link
Author

likelxl commented Apr 18, 2021

ok, set hidden, solve my problem

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