autoflow fails to add line break if word ends on line margin

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

autoflow fails to add line break if word ends on line margin

ericmsmith
If the last char of a word in on the margin, then autoflow
wrapsthat word to the next line and does not place a space
between the two words.

Yup, without me intending it, it just did it again!
formatoptions=tcqa.
Does the same with formatoptions=a.

What is the cause/solution for this?

--
Eric Smith

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: autoflow fails to add line break if word ends on line margin

John Little-4
On Wednesday, July 24, 2013 1:02:28 AM UTC+12, Eric Smith wrote:
> If the last char of a word in on the margin, then autoflow
> wrapsthat word to the next line and does not place a space
> between the two words.
>
> Yup, without me intending it, it just did it again!
> formatoptions=tcqa.
>
> Does the same with formatoptions=a.

Please tell us how wide vim's window is, and what textwidth is set to:

:set co? tw?

I take it that the text "If the last char of a word in on the margin, then autoflow wraps that" was what you typed.  If I set tw=60, and type the text, you seem to be expecting vim to know that the word you want is "wraps" and insert a space by itself; you should just type the space that comes at the end of the word like you typed all the others on the line.  Or did you type the space and it got swallowed?

Regards, John Little

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: autoflow fails to add line break if word ends on line margin

ericmsmith
Thanks John

> Please tell us how wide vim's window is, and what textwidth is set to:
>
> :set co? tw?
columns=158 textwidth=65.

> I take it that the text "If the last char of a word in on the
> margin, then autoflow wraps that" was what you typed.  If I set
> tw=60, and type the text, you seem to be expecting vim to know
> that the word you want is "wraps" and insert a space by itself;
> you should just type the space that comes at the end of the
> word like you typed all the others on the line.  Or did you
> type the space and it got swallowed?

My apologies for the imprecision, yes the space that I type is
indeed swallowed. As are any following space. What I am doing now when I
see this error or threatened error, is an arrow down to the next
line.

--
Eric Smith

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: autoflow fails to add line break if word ends on line margin

John Little-4
On Wednesday, July 24, 2013 9:45:14 PM UTC+12, Eric Smith wrote:

> My apologies for the imprecision, yes the space that I type is
> indeed swallowed. As are any following space. What I am doing now when I
> see this error or threatened error, is an arrow down to the next

When I do that the space is swallowed, but a newline is inserted and the text ("that") is continued on the next line.  

Does your problem occur with

gvim -u NONE -c 'set fo=tcqa tw=65'

Regards, John Little

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: autoflow fails to add line break if word ends on line margin

ericmsmith

Thank John

> John Little wrote on Thu-25-Jul 13  4:10AM
> Does your problem occur with
>
> gvim -u NONE -c 'set fo=tcqa tw=65'
NO it does not.

Output of :set in this case is;

--- Options ---
  helplang=en       noloadplugins         scroll=25           textwidth=65        ttyfast             ttymouse=xterm
  fileencodings=ucs-bom,utf-8,default,latin1

Here are my settings normally, where it does occur, any idea?

--- Options ---
  autowrite           incsearch           shiftwidth=1        ttyfast
  backspace=2         laststatus=2        sidescroll=5        ttymouse=xterm
  columns=80          linebreak           softtabstop=2       undofile
  expandtab         nomodeline            spell               updatetime=300
  filetype=mail       mouse=a             syntax=mail         winwidth=120
  helplang=en         report=0            tabstop=3         nowritebackup
  hidden              ruler               textwidth=65
  history=300         scroll=25           ttimeout
  ignorecase          scrolloff=3         ttimeoutlen=1
  cinkeys=0{,0},:,!^F,o,O,e
  cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,ps,t0,+s,(s,us,)20,*30,g0,+0,+0
  clipboard=autoselect,exclude:.*
  dictionary=/usr/dict/linux.words,/usr/local/doc/retailers.txt,/usr/local/doc/p
roducers.txt,/usr/local/doc/main.txt,/usr/local/doc/transport.txt,/usr/local/doc
/shipment.txt,/usr/local/doc/references.txt
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,default,latin1
  formatoptions=tcqa
  grepprg=ack-grep -a
  include=^\s*#\s*nclude
  isfname=@,48-57,/,.,-,_,+,,,#,$,%,~,^=
  iskeyword=@,48-57,_,-,192,255,.,(,),#
  listchars=eol:$,precedes:<,extends:>
 


--
Eric Smith

>
> Regards, John Little
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: autoflow fails to add line break if word ends on line margin

John Little-4
On Thursday, July 25, 2013 10:09:11 PM UTC+12, Eric Smith wrote:
> > Does your problem occur with
> > gvim -u NONE -c 'set fo=tcqa tw=65'
>
> NO it does not.
>
> Here are my settings normally, where it does occur, any idea?
> ...

I set all those in a gvim -u NONE -N, and your problem didn't occur.  The only one that I noticed was the file type, which suggests a file type plugin might be involved.

All I can suggest is standard vim problem isolation:

1. set nocompatible mode, a return to sanity:
   
    gvim -u NONE -N -c 'set fo=tcqa tw=65'

2. Try with no plugins:

    gvim --noplugins -N -c 'set fo=tcqa tw=65' x

If this avoids your problem, then a plugin is the culprit.  If you use a plugin manager, it may have a method to track problems down, otherwise move them aside one by one till you find one that does it.  The :scriptnames command can tell you everything that's running, or see :help plugin-details.

3. Try no .gvimrc:

    gvim -U NONE -N

or
    vim

4.  Bisect your .vimrc, by putting a finish command in it, and moving it back and forth till your problem is triggered just.

Regards, John Little

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.