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 6591495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:25:49+00:00 2026-05-25T17:25:49+00:00

I know I can cut 5 characters in vim by typing 5x , and

  • 0

I know I can cut 5 characters in vim by typing 5x, and I often use this to copy and paste text by doing 5xu then pasting them somewhere else.

I am lazy and would rather just yank the 5 characters so I don’t have to undo the cut action.

How can I do this?

  • 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-25T17:25:50+00:00Added an answer on May 25, 2026 at 5:25 pm

    Yank supports standard movement commands. Use y5l (<- that’s a lowercase L)

    And if you want to yank 5 characters backwards, use y5h.

    Now, if you’re feeling really lazy, remap this particular sequence to a key-combination, like so:

    :nnoremap <C-l> y5l
    

    In this case, “yank 5 to the right” gets mapped to Ctrl+L (lowercase L).


    If you’d like, you can also use Space instead of L to yank characters in the forward direction (examples: ySpace for a single character or 5ySpace for 5). Some people may find it to be quicker or easier than hitting L.

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

Sidebar

Related Questions

Does anyone know how can I cut a string and then assign into an
I want to suppress Cut, Copy and Paste operations in Text Box. I don't
Does any one know how can I cut the 1st 3 char in a
This is something I know can be done somehow , because I've done it
I know I can do most of this by hacking Trac and using Git
When I cut and paste from a Word document into VIM, quotes get translated
I know there are lots of truncate scripts out there, but I can't use
Does anyone know how can I cut a string that contain map in jquery/javascript
Does anyone know how can I cut the 1st char from the string in
I know about cut command which can cut a column(s) from a file, but

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.