Loading ...
Sorry, an error occurred while loading the content.

Paragraph reformat oddity

Expand Messages
  • ameyer@ix.netcom.com
    Gentlemen: I saw some curious behavior in gvim while editing the following ... We cannot do a real end to end test on cortex, so we will be testing tonight
    Message 1 of 2 , Feb 4, 2000
    • 0 Attachment
      Gentlemen:

      I saw some curious behavior in gvim while editing the following
      paragraph using textwidth=65:
      ---------------------------------------------------------------

      We cannot do a real end to end test on cortex, so we will be
      testing tonight (automatically when the marc_export_daily job
      runs). I did insure we had a clean compile and did a
      code walkthrough of the handful of modified steps with Andy to be
      sure that two people had thought about what we are doing.

      ---------------------------------------------------------------

      Notice the spaces at the beginning of the third line.
      If you delete them, then put the cursor at the beginning of the
      paragraph, and enter the commands "gq}" to reformat the
      paragraph, the spaces will re-appear.

      Of course this may be right. There might be something in my
      setup that makes it right. But it was a surprise to me and, in
      case it's a bug, I thought it might be useful for a developer to
      see it.

      Settings are below.

      Thanks for a very superior program.

      Regards,

      Alan Meyer
      ameyer@...

      VIM - Vi IMproved 5.5 (1999 Sep 19, compiled Sep 19 1999 16:56:32)
      MS-Windows 32 bit GUI version
      Compiled with (+) or without (-):
      +autocmd +browse ++builtin_terms +byte_offset +cindent +cmdline_compl

      +cmdline_info +comments +cryptv -cscope +dialog_gui +digraphs
      +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path -
      osfiletype +find_in_path
      -hangul_input +insert_expand +langmap +linebreak +lispindent +menu
      +mksession
      +modify_fname +mouse +multi_byte -ole -perl +quickfix -python
      +rightleft
      +scrollbind +smartindent -sniff +statusline +syntax +tag_binary
      +tag_old_static -tag_any_white -tcl -tgetent +textobjects +title
      +user_commands +visualextra
      +viminfo +wildignore +wildmenu +writebackup -xfontset -xim -
      xterm_save
      user vimrc file: "$HOME\_vimrc"
      2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
      2nd user exrc file: "$VIM\_exrc"
      user gvimrc file: "$HOME\_gvimrc"
      2nd user gvimrc file: "$VIM\_gvimrc"
      system menu file: "$VIMRUNTIME\menu.vim"

      --- Directories and Files ---
      $VIM = "c:\alan\w\vim\vim55"
      directory "c:\alan\w\vim\vim55" exists
      $VIMRUNTIME = "c:\alan\w\vim\vim55"
      directory "c:\alan\w\vim\vim55" exists
      "c:\alan\w\vim\vim55\doc\help.txt" is readable
      "c:\alan\w\vim\vim55\doc/tags" is readable
      "c:\alan\w\vim\vim55/menu.vim" is readable
      "c:\alan\w\vim\vim55/filetype.vim" is readable
      "c:\alan\w\vim\vim55/syntax/synload.vim" is readable
      --- Options ---
      aleph=224 nohkmap noreadonly
      tagstack
      noallowrevins nohkmapp remap
      term=builtin_gui
      noaltkeymap icon report=2 noterse
      autoindent iconstring= restorescreen
      textauto
      noautowrite noignorecase norevins
      textmode
      background=light incsearch norightleft
      textwidth=78
      backspace=2 noinfercase noruler notildeop
      backup noinsertmode rulerformat= timeout
      backupext=~ isprint=@,~-255 scroll=24
      timeoutlen=1000
      nobinary joinspaces noscrollbind title
      browsedir=last key= scrolljump=1
      titlelen=85
      cindent keymodel= scrolloff=0
      titlestring=
      cinoptions= keywordprg= nosecure
      nottimeout
      clipboard= langmap= selectmode=
      ttimeoutlen=-1
      cmdheight=1 laststatus=1 shellcmdflag=/c
      ttybuiltin
      columns=80 nolazyredraw shellpipe=> nottyfast
      nocompatible nolinebreak shellquote=
      ttymouse=
      noconfirm lines=50 shellredir=>
      ttyscroll=999
      cpoptions=aABceFs nolisp noshellslash
      undolevels=1000
      dictionary= nolist shellxquote=
      updatecount=200
      nodigraph listchars=eol:$ noshiftround
      updatetime=4000
      display= magic shiftwidth=4
      verbose=0
      noedcompatible makeef=vim##.err noshortname
      viminfo='20,"50
      endofline makeprg=make showbreak=
      novisualbell
      equalalways matchtime=5 showcmd warn
      equalprg= maxfuncdepth=100 noshowfulltag
      noweirdinvert
      noerrorbells maxmapdepth=1000 noshowmatch
      whichwrap=b,s
      esckeys maxmem=2048 showmode
      wildchar=<Tab>
      eventignore= maxmemtot=5120 sidescroll=0
      wildcharm=^@
      expandtab modeline nosmartcase
      wildignore=
      noexrc modelines=5 nosmartindent
      nowildmenu
      fileencoding=ansi nomodified nosmarttab
      wildmode=full
      fileformat=dos nomore softtabstop=0
      winaltkeys=menu
      filetype= mouse=a nosplitbelow
      winheight=1
      nofkmap nomousefocus startofline
      winminheight=1
      formatoptions=tcq nomousehide statusline= wrap
      formatprg= mousemodel=popup swapfile
      wrapmargin=0
      nogdefault mousetime=500 swapsync=fsync
      wrapscan
      guifont= nonumber switchbuf= write
      guipty nopaste syntax=
      nowriteany
      helpheight=20 pastetoggle= tabstop=4
      writebackup
      nohidden patchmode= tagbsearch
      writedelay=0
      nohlsearch path=.,, taglength=0
      history=20 previewheight=12 tagrelative
      backupdir=.,c:\tmp,c:\temp
      breakat= ^I!@*-+_;:,./?
      cinkeys=0{,0},:,0#,!^F,o,O,e
      cinwords=if,else,while,do,for,switch
      comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
      complete=.,w,b,u,t,i
      define=^#\s*define
      directory=.,c:\tmp,c:\temp
      errorfile=errors.err
      errorformat=%f(%l) : %t%*\D%n: %m,%*[^"]"%f"%*\D%l: %m,%f(%l) :
      %m,%*[^ ] %f %l: %m,%f:%l:%m
      fileformats=dos,unix
      grepformat=%f:%l%m,%f %l%m
      grepprg=findstr /n
      guicursor=n-v-c:block-Cursor,ve:ver35-Cursor,o:hor50-Cursor,i-
      ci:ver25-Cursor,r-cr:hor20-Cursor,sm:block-Cursor-blinkwait175-
      blinkoff150-blinkon175
      guioptions=agimrtT
      helpfile=c:\alan\w\vim\vim55\doc\help.txt

      highlight=8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:
      Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLi
      neNC,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu
      include=^#\s*include
      isfname=@,48-57,/,.,-,_,+,,,$,:,@-@,!,\,~
      isident=@,48-57,_,128-167,224-235
      iskeyword=@,48-57,_,128-167,224-235
      matchpairs=(:),{:},[:]
      nrformats=octal,hex
      paragraphs=IPLPPPQPP LIpplpipbp
      scrollopt=ver,jump
      sections=SHNHH HUnhsh
      selection=inclusive
      sessionoptions=buffers,winsize,options,help,blank
      shell=C:\WINDOWS\system32\cmd.exe
      shortmess=filnxtToO
      suffixes=.bak,~,.o,.h,.info,.swp,.obj
      tags=./tags,./TAGS,tags,TAGS
      titleold=Thanks for flying Vim
      ttytype=builtin_gui
      --- Terminal codes ---
      t_AB= t_db= t_ms=y
      t_ue=^[|8H
      t_AF= t_DL=^[|%dD t_nd=^L
      t_us=^[|8h
      t_AL=^[|%dI t_dl=^[|d t_op=
      t_vb=^[|f
      t_al=^[|i t_fs= t_RI= t_ve=
      t_bc= t_IE= t_RV= t_vi=
      t_cd= t_IS= t_Sb= t_vs=
      t_ce=^[|$ t_ke= t_Sf= t_WP=
      t_cl=^[|C t_ks= t_se=^[|16H t_WS=
      t_cm=^[|%d;%dM t_le=^H t_so=^[|16h t_xs=
      t_Co= t_mb= t_sr=
      t_ZH=^[|4h
      t_CS= t_md=^[|2h t_ts=
      t_ZR=^[|4H
      t_cs=^[|%d;%dR t_me=^[|31H t_te=
      t_da= t_mr=^[|1h t_ti=
      --- Terminal keys ---
      <Mouse> ›M
      --- Auto-Commands ---
      buffer_list BufCreate
      * call Bmenu_add()
      buffer_list BufDelete
      * call Bmenu_remove()
      buffer_list BufFilePost
      * call Bmenu_add()
      buffer_list BufFilePre
      * call Bmenu_remove()
      BufReadPost
      * set formatoptions=tcql nocindent comments&
      *.pl set formatoptions=tcql autoindent
      *.c set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.h set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.cpp set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.hpp set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.txt set ignorecase
      *.doc set ignorecase
      * set formatoptions=tcql nocindent comments&
      *.pl set formatoptions=tcql autoindent
      *.c set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.h set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.cpp set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      *.hpp set formatoptions=croql cindent
      comments=sr:/*,mb:*,el:*/,://
      BufWritePre
      *.c :%s/ *$//e
      *.h :%s/ *$//e
      *.cpp :%s/ *$//e
      *.hpp :%s/ *$//e
      *.pl :%s/ *$//e
      *.y :%s/ *$//e
      *.l :%s/ *$//e
      *.c :%s/ *$//e
      *.h :%s/ *$//e
      *.cpp :%s/ *$//e
      *.hpp :%s/ *$//e
      *.pl :%s/ *$//e
      *.y :%s/ *$//e
      *.l :%s/ *$//e
      --- Normal mode mappings ---
      v <C-X> "*d
       db
      n <S-Left> b
      n <S-Right> w
      <F8> mygq}`y
      <F7> gq}
      n <S-Tab> :<<CR>
      <xHome> <Home>
      <xEnd> <End>
      <S-xF4> <S-F4>
      <S-xF3> <S-F3>
      <S-xF2> <S-F2>
      <S-xF1> <S-F1>
      <xF4> <F4>
      <xF3> <F3>
      <xF2> <F2>
      <xF1> <F1>
      v <C-Del> "*d
      v <S-Del> "*d
      v <C-Insert> "*y
      v <S-Insert> "-d"*P
      n <S-Insert> "*P
      nv <C-PageDown> L$
      nv <C-PageUp> H
      ÎØ dw
      Îs B
      Ît W
      --- Insert mode mappings ---
      i <S-Left> <C-O>b
      i <S-Right> <C-O>w
      i <F8> <Esc>mygq}`y
      i <F7> <Esc>gq}
      i <S-Tab> <Esc>:<<CR>i
      ! <xHome> <Home>
      ! <xEnd> <End>
      ! <S-xF4> <S-F4>
      ! <S-xF3> <S-F3>
      ! <S-xF2> <S-F2>
      ! <S-xF1> <S-F1>
      ! <xF4> <F4>
      ! <xF3> <F3>
      ! <xF2> <F2>
      ! <xF1> <F1>
      ! <S-Insert> <C-R>*
      i <C-PageDown> <C-O>L<C-O>$
      i <C-PageUp> <C-O>H
      i Îs <C-O>B
      i Ît <C-O>W
      i <C-E> *<C-X><C-E>
      i <C-Y> *<C-X><C-Y>
      --- Abbreviations ---

      No abbreviation found
      --- Highlighting ---
      SpecialKey term=bold ctermfg=1 guifg=Blue
      NonText term=bold ctermfg=9 gui=bold guifg=Blue
      Directory term=bold ctermfg=1 guifg=Blue
      ErrorMsg term=standout ctermfg=15 ctermbg=4 guifg=White
      guibg=Red
      IncSearch term=reverse cterm=reverse gui=reverse
      Search term=reverse ctermbg=14 guibg=Yellow
      MoreMsg term=bold ctermfg=2 gui=bold guifg=SeaGreen
      ModeMsg term=bold cterm=bold gui=bold
      LineNr term=underline ctermfg=6 guifg=Brown
      Question term=standout ctermfg=2 gui=bold guifg=SeaGreen
      StatusLine term=bold,reverse cterm=bold,reverse
      gui=bold,reverse
      StatusLineNC term=reverse cterm=reverse gui=reverse
      Title term=bold ctermfg=5 gui=bold guifg=Magenta
      Visual term=reverse cterm=reverse gui=reverse guifg=Grey
      guibg=fg
      VisualNOS term=bold,underline cterm=bold,underline
      gui=bold,underline
      WarningMsg term=standout ctermfg=4 guifg=Red
      WildMenu term=standout ctermfg=0 ctermbg=14 guifg=Black
      guibg=Yellow
      Cursor guifg=bg guibg=fg
      Normal font=Fixedsys
      --- Variables ---
      bmenu_short #0
      did_install_default_menus #1
      bmenu_wait #0
      bmenu_priority #60
      bmenu_count #1
      bmenu_cutoff #25
      more_save #1

      ---
      Alan Meyer
      AM Systems
      Randallstown, MD
      U.S.A.
    • Ron Aaron
      ... I think this is your problem. The paren makes cindent think you ought to be indenting a . Try making cindent active only for C files... Hope
      Message 2 of 2 , Feb 6, 2000
      • 0 Attachment
        <ameyer@...> writes:
        >Gentlemen:
        >
        >I saw some curious behavior in gvim while editing the following
        >paragraph using textwidth=65:
        >---------------------------------------------------------------
        >
        >We cannot do a real end to end test on cortex, so we will be
        >testing tonight (automatically when the marc_export_daily job
        > runs). I did insure we had a clean compile and did a
        >code walkthrough of the handful of modified steps with Andy to be
        >sure that two people had thought about what we are doing.
        >
        >---------------------------------------------------------------
        >
        >Notice the spaces at the beginning of the third line.
        >If you delete them, then put the cursor at the beginning of the
        >paragraph, and enter the commands "gq}" to reformat the
        >paragraph, the spaces will re-appear.
        ...
        > cindent keymodel= scrolloff=0

        I think this is your problem. The paren makes cindent think you ought to be
        indenting a <something>. Try making cindent active only for C files...

        Hope this helps,
        Ron
      Your message has been successfully submitted and would be delivered to recipients shortly.