tested long time no good results...
so the goal here sounds simple: say I have
* a long text file (over 50K lines), and
* each line by itself is a nature paragraph, so sometime is very long
(over 1000 charactors).
* there are sometimes one of more empty line in between, sometimes not
I wanted
On 2013-05-18, ping wrote:
> tested long time no good results...
>
> so the goal here sounds simple: say I have
>
> * a long text file (over 50K lines), and
> * each line by itself is a nature paragraph, so sometime is very long
> (over 1000 charactors).
> * there are sometimes one of more empty
On 5/18/2013 5:33 PM, Gary Johnson wrote:
On 2013-05-18, ping wrote:
tested long time no good results...
so the goal here sounds simple: say I have
* a long text file (over 50K lines), and
* each line by itself is a nature paragraph, so sometime is very long
(over 1000 charactors).
* there are
On 2013-05-18 20:22, ping wrote:
> 1) :'<,'>g/.*/exec "normal! o\"
> unconditionally insert a new line after each line (this may bring a
> lot of empty lines , if the original book already contains empty
> lines)
Any line matching ".*" could be written as just "^", and the
"normal..." bit can be d
On 5/18/2013 11:13 PM, Tim Chase wrote:
On 2013-05-18 20:22, ping wrote:
1) :'<,'>g/.*/exec "normal! o\"
unconditionally insert a new line after each line (this may bring a
lot of empty lines , if the original book already contains empty
lines)
Any line matching ".*" could be written as just "^
On 2013-05-19, ping wrote:
> On 5/18/2013 11:13 PM, Tim Chase wrote:
> >On 2013-05-18 20:22, ping wrote:
> >>1) :'<,'>g/.*/exec "normal! o\"
> >>unconditionally insert a new line after each line (this may bring a
> >>lot of empty lines , if the original book already contains empty
> >>lines)
> >Any
this look much simpler, quick and works great. good to learn!
On 05/19/2013 02:30 PM, Gary Johnson wrote:
Putting those together with a visual-mode mapping yields this:
:vnoremap ,bf :s/\(\s*\n\)\+/\r\r/gvgq
still, just for a learning purpose, I'm curious about what's wrong with
the
On 2013-05-20, ping wrote:
> this look much simpler, quick and works great. good to learn!
>
> On 05/19/2013 02:30 PM, Gary Johnson wrote:
>
> >Putting those together with a visual-mode mapping yields this:
> >
> > :vnoremap ,bf :s/\(\s*\n\)\+/\r\r/gvgq
>
>
> still, just for a learning pur
On 05/20/2013 01:03 PM, Gary Johnson wrote:
The action of the first exec is to expand and execute its arguments,
which in this case is a single argument, the string
a:firstline . "," . a:lastline . "g/^/exec " . "normal! gqq"
Assuming for sake of a concrete example a firstline of 123 and