skip to Main Content

I am having neovim and vim in my machine sharing same vimrc file.

When i press home and end key it works inside vim but not in neovim.

Neovim is installed using AppImage.

Vim version is : VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  9 2019 03:17:15)
NeovIm version is : NVIM v0.4.4
Build type: RelWithDebInfo
LuaJIT 2.0.5
OS :Centos 7

I tried set term=xterm and set term=xterm-256color but it fails

E518: Unknown option: term=xterm-256color

echo $TERM returns xterm

How to enable home and end button in nvim?

Update:
There is a help document , :help $TERM

When i changed the term export TERM=putty-256color ,it works.
But i have to keep setting it many times . Need a way to set it in vimrc.

2

Answers


  1. I use tmux and had TERM set to xterm-256color. It was fixed after setting it to screen-256color.

    Source: https://github.com/neovim/neovim/issues/6134

    Login or Signup to reply.
  2. Add this to your tmux config:

    bind-key -n Home send Escape "OH"
    bind-key -n End send Escape "OF"
    

    source: https://github.com/neovim/neovim/issues/6134#issuecomment-758475291

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search