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

Failed switch between panels when inside Termdebug window #239

Closed
ingjieye opened this issue Aug 8, 2019 · 2 comments
Closed

Failed switch between panels when inside Termdebug window #239

ingjieye opened this issue Aug 8, 2019 · 2 comments

Comments

@ingjieye
Copy link

ingjieye commented Aug 8, 2019

So I have vim inside Tmux. Everything's works great.
Bug after VIM 8.1, there's a feature called Termdebug that I can run gdb inside VIM.
It'll open some panels inside VIM.
When I'm inside debug panel inside VIM. I can't switch between panels as usual.

@christoomey
Copy link
Owner

Hi @ingjieye. Can you test a few things?

  • What is the output of :verbose nmap <C-k> when run in the gdb pane?
  • Does running :TmuxNavigateUp directly work, or similarly fail?

@ingjieye
Copy link
Author

ingjieye commented Aug 9, 2019

  • :verbose nmap <C-k>:
n  <C-K>       * :TmuxNavigateUp<CR>
        Last set from ~/.vim/plugged/vim-tmux-navigator/plugin/tmux_navigator.vim line 21
  • Directly running :TmuxNavigateUp inside gdb pane works.

I notice that gdb pane inside Vim is just a gdb running inside vim embedded terminal.
So turns out that the problem is how to map shot-cuts inside vim-term.

I've paste this pr's change into my .vimrc. 63120c1. Then I can switch panes between Vim and Tmux.

Except that when I switch out of vim-term.

屏幕快照 2019-08-09 上午9 42 43

屏幕快照 2019-08-09 上午9 43 01

The vim-term pane goes into text mode that when I switch back I have to press a to get it working.

So I've changed a little bit into

if exists(':tnoremap')
 tnoremap <silent> <c-h> <c-w>:TmuxNavigateLeft<cr>
 tnoremap <silent> <c-j> <c-w>:TmuxNavigateDown<cr>
 tnoremap <silent> <c-k> <c-w>:TmuxNavigateUp<cr>
 tnoremap <silent> <c-l> <c-w>:TmuxNavigateRight<cr>
 tnoremap <silent> <c-\> <c-w>:TmuxNavigatePrevious<cr>
endif

Every thing works fine.
I also have FZF installed and when I navigate FZF result with Ctrl + k / Ctrl + j. It haven't conflict as discussed in
#172
#128

@ingjieye ingjieye changed the title Failed switch panel when in Termdebug window Failed switch between panels when inside Termdebug window Aug 9, 2019
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