Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7620717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:00:19+00:00 2026-05-31T04:00:19+00:00

I have tmux set up with $TERM being set to screen-256color correctly. This works

  • 0

I have tmux set up with $TERM being set to screen-256color correctly. This works fine, and colours are set correctly, however it prevents me from sending HOME and END keys to the terminal, which are instead printed as F\n and H\n.

I should add that home appears to work in irssi, but not vim. Home seems to send (According to Ctrl+v <HOME>), ^[OH

It may be worth adding that I am well aware of the ability to use ^ and $ to move to the start and end of the lines, however $ does not go to the end, rather the penultimate character, and I prefer to use HOME and END (as I can under other $TERM settings).

Can anyone explain why this is, and how I can fix it?

As a part-way fix, I set the vim keybindings to map a <Home> and <End> keypress to <Esc>OH and <Esc>OF. This isn’t ideal, but works for the moment! See https://github.com/jvc26/dotfiles/blob/master/.vimrc for details.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:00:21+00:00Added an answer on May 31, 2026 at 4:00 am

    The above mapping solution doesn’t affect the command mode or visual mode. The following is a more ideal solution until either tmux or vim fixes the bug (put in your .vimrc):

    """"""""""""""
    " tmux fixes "
    """"""""""""""
    " Handle tmux $TERM quirks in vim
    if $TERM =~ '^screen-256color'
        map <Esc>OH <Home>
        map! <Esc>OH <Home>
        map <Esc>OF <End>
        map! <Esc>OF <End>
    endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a SQL problem, adding this model all works correctly, the problem is in
I'm just learning tmux and I have no experience with screen. I'm wondering if
I have used screen sharing (via Skype and joinme), as well as tmux. tmux
I have vim and tmux set up. I'm trying to get vim-powerline to look
I have installed tmux from source on my localspace in Fedora. It was working
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
I'm running iterm2 and when I'm in tmux mode the colorscheme I have set
I recently switched from using screen to tmux (obtained through macports), as I like
Instead of having to type tmux every time, how could I have tmux always
have written this little class, which generates a UUID every time an object of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.