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

  • Home
  • SEARCH
  • 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 3693658
In Process

The Archive Base Latest Questions

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

I use Vim 7.3 on FreeBSD. I connect to this machine through Putty. When

  • 0

I use Vim 7.3 on FreeBSD. I connect to this machine through Putty. When working on Vim, I’m unable to remap F10 key to do something I want. In my .vimrc, I did the following:

nmap <F10> :!ls<CR>

Then I did, “source $MYVIMRC” to load the changes in .vimrc. When I press F10 after this, it prints ^[[21~ instead of the executing the map. I tried all combination of noremap but nothing works.

Remapping this to other function keys is not an option because they are mapped for other uses.

Just FYI, in Putty configuration options, under Terminal->Keyboard, I have set the “Function keys and keypad” option to “Linux”.

Any suggestion to get this to work?

  • 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-19T04:24:11+00:00Added an answer on May 19, 2026 at 4:24 am

    It sounds like your termcap/terminfo and/or the value of $TERM you’re using are preventing Vim from recognizing the character sequence your terminal is sending for F10 as F10.

    The easy workaround is to map the character sequence. In your .vimrc, type the following:

    nmap <CTRL-V><F10> :!ls<CR>
    

    Where <CTRL-V><F10> is pressing CTRL-V followed by F10. This will result in something like ^[[21~ appearing in your buffer. That’s okay, this mapping should work (at least with that terminal).

    The “right” fix would be to change the value of $TERM, your termcap or terminfo database such that Vim knows that ^[[21~ is F10. Setting $TERM to xterm may work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use vim (7.1) on OpenVMS V7.3-2. I connect to VMS trough a telnet
I am using VIM in Windows. The problem is that I want to use
I use Vim. I open a file. I edit it and I want to
I want to use Vim's quickfix features with the output from Visual Studio's devenv
I want to use a temp directory that will be unique to this build.
I use vim for coding and for python coding in particular. Often I want
I use Vim and GIT to develop my project on a Linux/Ubuntu machine. In
I use Vim and Vim plugins for Visual Studio when writing C++. Often, I
:vimgrep looks like a really useful thing. Here's how to use it: :vim[grep][!] /{pattern}/[g][j]
How do I make vi - Vim never use tabs (converting spaces to tabs,

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.