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

intero repl navigation #97

Closed
kinsho6i7h opened this issue Sep 19, 2017 · 4 comments
Closed

intero repl navigation #97

kinsho6i7h opened this issue Sep 19, 2017 · 4 comments

Comments

@kinsho6i7h
Copy link

This may be me, not a bug.

repl starts with io. I switch split. Cursor is now in repl window but, is misplaced and inactive.

'i' changes this to :terminal and the repl works fine.

However, the only way to exit I can see is CTRL-d which kills the repl and the split returning me to the source. Surely this isn't right ?

What am I missing?

@parsonsmatt
Copy link
Owner

Neovim's terminal emulator uses Ctrl-\ Ctrl-n as an escape sequence which puts you back in normal mode.

This is inconvenient, so I setup the following keymaps in my configuration:

" Alt-{hjkl} for navigating panes
tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
nnoremap <A-h> <C-w>h
nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l

That allows you to use Alt-{h,j,k,l} to navigate splits in both terminal and normal mode.

@kinsho6i7h
Copy link
Author

Many thanks, it was driving me crazy. Will adapt the dot file.
Might be worth adding these keymaps to the docs.

@parsonsmatt
Copy link
Owner

Could be! If enough people are confused by this aspect of neovim, I'll add a note.

Onlookers: throw a thumbs up on this comment if you want this info in a more visible place :)

@kinsho6i7h
Copy link
Author

Just to add, worked great and, I came to nvim from vim purely to use intero-nvim so was unaware of escape sequences. I usually just use ESC to get out of mode.

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