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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:01:00+00:00 2026-05-25T10:01:00+00:00

When I am typing a long code comment in VIM, I manually judge when

  • 0

When I am typing a long code comment in VIM, I manually judge when each comment line reaches 80 characters, then manually typically press < enter >< tab >//< space > and continue on. Likewise it is awkward editing comments, adding or removing text.

// The comments I have to use
// look like this

Ideally, I’d like some kind of comment mode, where you type text, and the 80 line character limit and the // symbols are sorted out automatically. Does anything like this exist?

  • 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-25T10:01:01+00:00Added an answer on May 25, 2026 at 10:01 am

    You can turn on formatting options with set formatoptions=tcq (with tcq each representing an option, there are others as well). Use h formatoptions to see what the various flags are.

    In this case you probably want to use set fo+=a.

    Personally though, I prefer to just type my comments normally, then when I’m done run gqip. gq is the formatting command, ip for in paragraph. Make sure the comment block is not next to code though or it will suck that up when reformatting your comment.

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

Sidebar

Related Questions

In edittext, after typing 'Enter' key, system make a new line inside it. I'd
How many times has this happened to you? You are typing a long block
Typing in programs longer than 50 characters got old really fast on my HP49g+.
When typing code, I would normally close brackets, go back inside, go outside, type
If I start typing stackov.. in Chrome I can see something like 'Press Tab
I sometimes have to take some printed source code and manually type the source
If you have written a really long command, say cd /very/long/path , and then
Consider following code: // hacky, since 123 is 4 chars long (including terminating 0)
Typing Ctrl+O twice in editor when a java type is selected pops-up an outline
When typing in my URL SalaryFor/Microsoft/Balmer i need to display salary for user with

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.