> Hi Andy!
>
> On Di, 01 Dez 2009, Andy Wokula wrote:
>
>> Andy Wokula schrieb:
>> setlocal formatexpr=FexLogBook()
>>
>> func! FexLogBook()
>> if mode() =~# '[iR]'
>> return 1
>> endif
>> exec v:lnum. "mark ["
>> exec (v:lnum + v:count - 1). "mark ]"
>> '[,']s/^\[.*]$/&\r/
>> setl fex=
>> normal! '[gq']
>> setl fex=FexLogBook()
>> '[,']s/^\[.*]\zs\n$//
>> return
>> endfunc
>>
> Nice. But there seems to be a bug somewhere.
>
> With this file
> [headline1]
> Some Text here.
> Some more text
> Even more text
>
>
> [headline2]
> Some Text here.
> Some more text
> Even more text
> Now executing vim on Windows (this does not happen on Linux):
>
> vim -u NONE file.txt
> :so fex.vim
> :norm! gqG
> :norm! u
>
> Now the file looks like this:
> [headline1]
> Some Text here.
> Some more (ext
> Even more text
>
>
> [headline2]
> Some Text here.
> Some more text
> Even more text
> Notice the ( in the first paragraph. The position of the parenthesis
> changes, but the buffer stays modified and only :e! reloaded it
> correctly. This happened with vim 7.2.284 on Windows, same Version under
> Linux is not affected. Can any Windows user confirm this bahaviour?
Here on Win32, I checked with gVim 7.0 and gVim7.2.218, and I get almost
the same:
[headline1]
Some Text (ere.
Some more text
Even more text
[headline2]
Some Text here.
Some more text
Even more text
After undoing, the buffer is not left modified.
And I typed the commands in (not using :normal).
Maybe the recursive gq is a problem?
--
Andy
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment