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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:21:43+00:00 2026-05-11T03:21:43+00:00

In using vim, when I start a comment with //, immediately after I type

  • 0

In using vim, when I start a comment with //, immediately after I type a space, it begins a new comment line.

For instance, if I typed the following:

//hello world my name is stefan 

I would get:

//hello //world //my //name //is //stefan 

This behavior has manifested itself in python code as well, where if I begin a line with print, each space is interpreted as a newline

print 'Hello world my name is Stefan' 

Is

print 'hello world my name is stefan' 

Is this the intended behavior or do I have a setting messed up? The following is my .vimrc:

' An example for a vimrc file. ' ' Maintainer:   Bram Moolenaar <email address> ' Last change:  2006 Nov 16 ' ' To use it, copy it to '     for Unix and OS/2:  ~/.vimrc '         for Amiga:  s:.vimrc '  for MS-DOS and Win32:  $VIM\_vimrc '       for OpenVMS:  sys$login:.vimrc  ' When started as 'evim', evim.vim will already have done these settings. if v:progname =~? 'evim'   finish endif  ' TagList plugin settings nmap <f12> :TlistToggle<end>  ' Use Vim settings, rather then Vi settings (much better!). ' This must be first, because it changes other options as a side effect. set nocompatible  ' allow backspacing over everything in insert mode set backspace=indent,eol,start  set nobackup        ' do not keep a backup file, use versions instead set history=50      ' keep 50 lines of command line history set ruler       ' show the cursor position all the time set showcmd     ' display incomplete commands set incsearch       ' do incremental searching  ' For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries ' let &guioptions = substitute(&guioptions, 't', '', 'g')  ' Don't use Ex mode, use Q for formatting map Q gq  ' In many terminal emulators the mouse works just fine, thus enable it. ' set mouse=a  ' Switch syntax highlighting on, when the terminal has colors ' Also switch on highlighting the last used search pattern. if &t_Co > 2 || has('gui_running')   syntax on   set hlsearch endif  ' Only do this part when compiled with support for autocommands. if has('autocmd')    ' Enable file type detection.   ' Use the default filetype settings, so that mail gets 'tw' set to 72,   ' 'cindent' is on in C files, etc.   ' Also load indent files, to automatically do language-dependent indenting.   filetype plugin indent on    ' Put these in an autocmd group, so that we can delete them easily.   augroup vimrcEx   au!    ' For all text files set 'textwidth' to 78 characters.   autocmd FileType text setlocal textwidth=78    ' When editing a file, always jump to the last known cursor position.   ' Don't do it when the position is invalid or when inside an event handler   ' (happens when dropping a file on gvim).   autocmd BufReadPost *     \ if line(''\'') > 0 && line(''\'') <= line('$') |     \   exe 'normal! g`\'' |     \ endif    augroup END  else    set autoindent        ' always set autoindenting on  endif ' has('autocmd')  set   backupdir=./.backup,.,/tmp set   directory=.,./.backup,/tmp  map <F1> :NERDTree <CR> map <F2> :q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR>:q!<CR> map <F5> :AV<CR> map <F6> :AS<CR> map <F7> :IHV<CR> map <F8> :IHS<CR> 
  • 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. 2026-05-11T03:21:43+00:00Added an answer on May 11, 2026 at 3:21 am

    My guess is that you mixed up ‘tw’ (aka textwidth) and the old vi command to set the text margin ‘wm’. ‘tw’ sets the actual width of the page (ie. tw=77 means you want 77 letters per line) but ‘wm’ set the how far from the edge of the screen to wrap, so on an 80 column screen ‘wm=3’ would have the same effect as ‘tw=77’. So if your tw is set to something very small, it would try to wrap after every word.

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

Sidebar

Ask A Question

Stats

  • Questions 111k
  • Answers 111k
  • 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 The compiler will almost certainly generate the same code. Even… May 11, 2026 at 9:42 pm
  • Editorial Team
    Editorial Team added an answer The example in Python is not so different of the… May 11, 2026 at 9:42 pm
  • Editorial Team
    Editorial Team added an answer Unfortunately response headers are available only for URLLoader and only… May 11, 2026 at 9:42 pm

Related Questions

I guess other editors are smart enough to turn that stuff off for pasting
I've just found IPython and I can report that I'm in deep love. And
Using Vim I often want to replace a block of code with a block
I've started using Vim to develop Perl scripts and am starting to find it

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.