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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:53:48+00:00 2026-05-11T21:53:48+00:00

I want to use Vim’s soft wrap capability ( :set wrap ) to wrap

  • 0

I want to use Vim’s soft wrap capability (:set wrap) to wrap some code at 80 characters, regardless of my actual window width.

I haven’t been able to find a way to do this yet – all the soft wrapping seems tied to the width of the window

  • textwidth and wrapmargin are both for hard wrapping (they insert newline characters into the file)
  • vertical splitting into multiple windows and using :vertical resize 80 (possibly with :set breakat= to allow breaks on any character) on one of them sort of works (even though it’s a bit hackish), but breaks when using :set number as the line numbers take up a variable number of columns (depending on the file length) and these are part of the 80.

Is there any way to do this in vim? It doesn’t look promising, according to other sources.

Right now my approximation is just to have /^.\{80}\zs.\+ as my default search so it’s at least highlighted. I thought about adding a :syntax item for it, but that broke when it overlapped other syntax items, so I dropped that idea.

  • 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-11T21:53:48+00:00Added an answer on May 11, 2026 at 9:53 pm

    You could

    • set a large minimum width for the line numbers column via :set numberwidth=6 and
    • then you could resize your window with :set columns=86 (or with the mouse) to the proper size.

    If you edit a file with a million lines in it, you may have trouble, but that’s unlikely. You’re wasting 6 columns of screen real estate this way too. So there are still all kinds of problems.

    You can highlight past the 80th column using :match like it says here and here.

    Beyond that I can’t see any way to do this. Seems like it’d be a nice feature though.

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

Sidebar

Ask A Question

Stats

  • Questions 120k
  • Answers 120k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes you do. The event publishers are holding references to… May 12, 2026 at 12:11 am
  • Editorial Team
    Editorial Team added an answer Type erasure means that information about the generic type of… May 12, 2026 at 12:11 am
  • Editorial Team
    Editorial Team added an answer You should use context processors: http://docs.djangoproject.com/en/dev/ref/templates/api/ http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/ In my settings.py,… May 12, 2026 at 12:11 am

Related Questions

I want to use Vim's soft wrap capability ( :set wrap ) to wrap
I know that you should be able to search in Screen by C-a /
The question does not refer to some Vim-mode in Emacs, but to Vim inside
I use Vim. I open a file. I edit it and I want to
I am using VIM in Windows. The problem is that I want to use

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.