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 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

Related Questions

I am using VIM in Windows. The problem is that I want to use
I want to use Powershell to write some utilities, leveraging our own .NET components
I want to use VIM to edit reStuctured text documents in a number of
I want to use vim to write a part of my file to another
I have the following in .screenrc # I want to use Vim's navigation keys
I am programming in C++ or Java. So I want to use Vim editor,
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 use vim for coding and for python coding in particular. Often I want
hi i have devart oracle provider 6(BETA), and want use code only ctp5...how i

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.