Thursday, April 1, 2010

Re: Some text formatting questions

On 2010-04-01, Jostein Berntsen wrote:
> When I write some text in vim and enter each item preceded by "-" like:
>
> - text text text text text text text text text text text text text text
> text text text text text text text text text text text text text text
> text text
>
> the lines from the third is not intended. Is there a way to correct
> this?

In your ~/.vimrc or _vimrc put

set ai

> Also if I edit text already written with backspace, then the text that
> is left get one extra whitespace. Is there a setting for this?

I don't understand. Can you give an example?

Regards,
Gary

--
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

To unsubscribe, reply using "remove me" as the subject.

Re: gui dialogs

On Thu, 2010-04-01 at 17:35 +0300, Aarto Matti wrote:
> > Do you mean like that shown in the attachment?
> > It's the standard gvim search and replace dialog, or is that what you're
> > saying is ugly and stupid?
>
> This is ugly and stupid
> http://www.linux-mag.com/i/articles/6045/Figure_2.jpg
> The Cream way: a bunch of dialogs, in each you set some option before
> reaching the final dialog with "Do it already!" button.
>
> No, I didn't mean that I want a search/replace dialog which already
> exists in vim, I knew, just the screenshot I attached happened to be
> such.
>
> I was looking for some native way or external toolkit/gui frontend to
> vim to write a custom dialog. Text fields and check(radio) buttons is
> a must.

gvim uses the gtk toolkit.
vim is a console application and to my knowledge doesn't support gui
interactions

--
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

To unsubscribe, reply using "remove me" as the subject.

Re: gui dialogs

> Do you mean like that shown in the attachment?
> It's the standard gvim search and replace dialog, or is that what you're
> saying is ugly and stupid?

This is ugly and stupid
http://www.linux-mag.com/i/articles/6045/Figure_2.jpg
The Cream way: a bunch of dialogs, in each you set some option before
reaching the final dialog with "Do it already!" button.

No, I didn't mean that I want a search/replace dialog which already
exists in vim, I knew, just the screenshot I attached happened to be
such.

I was looking for some native way or external toolkit/gui frontend to
vim to write a custom dialog. Text fields and check(radio) buttons is
a must.

--
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

To unsubscribe, reply using "remove me" as the subject.

Re: gui dialogs

On Thu, 2010-04-01 at 17:02 +0300, Aarto Matti wrote:
> Hello,
>
> Is there a way to write more or less complex gui dialog for vim
> similar to this one
> http://mrwlwan.files.wordpress.com/2008/03/find_replace.png
>
> I would need a couple of text fields and radio(check) buttons in a
> single dialog. Cream tries to mimic such by splitting a dialog into
> dozens of basic ones, but that just ugly and stupid.
>
> --
> Aarto
>

Do you mean like that shown in the attachment?
It's the standard gvim search and replace dialog, or is that what you're
saying is ugly and stupid?

--
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

To unsubscribe, reply using "remove me" as the subject.

gui dialogs

Hello,

Is there a way to write more or less complex gui dialog for vim
similar to this one
http://mrwlwan.files.wordpress.com/2008/03/find_replace.png

I would need a couple of text fields and radio(check) buttons in a
single dialog. Cream tries to mimic such by splitting a dialog into
dozens of basic ones, but that just ugly and stupid.

--
Aarto

--
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

To unsubscribe, reply using "remove me" as the subject.

Re: Why is there no :foldupdate?

Christian Brabandt wrote:

> > sometimes I am using fold expressions to simply hide away unwanted
> > parts. Usually this boils down to
> > :set fdm=expr fde=getline(v:lnum)!~getreg('/',1)
> >
> > While this works fine, it is only limited to whatever was in register @/
> > when this setting was entered. Now this leaves an interesting question:
> > When are 'foldexpr' reevaluated (are they at all)? Reading :h fold.txt
> > does not mentioned when the fold expressions are reevaluated and folds
> > are updated (or I might have missed it).
> >
> > Now the obvious cure to this is to reenter the foldexpression. So if I
> > am searching for a different term, I need to enter
> > :set fde=getline(v:lnum)!~getreg('/',1)
> > and the folds will be updated.
> >
> > Of course, I could define my own :Foldupdate like this:
> > :com! Foldupdate :exe "set fde=".&fde
> >
> > But this looks so fundamental, that I am wondering, whether I am the
> > only one who is missing :foldupdate. Does anybody else think so? Or am I
> > missing something obvious?
> >
> > PS: Looking at the source, it does not seem too hard, to define an extra
> > :foldupdate command. Does that sound like a reasonable idea? I could
> > prepare a patch for this, if there is interest.
> >
> > regards,
> > Christian
> >
> > (Actually, I'd really like an RegisterChanged autocommand event, which
> > could trigger an :foldupdate)
>
> Ok, here is a patch, that implements :foldupdate as ex command and zU as
> normal mode command.
>
> Here is the testcase:
> go to the vim-Src directory and execute the attached vim-script:
>
> chrisbra t41:~/vim/src [1296]% ./vim -u NONE -N -S foldupdate.vim eval.c
>
> Note, how the folding will be wrong, after the second search command
> (and I have found no way to refresh the folding. zx and zX do not work,
> though its description led me believe it could have. Well actually I
> found one way: filtering the whole buffer through cat will also update
> the folding)
>
> When recompiling vim with the patch, the folding will be updated, when
> :foldupdate is called.

Thanks! Feedback welcome.

One remark: in the help, add a bit more information about when this would
be needed, why the folds are not updated automatically.

--
BEDEVERE: Stand by for attack!!
[CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege
towers, pennants flying, shouts of "Stand by for attack!" Traditional
army build-up shots. The shouts echo across the ranks of the army.
We see various groups reacting, and stirring themselves in readiness.]
ARTHUR: Who are they?
BEDEVERE: Oh, just some friends!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
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

To unsubscribe, reply using "remove me" as the subject.

Search & Replace

I have been using Vim for about 3-4 months and am a student web
developer. I am still learning Vim and need help with a command.
I am editing some web pages using web pages many a times I have to
edit web pages. Here is what I want:

______________________________
<p>Mike
Gilbert
Senior</p>
_____________________________

I need a command that selects the whole html code including the
newline character.

TIA
Kunal

--
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

To unsubscribe, reply using "remove me" as the subject.