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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:30:17+00:00 2026-05-16T12:30:17+00:00

When using nerd commenter in visual mode, the first line is commented differently. Initial

  • 0

When using nerd commenter in visual mode, the first line is commented differently.
Initial code

const IMG_SIZE_SMALL = '32x32';   
const IMG_SIZE_MEDIUM = '64x64';  
const IMG_SIZE_LARGE = '192x192';  

After doing ,cc in visual mode selecting these lines.

/*    const IMG_SIZE_SMALL = '32x32';*/
//const IMG_SIZE_MEDIUM = '64x64';
//const IMG_SIZE_LARGE = '192x192';

What should I do so that the first line is also commented out using // ?

  • 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-16T12:30:18+00:00Added an answer on May 16, 2026 at 12:30 pm

    You didn’t mention what filetype the file has. I tried creating a small test.c file with only the lines provided in your question and used ,cc to comment out the lines. I tried two different filetype settings. With filetype=c, the lines were all commented out with /* — */ style comments and with filetype=cpp, the lines were all commented out with // style comments. Have you made sure you are using the latest version of NERD_commenter (2.2.2)?

    Ok, now I created a small test file with these lines and some testing lines above and below them. NERD commenter comments them all with the same //-style comments. You don’t happen to be selecting lines in character-wise mode? That is pressing v instead of shift-v to select the lines? When i tried that i was able to get different comment styles for some lines.

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

Sidebar

Related Questions

In Vim, when I comment a multi-line visual selection using NERDCommenter, the blank lines
I am using NERD commenter Let's say that I want to comment out lines
I tried to make vim command using Nerd Commenter plugin. Basically after some help
I got a problem with NERD-commenter. If I <leader>cu the following code: /*function func(arg)
Using Emacs 23.2.1 on Ubuntu Lucid, any mode based on Comint inserts occasional line
When using NERD Tree on MacVim, I can open a file in a new
Using CI for the first time and i'm smashing my head with this seemingly
I am just starting climbing the Objective C learning curve (using Nerd Ranch iOS
I am using ASP.NET MVC 2 and C# with Entity Framework 4.0 to code
Using mercurial, I've run into an odd problem where a line from one committer

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.