Monday, August 31, 2009

Re: goto line depending on exit code of filter

On 22/08/09 16:56, bill lam wrote:
>
> On Sat, 22 Aug 2009, Tim Chase wrote:
>> Though it's a bit of a horrible abuse, you can do
>>
>> if v:shell_error> 0 | exec v:shell_error | endif
>>
>> which exploits the fact that an ex command of just a number means
>> to go to that line. Granted, the range of exit codes may limit
>> you to a pretty small range (1-127, IIRC), so you can't jump to a
>> line beyond this max. But it's what you asked for :)
>
> Thanks Tim and Ben! "exec number" does the trick.
> I got a pretty print for my source files, when there is syntax error,
> I made it exit with an error code equal to that line number. I tried
> and found vim can jump to lines beyond 4000.
>

Vim can jump to any line that it can count, the problem is having your
external program generate the required number as a return code: IIRC,
return codes are limited to one byte, and those above 127 may have a
special meaning (generated by the OS maybe).

In bash,

foobar
bash: foobar: command not found
echo $?

returns 127, for instance.

Depending on what you exactly want, you could also write it as

if v:shell_error | exe v:shell_error | endif

or

if v:xhell_error | exe (v:shell_error % 256) | endif

etc.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
117. You are more comfortable typing in html.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

Hi Gary!

On Mo, 31 Aug 2009, Gary Johnson wrote:

> g:colors_name is set when :colorscheme is executed, if the
> colorscheme file is properly written. If vim says that
> g:colors_name is undefined, then :colorscheme has not been executed.
>

Or the colorscheme did not set g:colors_name, which would be a bug.
(g:colors_name has to be defined by the colorscheme).

#v+
~$ grep g:colors_name ~/.vim/colors/*.vim
.vim/colors/black_angus.vim:let g:colors_name = "black_angus"
.vim/colors/cb256.vim:let g:colors_name="cb256"
.vim/colors/desert256.vim:let g:colors_name="desert256"
.vim/colors/dw_blue.vim:let g:colors_name="dw_blue"
.vim/colors/maroloccio.vim:let g:colors_name="maroloccio"
.vim/colors/peaksea.vim:let g:colors_name = expand("<sfile>:t:r")
.vim/colors/sean.vim:let g:colors_name = "sean"
.vim/colors/transparent.vim:let g:colors_name="transparent"
.vim/colors/zenburn.vim:let g:colors_name="zenburn"
#v-

regards,
Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: separate one file into many files

Thanks Tony,

I did name it with the extension .vim, and I did restart vim before typing
:scriptnames

I will end up trying what Christian suggested (loading them manually) the
next time I get to a computer that has vim installed.

Thank you.

Tony Mechelynck-2 wrote:
>
>
> On 20/08/09 21:11, drlatex wrote:
>>
>>
>> Thank you very much. That makes a lot more sense.
>>
>> I'm acutally using vim in windows, and I did add that plugin to the
>> location
>> where all the other plugins are located, but according to :scriptnames,
>> vim
>> doens't automatically load the one that I added (the one you wrote) ...
>> it
>> loads all the other ones in that directory except for the added one.
>>
>> But nevertheless, I was able to get my job done. I used csplit to split
>> the
>> file into its 500 constituent files. Then I used a command in unix with a
>> for loop to rename them appropriately.
>>
>> Thank you very much once again. I really appreciate all of your help and
>> taking the time to respond to me. And it was good that I learned about
>> the
>> plugins, I'm sure that will come in useful another time.
>
> You did restart Vim after dropping the plugin in (whatever)/plugin/
> (where (whatever) is some directory in 'runtimepath' other than
> $VIMRUNTIME), didn't you?
>
> Global plugins are loaded only at startup. If you add one while Vim is
> already running, it won't "see" it. Also, all Vim scripts other than
> vimrc (, .vimrc, _vimrc) and gvimrc (, .gvimrc, _gvimrc) must have the
> .vim extension ta the end of their name.
>
>
> Best regards,
> Tony.
> --
> Q: How many IBM cpu's does it take to do a logical right shift?
> A: 33. 1 to hold the bits and 32 to push the register.
>
> >
>
>

--
View this message in context: http://www.nabble.com/separate-one-file-into-many-files-tp24854914p25234051.html
Sent from the Vim - General mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

Nathan Neff 写道:
> Hello,
>
> I'm using a custom Xdefaults file for my terminal (urxvt), and I like
> how Vim looks
> in the terminal.
>
> Is there an easy way to make a colorscheme file for Gvim that makes Gvim look
> like my terminal colors?

Guess you had manually defined Color0 to Color15 in Xdefaults?

I don't think there is an easy way to convert that into gvim scheme
unless someone had write script for it.

You may need to design a gui colorscheme file. Design your own gui
colorscheme file isn't very hard, you can start with your moria.vim and
change the colors.

It takes some time to know how to write your own colorscheme file, but
we'll be using vim in the rest of our life and I think it worth the cost.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

I used ":hi + copy/paste" to create a color scheme that reflects my
xterm's default colors.

Pleas find attached the color scheme file I created manually via
copy/paste and a few substitutions + the relevant stanza of my
.Xdefaults file so all you need to do is replace my terminal color
definitions by yours.

:%s/#iiiiii/#jjjjjj/g (e.g.)

Would be nice if someone could suggest an automated solution, though.

:-/

Gen-Paul.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: separate one file into many files

On 20/08/09 21:11, drlatex wrote:
>
>
> Thank you very much. That makes a lot more sense.
>
> I'm acutally using vim in windows, and I did add that plugin to the location
> where all the other plugins are located, but according to :scriptnames, vim
> doens't automatically load the one that I added (the one you wrote) ... it
> loads all the other ones in that directory except for the added one.
>
> But nevertheless, I was able to get my job done. I used csplit to split the
> file into its 500 constituent files. Then I used a command in unix with a
> for loop to rename them appropriately.
>
> Thank you very much once again. I really appreciate all of your help and
> taking the time to respond to me. And it was good that I learned about the
> plugins, I'm sure that will come in useful another time.

You did restart Vim after dropping the plugin in (whatever)/plugin/
(where (whatever) is some directory in 'runtimepath' other than
$VIMRUNTIME), didn't you?

Global plugins are loaded only at startup. If you add one while Vim is
already running, it won't "see" it. Also, all Vim scripts other than
vimrc (, .vimrc, _vimrc) and gvimrc (, .gvimrc, _gvimrc) must have the
.vim extension ta the end of their name.


Best regards,
Tony.
--
Q: How many IBM cpu's does it take to do a logical right shift?
A: 33. 1 to hold the bits and 32 to push the register.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

improving the :join command

Hi,

as you may know, :join suffers from a serious performance issue, when
joining many lines ( in the order of 10 thousands or more lines).
Therefore I have written the following plugin¹, which tries to improve
the performance when joining lines.

I have been trying to make the plugin behave exactly like the :join
command, therefore I'd like to ask to test, whether it works like
:join.

I hope this helps until the patch at the vim_extend repository get's
into vim mainline.

¹)http://www.vim.org/scripts/script.php?script_id=2766


regards,
Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

Nathan Neff wrote:

[..]

>>> What does this tell you?
>>>
>>> :echo g:colors_name
>> I'm using "moria" in Gvim. I'd like to make Gvim have the same colors as
>> vim does in my terminal. I don't know how to convert terminal colors
>> into a Gvim color scheme.

> In addition, when I type :echo g:colors_name in terminal vim, I get
> "Undefined variable: g:colors_name", which makes sense because
> g:colors_name only applies to Gvim.

No.

Type the following in terminal vim:

:colorscheme <space> <Tab>

You will be prompted for different color schemes in succession.

Select one by hitting <Enter>

Then:

:echo g:colors_name

The name of the color scheme that you selected is displayed.

My _guess_ is that you are using the "default" color scheme, which I
believe is hard-coded in vim and the trouble is that in this particular
case the colors_name global variable is not se.

I have not looked at the code, so someone correct me if that is not the
case.

So, I'm not sure where you can go from there. Maybe check if there is a
plugin that lets you dump the "default" color scheme to a colorscheme
file..?

Not sure that's even possible.

Obviously, once you have a copy of the "default" color scheme in a file,
porting it to gvim is trivial.

Otherwise, you could start terminal vim, use the :hi command to display
the current syntax highlighting settings, copy/paste them to a file, and
use these definitions to build a gvim color scheme.

Gen_Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

On 2009-08-31, Nathan Neff wrote:

> In addition, when I type :echo g:colors_name in terminal vim, I get
> "Undefined variable: g:colors_name", which makes sense because
> g:colors_name only applies to Gvim.

Why do you think g:colors_name applies only to gvim?

g:colors_name is set when :colorscheme is executed, if the
colorscheme file is properly written. If vim says that
g:colors_name is undefined, then :colorscheme has not been executed.

Regards,
Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

On Mon, Aug 31, 2009 at 3:28 PM, Nathan Neff<nathan.neff@gmail.com> wrote:
> On Mon, Aug 31, 2009 at 1:32 PM, Patrick Gen-Paul<pgenpaul@gmail.com> wrote:
>>
>> Nathan Neff wrote:
>>> I define my color scheme in .Xdefaults, like this, for urxvt:
>>
>> [..]
>>
>>> I don't know if that's what you're asking about.  I don't know how
>>> terminal vim interacts with the colors of urxvt, though.
>>
>> I meant a _vim_ color scheme.
>>
>> :h colorscheme
>>
>> In particular: "For info about writing a colorscheme file .." since, to
>> the best of my knowledge, this is what you need to do.
>>
>> What does this tell you?
>>
>> :echo g:colors_name
>
> I'm using "moria" in Gvim.  I'd like to make Gvim have the same colors as
> vim does in my terminal.  I don't know how to convert terminal colors
> into a Gvim color scheme.

In addition, when I type :echo g:colors_name in terminal vim, I get
"Undefined variable: g:colors_name", which makes sense because
g:colors_name only applies to Gvim.

--Nate

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

On Mon, Aug 31, 2009 at 1:32 PM, Patrick Gen-Paul<pgenpaul@gmail.com> wrote:
>
> Nathan Neff wrote:
>> I define my color scheme in .Xdefaults, like this, for urxvt:
>
> [..]
>
>> I don't know if that's what you're asking about.  I don't know how
>> terminal vim interacts with the colors of urxvt, though.
>
> I meant a _vim_ color scheme.
>
> :h colorscheme
>
> In particular: "For info about writing a colorscheme file .." since, to
> the best of my knowledge, this is what you need to do.
>
> What does this tell you?
>
> :echo g:colors_name

I'm using "moria" in Gvim. I'd like to make Gvim have the same colors as
vim does in my terminal. I don't know how to convert terminal colors
into a Gvim color scheme.

Thanks,
--Nate

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Save through to remote server

Ernest Obusek wrote:
> I'm trying to switch back to vim after years with jEdit, but I need to
> get a set of things working before I can use vim productively. One
> thing I need is to make it so that when I save a file, it scp's it to
> a remote server. I imagine a script could do this, but I have no idea
> how to hook that in to the save command. How can this be done?
:w scp://hostname/filename

You can also :e scp://hostname/filename ... :w

That's assuming that you have
filetype plugin on
in your .vimrc .

Regards,
Chip Campbell


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: expand variable to command line

On 2009-08-31, Aarto Matti wrote:
> Hello,
>
> How to print an expanded variable into vim command line? For some
> reason I would like to map e.g. F12 to complete edit command with vim
> user files path. I would do something like:
>
> :map <F12> :edit expand($VIM)
>
> What it prints is
>
> :edit expand($VIM)
>
> and I want
>
> :edit /usr/share/vim

Just use this:

:map <F12> :edit $VIM

If you want to actually edit $VIM and not add more to the path
before executing that command, use this:

:map <F12> :edit $VIM<CR>

Regards,
Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Save through to remote server

:help netrw-start

On Mon, Aug 31, 2009 at 4:49 PM, Ernest Obusek <ernest@willowfalls.net> wrote:
I'm trying to switch back to vim after years with jEdit, but I need to get a set of things working before I can use vim productively.  One thing I need is to make it so that when I save a file, it scp's it to a remote server.  I imagine a script could do this, but I have no idea how to hook that in to the save command.  How can this be done?

Thanks,

Ernest





--
Christophe-Marie Duquesne

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

Nathan Neff wrote:
> I define my color scheme in .Xdefaults, like this, for urxvt:

[..]

> I don't know if that's what you're asking about. I don't know how
> terminal vim interacts with the colors of urxvt, though.

I meant a _vim_ color scheme.

:h colorscheme

In particular: "For info about writing a colorscheme file .." since, to
the best of my knowledge, this is what you need to do.

What does this tell you?

:echo g:colors_name

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: expand variable to command line

> How to print an expanded variable into vim command line? For some
> reason I would like to map e.g. F12 to complete edit command with vim
> user files path. I would do something like:
>
> :map <F12> :edit expand($VIM)
>
> What it prints is
>
> :edit expand($VIM)
>
> and I want
>
> :edit /usr/share/vim

Several ways:

:map <f12> :edit <c-r>=expand($VIM)<cr><cr>
:map <f12> :exec "edit ".expand($VIM)<cr>

-tim

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: globpath with an expression

On Mon, Aug 31, 2009 at 10:19 AM, Brett
Stahlman<brettstahlman@comcast.net> wrote:
...
> The globpath function does not take a regular expression, but rather a
> glob pattern, such as would be accepted by glob(). To see what
> metacharacters are significant...
> :help wildcard

Thanks Brett.

Now I suck everything back with a * and then use a filter() for the
regex on the list afterwards.

Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

I define my color scheme in .Xdefaults, like this, for urxvt:

urxvt.scrollTtyOutput: 0
urxvt.scrollTtyKeypress: 1
urxvt.background: #000000
urxvt.foreground: #9a9a9a
urxvt.color0: #000000
urxvt.color1: #af0000
urxvt.color2: #00af00
urxvt.color3: #afaf00
urxvt.color4: #00ff00
urxvt.color5: #af00af
urxvt.color6: #00afaf
urxvt.color7: #9a9a9a
urxvt.color8: #5f5f5f
urxvt.color9: #d70000
urxvt.color10: #00d700
urxvt.color11: #d7d700
urxvt.color12: #00FF00
urxvt.color13: #d700d7
urxvt.color14: #00d7d7
urxvt.color15: #d7d7d7

I don't know if that's what you're asking about. I don't know how
terminal vim interacts with the colors of urxvt, though.

On Mon, Aug 31, 2009 at 12:06 PM, Patrick Gen-Paul<pgenpaul@gmail.com> wrote:
>
> Nathan Neff wrote:
>> Hello,
>>
>> I'm using a custom Xdefaults file for my terminal (urxvt), and I like
>> how Vim looks
>> in the terminal.
>>
>> Is there an easy way to make a colorscheme file for Gvim that makes Gvim look
>> like my terminal colors?
>>
>> I've seen quite a few discussions on how to go from Gvim --> Terminal,
>> but not the other
>> way around.
>
> Difficult to help without a bit more detail about your context.
>
> What color scheme - if any - are you using in the terminal?
>
> I could be wrong, but this sounds like you could duplicate the color
> scheme file, replace all instances of ctermfg and ctermbg by
> respectively guifg and guibg, save the file.. and you're done (?)
>
> Gen-Paul.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use terminal colors in GUI Vim?

Nathan Neff wrote:
> Hello,
>
> I'm using a custom Xdefaults file for my terminal (urxvt), and I like
> how Vim looks
> in the terminal.
>
> Is there an easy way to make a colorscheme file for Gvim that makes Gvim look
> like my terminal colors?
>
> I've seen quite a few discussions on how to go from Gvim --> Terminal,
> but not the other
> way around.

Difficult to help without a bit more detail about your context.

What color scheme - if any - are you using in the terminal?

I could be wrong, but this sounds like you could duplicate the color
scheme file, replace all instances of ctermfg and ctermbg by
respectively guifg and guibg, save the file.. and you're done (?)

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: vim 7.1 - sh.vim syntax file - unwarranted syntax error detected.

John Little wrote:
>> console-screen.kbd.sh
>
> With vim 7.2.245, the highlighting of line 30 is ok but fails on and
> after line 32, even with the very latest syntax file (v108) from the
> maintainer's website (http://mysite.verizon.net/astronaut/vim/
> index.html#vimlinks_syntax). It doesn't like the escaped double quote
> after the square bracket. The following two line shell script
> exhibits the problem:
>
> echo [ \"Lorem
> echo ipsum
>
> Dr Chip will likely see this thread, I hope this helps him, should he
> be inclined to fix it.

I had downloaded the latest version of the syntax file before I posted
and indeed it doesn't make any difference.

I guess I can always send him an email to his contact address in sh.vim
if he does not respond within the next few days.

Where this particular linux init.d script is concerned, and especially
since the line that's affected is very near the beginning, it pretty
much defeats the purpose of syntax highlighting - as time allows, I'm
sure he will want to come up with a fix.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Starting vim :help full screen

Tim Chase wrote:
>> When I type ":help" on an empty vim screen - such as a new tab for
>> instance, vim automatically splits the screen.
>>
>> I proceed to issue a Ctrl-W O to remove the empty half screen, no big deal.
>>
>> Is there any "native" way I could start vim's help full-screen - without
>> coding a macro and mapping it to a key combo - I don't think it's worth
>> bloating my interface further for something this trivial.
>
> A couple options occur to me -- two prefix options, and one
> post-processing idea:
>
> To open the help in its own tab:
>
> :tab help some_topic_to_find
>
> To open the help in the current non-modified empty buffer:
>
> :set bt=help | help some_topic_to_find
>
> Finally, one could create an autocmd for help-type files (my
> autocmd creation is a bit rusty, so you'd have to experiment on
> your own, or somebody else may step in) that forces an ":only" on
> the help window (though it might grouse at you if there are
> modifications in the to-be-closed windows).

Thanks for the tips.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: How does the python omnicomplete functionality work with vim?

On Sun, Aug 30, 2009 at 4:15 PM, Mishail<mishail.mishail@gmail.com> wrote:
>
> Have you tried pythoncomplete script (http://www.vim.org/scripts/
> script.php?script_id=1542) ?

I have been using 0.8 version of this plugin and don't find it able to
complete most of the times.
--
HTH,
Hari
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

au_exists bug, was Re: Test Existence of Autocommand?

On Tue, Aug 25, 2009 at 11:38 AM, Ben Fritz<fritzophrenic@gmail.com> wrote:
>> On Fri, Aug 14, 2009 at 6:38 PM, Edward Beach<beach9...@hotmail.com> wrote:
>> > I'm trying to write a script that will toggle an autocommand on/off
>> > and I'm looking for a function to return it's existence.  I've found
>> > the built-in exists function and from the help it gives me this:
>> >                        #group#event    autocommand defined for this group and event.
>> > So from my command line I enter in the following
>> >        :aug TestGroup | aug END | echo exists("#TestGroup#BufWritePost")
>> > and it comes back 1 -- but shouldn't it be 0 since I haven't created a
>> > BufWritePost event and since
>> >        :au TestGroup
>> > returns nothing?
>>
>> It looks like the #group#event code doesn't check for an autocommand
>> for that event being defined *within* the group, just whether both the
>> group and the autocommand exist.  The #group#event#pattern does check
>> for an autocommand defined within the specified group, though, so that
>> may be helpful to you.

> Since this is a patch for some VERY unexpected behavior, I'm cc'ing
> vim_dev where such things are normally discussed.
>
> My opinion is that this is a bug, if it can be reliably reproduced. I
> can't imagine any situation where the described behavior would be
> helpful.

Here's a probably better patch, and a test case to show the behavior I
expect from exists() with respect to autocommands:

diff --git a/src/fileio.c b/src/fileio.c
index a9552b5..5da1a96 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -9498,15 +9498,10 @@ au_exists(arg)
ap = first_autopat[(int)event];
if (ap == NULL)
goto theend;
- if (pattern == NULL)
- {
- retval = TRUE;
- goto theend;
- }

/* if pattern is "<buffer>", special handling is needed which
uses curbuf */
/* for pattern "<buffer=N>, fnamecmp() will work fine */
- if (STRICMP(pattern, "<buffer>") == 0)
+ if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0)
buflocal_buf = curbuf;

/* Check if there is an autocommand with the given pattern. */
@@ -9515,9 +9510,10 @@ au_exists(arg)
/* For buffer-local autocommands, fnamecmp() works fine. */
if (ap->pat != NULL && ap->cmds != NULL
&& (group == AUGROUP_ALL || ap->group == group)
- && (buflocal_buf == NULL
- ? fnamecmp(ap->pat, pattern) == 0
- : ap->buflocal_nr == buflocal_buf->b_fnum))
+ && (pattern == NULL
+ || (buflocal_buf == NULL
+ ? fnamecmp(ap->pat, pattern) == 0
+ : ap->buflocal_nr == buflocal_buf->b_fnum)))
{
retval = TRUE;
break;

unpatched testcase results:

$ /usr/bin/vim -u ~/testcase.vim
BufEnter is a valid event (should be true) : 1
BufEnter defined generally (should be false) : 0
BufEnter defined generally (should be true) : 1
BufEnter defined in 'auexists' group (should be false) : 1
BufEnter defined in 'auexists' group (should be true) : 1
BufEnter defined for *.test (should be false) : 0
BufEnter defined for *.test (should be true) : 1
BufEnter defined for local buffer (should be false) : 0
BufEnter defined for local buffer (should be true) : 1


patched testcase results:

$ vim -u ~/testcase.vim
BufEnter is a valid event (should be true) : 1
BufEnter defined generally (should be false) : 0
BufEnter defined generally (should be true) : 1
BufEnter defined in 'auexists' group (should be false) : 0
BufEnter defined in 'auexists' group (should be true) : 1
BufEnter defined for *.test (should be false) : 0
BufEnter defined for *.test (should be true) : 1
BufEnter defined for local buffer (should be false) : 0
BufEnter defined for local buffer (should be true) : 1

testcase.vim:

augroup auexists
augroup END
echomsg "BufEnter is a valid event (should be true) : " exists("##BufEnter")
echomsg "BufEnter defined generally (should be false) : " exists("#BufEnter")
au BufEnter * let g:entered=1
echomsg "BufEnter defined generally (should be true) : " exists("#BufEnter")
echomsg "BufEnter defined in 'auexists' group (should be false) : "
exists("#auexists#BufEnter")
augroup auexists
au BufEnter * let g:entered=1
augroup END
echomsg "BufEnter defined in 'auexists' group (should be true) : "
exists("#auexists#BufEnter")
echomsg "BufEnter defined for *.test (should be false) : "
exists("#BufEnter#*.test")
au BufEnter *.test let g:entered=1
echomsg "BufEnter defined for *.test (should be true) : "
exists("#BufEnter#*.test")
silent edit testfile.test
echomsg "BufEnter defined for local buffer (should be false) : "
exists("#BufEnter#<buffer>")
au BufEnter <buffer> let g:entered=1
echomsg "BufEnter defined for local buffer (should be true) : "
exists("#BufEnter#<buffer>")


Thank you,

bob

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Vim Suggestion: adapting tw to displayed with (vs. termwidth) if numbering

On Aug 28, 5:13 pm, Linda W <v...@tlinx.org> wrote:
> Suggesting [programmatically, :-) ]:
>
> When (vimoption(number) == true)) {
>   when ("one uses text autoformat" (aka 'gqap')) {
>      setlocal tw=disp_width'(dflt==0)) /' - nuw'(vimdflt=4,compat=8) /'
>   }
>
> }
>

I'm sorry, I don't understand. Is this different than the 'wrapmargin'
option?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

expand variable to command line

Hello,

How to print an expanded variable into vim command line? For some
reason I would like to map e.g. F12 to complete edit command with vim
user files path. I would do something like:

:map <F12> :edit expand($VIM)

What it prints is

:edit expand($VIM)

and I want

:edit /usr/share/vim

--
Aarto

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Save through to remote server

I’m trying to switch back to vim after years with jEdit, but I need to get a set of things working before I can use vim productively.  One thing I need is to make it so that when I save a file, it scp’s it to a remote server.  I imagine a script could do this, but I have no idea how to hook that in to the save command.  How can this be done?

Thanks,

Ernest

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use VIM to perform text manipulation on file (like sed/awk)

Thank you very much Christian. That was a very detailed and helpful answer!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: globpath with an expression

On Aug 31, 6:33 am, David Fishburn <dfishburn....@gmail.com> wrote:
> Vim 7.2.1-255
>
> Not quite getting something.
>
> I can do this:
> echo globpath('C:\temp', 'test')
> -- Nothing
>
> echo globpath('C:\temp', 'test.*')
> c:\temp\test.db
> c:\temp\test.js
> c:\temp\test.log
> c:\temp\test.vim
>
> echo globpath('C:\temp', 'test\(.*\)')
> c:\temp\test.db
> c:\temp\test.js
> c:\temp\test.log
> c:\temp\test.vim
>
> echo globpath('C:\temp', 'test\(.vim\)')
> -- Nothing
>
> So, I am trying to use a regular expression to start limiting the files.
> Any ideas on what I am missing?

David,
The globpath function does not take a regular expression, but rather a
glob pattern, such as would be accepted by glob(). To see what
metacharacters are significant...
:help wildcard

I'm not sure why the \( \) construct is accepted. Note, however, that
the `.' in your examples is matching a literal `.', not "any
character" as it would in a regex. This being the case, I would expect
'test\(.vim\)' and 'test\(.*\)' to pass or fail together, but I'm
thinking that \( \) may be taking advantage of some undocumented
behavior. Perhaps I've just overlooked something in the documentation.

Brett S.

>
> TIA,
> Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use VIM to perform text manipulation on file (like sed/awk)

Hi yosi!

On Mo, 31 Aug 2009, yosi izaq wrote:

> Let me see if I got your script right. You tell sed to work on the
> range from "-c" to first blank line right?
> Then you instruct it to comment the lines that are not already in
> comment in that range (which in this case is also a paragraph).
> It should work well so long as $1 is the first line in the paragraph.

No. Using -c will comment the selected paragraph (that is, from the
line that matches the pattern until the next blank line), without -c
it will uncomment the paragraph:

#v+
chrisbra t41:~/sed [1025]% cat resolv.conf
#Company IT nameservers
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6

Lab1 nameservers
nameserver 10.1.2.3
nameserver 10.1.2.4

#Lab2 nameservers
#nameserver 20.1.2.2

chrisbra t41:~/sed [1026]% ./resolv.sh -c Lab1 resolv.conf; cat resolv.conf
#Company IT nameservers
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6

#Lab1 nameservers
#nameserver 10.1.2.3
#nameserver 10.1.2.4

#Lab2 nameservers
#nameserver 20.1.2.2

chrisbra t41:~/sed [1027]% ./resolv.sh Lab2 resolv.conf; cat resolv.conf
#Company IT nameservers
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6

#Lab1 nameservers
#nameserver 10.1.2.3
#nameserver 10.1.2.4

Lab2 nameservers
nameserver 20.1.2.2
#v-

An even simpler approach would be something like letting sed toggle,
wherever the pattern matches, like this:

#v+
chrisbra t41:~/sed [1067]% cat resolv1.sh
#!/bin/sh

sed -i "
/$1/,/^$/{
s/^[^#]/#&/g;
t
s/^#\+//g;
}" "$2"
chrisbra t41:~/sed [1072]% cat resolv.conf
#Company IT nameservers
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6

#Lab1 nameservers
#nameserver 10.1.2.3
#nameserver 10.1.2.4

Lab2 nameservers
nameserver 20.1.2.2
chrisbra t41:~/sed [1073]% ./resolv1.sh Lab2 resolv.conf ; cat resolv.conf
#Company IT nameservers
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6

#Lab1 nameservers
#nameserver 10.1.2.3
#nameserver 10.1.2.4

#Lab2 nameservers
#nameserver 20.1.2.2
chrisbra t41:~/sed [1074]% ./resolv1.sh Lab2 resolv.conf ; cat resolv.conf
#Company IT nameservers
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6

#Lab1 nameservers
#nameserver 10.1.2.3
#nameserver 10.1.2.4

Lab2 nameservers
nameserver 20.1.2.2
chrisbra t41:~/sed [1074]%
#v-

regards,
Christian
--
Citizens are not allowed to attend a movie house or theater nor ride in a
public streetcar within at least four hours after eating garlic.
[real standing law in Indiana, United States of America]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Use VIM to perform text manipulation on file (like sed/awk)

On Thu, Aug 27, 2009 at 2:55 PM, Christian Brabandt wrote:
...
> I haven't tested it thoroughly, but this sed script seems to work for
> me:
> ,----
> | #!/bin/sh
> |
> |
> | if [ "$1" = "-c" ]; then
> |     COMMENT='yes';
> |     shift;
> | else
> |     COMMENT='no';
> | fi
> |
> | if [ "$COMMENT" = "yes" ]; then
> |     sed -i "/$1/,/^$/s/^[^#]/#&/g" "$2"
> | else
> |     sed -i "/$1/,/^$/s/^#\+//g" "$2"
> | fi
> `----

Let me see if I got your script right. You tell sed to work on the
range from "-c" to first blank line right?
Then you instruct it to comment the lines that are not already in
comment in that range (which in this case is also a paragraph).
It should work well so long as $1 is the first line in the paragraph.

Thank you very much!
Yosi

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

globpath with an expression

Vim 7.2.1-255

Not quite getting something.

I can do this:
echo globpath('C:\temp', 'test')
-- Nothing

echo globpath('C:\temp', 'test.*')
c:\temp\test.db
c:\temp\test.js
c:\temp\test.log
c:\temp\test.vim

echo globpath('C:\temp', 'test\(.*\)')
c:\temp\test.db
c:\temp\test.js
c:\temp\test.log
c:\temp\test.vim

echo globpath('C:\temp', 'test\(.vim\)')
-- Nothing

So, I am trying to use a regular expression to start limiting the files.
Any ideas on what I am missing?

TIA,
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

Saluton Patrick :)

Patrick Gen-Paul <p...@gmail.com> skribis:
>>> Another good reason to unsubscribe after all that useless ranting.
>>
>> do not let that be a reason to quit the vim list -- we of vim have a
>> long history of opening mouths and inserting feet -- speaking for
>> myself only of course...
>
> I wouldn't seriously think of unsubscribing for such reasons anyway,
> but as I mentioned elsewhere, I already have rather busy list nights..
>
> On the other hand folks have been so tolerant of my antics so far that
> I  may have a change of heart.

First: don't unsubscribe for such reasons ;) Second: this list is, to
date, the kindest and best behaved one I've been a member of. People is
always willing to help and except for a couple of trolling attempts and
the humongous amount of spam (that, hopefully, won't ever make its way
to the list), it is for me the best list I've ever joined because people
here is great.

I understand that you are busy and that reading more than a couple of
mailing lists can be a nightmare, though. Anyway, you're welcome if you
want to stay :)

> Would you believe that hanks to my silly problem and the ensuing
> rants, I'm gonna end up in the list's top ten posters this month...??

Yes, I believe it XDDDDDD I've done the same in some lists, too O:)

--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Sunday, August 30, 2009

Re: using j,k, to move through completion popup menu

On Aug 30, 7:07 pm, Roberto Miura Honji <miuraho...@gmail.com> wrote:
> 2009/8/30 Kevin <lazy...@gmail.com>
>
>
>
> > How would i set up vim to let me move through the completion menu
> > popup using j and k, and selecting with enter?
>
> You can do something like this:
>

Worked perfectly! pumvisible was the thing I had forgotten. Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

sc wrote:
> On Sunday 30 August 2009 15:08:57 Patrick Gen-Paul wrote:
>
>> Another good reason to unsubscribe after all that useless
>> ranting.
>
> do not let that be a reason to quit the vim list -- we of vim
> have a long history of opening mouths and inserting feet --
> speaking for myself only of course...

Thanks.. :-)

As I explained I own challenged hardware.. not enough sleep to boot..
and google's feeble interface to help me out... yes, it wasn't my fault
at all after all.. ;-)

I wouldn't seriously think of unsubscribing for such reasons anyway, but
as I mentioned elsewhere, I already have rather busy list nights..

On the other hand folks have been so tolerant of my antics so far that I
may have a change of heart.

Would you believe that hanks to my silly problem and the ensuing rants,
I'm gonna end up in the list's top ten posters this month...??

Bloody embarrassing.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: map to in command line

Matt Wozniski wrote:

> >
> > Jürgen Krämer wrote:
> >
> >> this is VI-compatible behavior. In VI pressing <Esc> on the command
> >> line executed the command. The only way to cancel a command was to
> >> press Ctrl-C. You should thus
> >>
> >>   :nmap <A-[> <C-C>
> >>
> >> For more information
> >>
> >>   :help c_<Esc>
> >>   :help c_<CTRL-C>
> >>
> >> Regards,
> >> Jürgen
> >>
> >
> > cnoremap <A-[> <C-C>
> >
> > The <C-C> did do the work. But I have set no VI-compatible
> mode. So, the previous mapping behavior should be strange.
>
> As Jürgen said,
>
> :help c_<Esc>
>
> explicitly explains that <Esc> behaves like <CR> in maps or macros, or
> when 'cpoptions' contains 'x'. I'm sure the reason for this is that
> there's a pretty good bet that if a map does ":w<Esc>" it's a
> vi-compatible macro that wants to write the file, meaning that
> changing this behavior would break even the most simple vi maps that
> users might have wanted to bring forwards, even though it's unlikely
> that the user really wanted to do some work and then throw it all
> away.
>
> ~Matt

Matt, I see. Thanks. I just ignore that the macro is just map in c_<Esc> help document.

Regards,
Liu

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: using j,k, to move through completion popup menu


2009/8/30 Kevin <lazyweb@gmail.com>

How would i set up vim to let me move through the completion menu
popup using j and k, and selecting with enter?
You can do something like this:

inoremap j <C-r>=Jmap()<CR>
inoremap k <C-r>=Kmap()<CR>

function! Jmap()
    if pumvisible()
        return "\<C-n>"
    else
        return "j"
    endif
endfunction

function! Kmap()
    if pumvisible()
        return "\<C-p>"
    else
        return "k"
    endif
endfunction

This e-mail have an attach file with the code the source using :source <path-to-file>/j_kmove.vim

--
----------------------------------------------
Roberto Miura Honji
LAS - Laboratório de Administração e Segurança de Sistemas
Engenharia de Computação - 2006
Instituto de Computação - UNICAMP

email: miurahonji@gmail.com (principal)
email: ra064201@students.ic.unicamp.br
msn:   miurahonji@msn.com
-------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Starting vim :help full screen

> When I type ":help" on an empty vim screen - such as a new tab for
> instance, vim automatically splits the screen.
>
> I proceed to issue a Ctrl-W O to remove the empty half screen, no big deal.
>
> Is there any "native" way I could start vim's help full-screen - without
> coding a macro and mapping it to a key combo - I don't think it's worth
> bloating my interface further for something this trivial.

A couple options occur to me -- two prefix options, and one
post-processing idea:

To open the help in its own tab:

:tab help some_topic_to_find

To open the help in the current non-modified empty buffer:

:set bt=help | help some_topic_to_find

Finally, one could create an autocmd for help-type files (my
autocmd creation is a bit rusty, so you'd have to experiment on
your own, or somebody else may step in) that forces an ":only" on
the help window (though it might grouse at you if there are
modifications in the to-be-closed windows).

-tim


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Starting vim :help full screen

Patrick Gen-Paul <pgenpaul@gmail.com> [09-08-31 02:58]:
>
> Is there any "native" way I could start vim's help full-screen - without
> coding a macro and mapping it to a key combo - I don't think it's worth
> bloating my interface further for something this trivial.

Hi Gen-Paul

try

set helpheight=80

or any other value than '80', which better fit your needs.
This will size the help window to exactly that height.
But I still didn't find a way to make the help window
the sole one. It always looks liketwo windows on the
screen.

May be a real vim guru has a better help...:)

Have a nice day!
Best regards,
mcc


--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

using j,k, to move through completion popup menu

How would i set up vim to let me move through the completion menu
popup using j and k, and selecting with enter?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

RE: Starting vim :help full screen

Patrick Gen-Paul
> When I type ":help" on an empty vim screen - such as a new
> tab for instance, vim automatically splits the screen.
>
> I proceed to issue a Ctrl-W O to remove the empty half
> screen, no big deal.

I don't think there is a simple and better technique, although
(best in gvim) you could try:

:tab help

and perhaps use Ctrl-PgUp, Ctrl-PgDn to navigate tabs.

Ctrl-W _ is also useful instead of Ctrl-W o

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Vim Suggestion: adapting tw to displayed with (vs. termwidth) if numbering

Linda W <vim@tlinx.org> wrote:
>
>
> Suggesting [programmatically, :-) ]:
>
> When (vimoption(number) == true)) {
> when ("one uses text autoformat" (aka 'gqap')) {
> setlocal tw=disp_width'(dflt==0)) /' - nuw'(vimdflt=4,compat=8) /'
> }
> }
>
> ?
> Linda

That hard-wraps text to the size of your xterm. What happens if you
resize your xterm, as I simulated while
writing this post? Should we wrap diff-
erent regions of the document to diff-
erent sizes?

--Ken

--
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: blank space to the left of the first column

* John Beckett <johnb.beckett@gmail.com> [090829 22:47]:
> John Magolske wrote:
>> I notice two blank columns to the left of the first column in the
>> file -- the text is spaced two columns away from the left border
>
> :set fdc=0

Thanks! ':help fdc' tells me I can have a column up to a 12 characters
wide on the left side of the window. In addition to better visualizing
folds, this improves (IMO) the display of text in the Linux framebuffer
console, where the text goes right up to the left border of the LCD
display without even so much as a pixel of spacing. I put 'set fdc=1'
in my vimrc...much nicer now.

Regards,

John


--
John Magolske
http://B79.net/contact

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Starting vim :help full screen

When I type ":help" on an empty vim screen - such as a new tab for
instance, vim automatically splits the screen.

I proceed to issue a Ctrl-W O to remove the empty half screen, no big deal.

Is there any "native" way I could start vim's help full-screen - without
coding a macro and mapping it to a key combo - I don't think it's worth
bloating my interface further for something this trivial.

Thanks,

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: How does the python omnicomplete functionality work with vim?

Have you tried pythoncomplete script (http://www.vim.org/scripts/
script.php?script_id=1542
) ?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

On Sunday 30 August 2009 15:08:57 Patrick Gen-Paul wrote:

> Another good reason to unsubscribe after all that useless
> ranting.

do not let that be a reason to quit the vim list -- we of vim
have a long history of opening mouths and inserting feet --
speaking for myself only of course...

sc

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: using regexp to search for Unicode code points and properties

Warning: this reply is in UTF-8.

On 20/08/09 15:47, Brian Anderson wrote:
>
> I'm interested in learning how to use regular expressions in Vi(m) to
> search for Unicode code points.
>
> In a book about regexp, it describes how to search for Unicode code
> points by various means, and for various programming languages.

There are various kinds of regexps, for various languages (such as perl)
and programs (such es egrep). Vim has its own. They are each subtly
different.

The only authoritative documentation about Vim is the help that comes
with Vim. It is extremely complete. The "chapter" about regular
expressions (usually named "patterns" in Vim parlance) is accessed by

:help pattern.txt

IMHO the most useful part of that starts at

:help pattern-overview

>
> The book describes searching for a specific Unicode code point as \u2122
> or \x{2122}.
>
> From what I've seen in the Vim help files, \u is to identify uppercase
> characters, not Unicode code points, and \x is for hexadecimal digits.

Yes and no. In Vim, you can search for, let's say, a Cyrillic lowercase
soft sign with any of:


(using the soft sign directly e.g. if you have a Russian keyboard or use
a keymap)

/\%u044c

(see ":help /\%u")

/[\u044c]

(see not far below ":help /\]", and usually only valid in 'nocompatible'
mode)

Or the same with ? instead of / to search backwards, or fь Fь tь or Tь
(with no carriage return needed), to search only within the current line.

>
> The book also talks about using Unicode property or categories in the
> search. The book indicates there are 30 Unicode categories, grouped into
> 7 super-categories.
> For example, \p{Ll} would find any lowercase letter that has an
> uppercase variant, and \p{Lo} any letter or ideograph that does not have
> lowercase and uppercase variants.
>
> Unicode blocks are defined as \p{IsGreekExtended}. Blocks consist of a
> single range of code points. Example: searching for any code point
> between U+0000...U+007F can be found with \p{InBasicLatin}.
>
> Unicode script is \p{Greek}. Each Unicode code point is part of only one
> Unicode script. So if I wanted to search for any Greek letter, I'd use
> \p{Greek}.
>
> Unicode grapheme is \X or \P{M}. This would be either single codepoints
> (U+00E0 Latin small letter a with grave accent) or combined codepoints
> (U+0061 Latin small letter a + U+0300 combining grave accent).
>
> Help on any of these, either in examples or where to look in the help
> files, welcome.

None of these apply to Vim. To search for anything between U+0000 and
U+007F inclusive, you could use

/[\x00-\x7F]

though (with Vim) it might be more prudent to use

/[\x00\x01-\x7F]

since the NUL byte is usually represented by 0x0A to avoid having it
terminate the C string representing the line. Vim cannot search for
collections of more than 256 (or is it 257?) consecutive byte values,
however, so this construct is useless if you want to search for "any CJK
hanzi / kanji / hanja".

To search for either U+00E0 or U+0061 U+0300, use

/\%xE0\|\%x61\%u0300
or even
/à\|a\%u0300

where \| means "or" (so this tells Vim explicitly to search for _either_
a precomposed a-grave _or_ a small-a followed by a combining-grave). If
in the middle of a longer regexp, you may wish to wrap that within \%(
and \) to avoid having the \| apply to what comes before or after the
a-grave.

Or you may wish to run a "normalization pass" first, such as

:%s/a\%u0300/à/g

but it might be unwieldy if there are many different such possible
characters to normalize.

The only pattern atom specifically relevant for combining characters is
\Z, which tells Vim to ignore any possible combining characters found in
the text. This might be useful for Arabic or Hebrew text, where short
vowels (represented by combining chracters) are optional, but it would
be less useful for Latin, where "combined" a-acute, a-grave,
a-circumflex, a-umlaut, a-ball, a-ogonek, a-macron and a-breve all would
be lumped together with plain a, but "precomposed" á à â ä å ą ā ă would
each be regarded as different (from each other and from plain a).

>
> Thanks.
>
> Brian

Best regards,
Tony.
--
You buttered your bread, now lie in it.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Remove message "Cannot Load registered type library" : "Do you want to register"

On 20/08/09 16:25, geoffrey.wood@thomsonreuters.com wrote:
>
>> I have copied my gvim installation on a USB stick.
>> When I place that USB stick into another system and I run gvim from
>> there it comes with the message
>> "Cannot Load registered type library"
>> "Do you want to register"
>> "Yes/No"
>>
>> Can this message be removed?
>> And if so how to do that?
>> I assume recompiling gvim?
>
> I see the same thing. I'm using the standard distribution of
> VIM 7.2 (2008 Aug 9) MS-Windows 32-bit
>
> My rough-and-ready solution is to have a batch file on my stick which
> I run, it registers VIM automatically, runs VIM, and unregisters
> again when I close VIM.
>
> I think this still leaves some empty registry keys on the machine.
> This doesn't bother me, but if it's a concern you could investigate
> exactly what is left and use a utility like "reg" to delete the
> traces.
>
> It would be nice to have a better solution though.
>
> PortableApps VIM had this problem reported back in January, so
> maybe it is fixed now.
>
> http://portableapps.com/node/15654
>
> :: ---- Batch file starts
>
> :: make it obvious what this cmd prompt is doing
> title Running VIM
>
> :: Add the tools directory on my stick to the path
> :: so VIM can use the tools directly
> :: %~d0 makes it work whatever drive letter the stick has used
> set path=%path%;%~d0\tools
>
> :: register Vim without showing that message
> %~d0\vim\vim72\gvim -silent -register
>
> :: run Vim so I can use it (then wait for it to close)
> %~d0\vim\vim72\gvim

with standard Vim, this doesn't wait for it to close, it continues as
soon as Vim has done the Windows equivalent of "forking", which happens
at some point during startup.

See
:help -f

>
> :: now Vim has closed, unregister it
> %~d0\vim\vim72\gvim -silent -unregister

now that gvim has _started_ (and relinquished the console), unregister
it. This will probably prevent any use of Vim as an OLE server, so you
could just as well compile it with OLE=no.

>
> :: ---- Batch file ends
>
> regards,
> Geoff Wood
[company disclaimer snipped]


Best regards,
Tony.
--
What is the difficulty with writing a PDP-8 program to emulate Jerry
Ford?

Figuring out what to do with the other 3K.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Retaining cursor position and getting back the # character's normal use

Seeing that this email has slept for 10 days on the list with no answer,
I guess it's my turn.

On 20/08/09 11:52, Bernard El-Hagin wrote:
>
>
>
> Hi,
>
>
> I have two questions:
>
>
>
> 1) Let's say I have the following code:
>
>
>
> if ( whatever1 ) {
>
> # do stuff 1;
> }
>
>
> if ( whatever2 ) {
>
> # do stuff 2;
> }
>
>
> And let's say I'm in normal mode and have my cursor on the first "e"
> of "whatever1". When I now use j to move a couple of lines down, I
> would like the cursor to also be at the first "e" of "whatever2", but
> what it does is jump to the beginning of the line between the two
> ifs and never returns. I have set "sol" to true and I don't know
> what other setting can help here (except for virtualedit, which I don't
> want).

Works for me, with gvim 7.2.245 (Huge) with GTK2-GNOME GUI. Here too,
'sol' is on, and 'virtualedit' is set to the empty string. You could try

vim -N -u NONE

(with vim and -u in lowercase and the rest in uppercase), or

vim -N -u NORC

or, on Unix

vim -u /usr/local/share/vim/vim72/vimrc_example.vim

or, on Windows

vim -u C:\PROGRA~1\vim\vim72\vimrc_example.vim

(or the same with gvim instead of vim if you prefer) to see which ones
of them work and which ones don't. If they all work, and your usual Vim
doesn't, then the culprit is probably your vimrc. If, in addition,

vim --noplugin

doesn't work, then the culprit is almost certainly your vimrc.

You might also try

:verbose map j

to see if you haven't got a mapping telling Vim to do something else
when you hit j. If you do, the above, will also tell you where it was
set. (I have no such mapping defined.)


>
>
>
> 2) I write a lot in Perl, in which the default behaviour of the # key
> is special. I don't *want* it to be special. All I want, is to get the
> "#" character when I type the "#" character. That is all. How can I achieve
> this?

I don't know Perl, but try

:verbose map! #

while editing a Perl file. (The exclamation mark is important.) Or if
you would describe that "special behaviour" in more detail, it might be
easier for me to guess what happens.

>
>
>
> Thanks,
> Bernard


Next time, one question per post, please.


Best regards,
Tony.
--
Tonight's the night: Sleep in a eucalyptus tree.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

On Sun, Aug 30, 2009 at 01:31:47PM EDT, Raúl Núñez de Arenas Coronado wrote:

[..]

> If so, drop me a note and I'll unsubscribe you manually.

Thanks, Raúl, much appreciated.

I hope you saw my other post .. how I finally found the cause of my
problems. Sloppy debugging, it shouldn't have taken me more than 5
minutes to figure it out.

Another good reason to unsubscribe after all that useless ranting.

:-/

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Replace Just Needed

On Sat, Aug 29, 2009 at 09:57:58PM +0800, bill lam wrote:
> I added a vim macro inside ~/.vimrc
>
> function! Tofu()
> call search('^$')
> if 1 < line(".")
> 2,/^$/-1!sed -e 's/^> //' | t-prot -(your options here) | sed -e 's/^/> /'
> +/^$/
> endif
> endfunction

Hi Bill,

Thanks for this snippet, works perfectly for me.

> and set editor variable inside ~/.muttrc
>
> set editor="vim -c \"set spell tw=70 et\" \"+silent! call Tofu()\""

I added it to ~/.vim/after/ftplugin/mail.vim where I keep the
other mail stuff.

> The extra search in Tofu() is for positioning cursor to just before my
> signature when replying.
>
> Or you may prefer to call Tofu() manually. ymmv
>
> With t-prot, I actually like top posting. ;-)

;-)

> --
> regards,

Thanks again,
Simon
--
+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Re: Trying to post - Finally..!

John Beckett wrote:
> Patrick Gen-Paul wrote:
>> Er.. you mean that if I subscribe pgenpaul@gmail.com to the
>> vim@vim.org mailing list, proceed to post a message from my
>> machine, I then have to use a web browser rather than my MUA
>> to follow up..?? Or in other words I have to subscribe from a
>> non-gmail account to function normally within the context of
>> this mailing list...???
>
> You would only have trouble if you wanted to reply to your OWN
> message. Sending a new message and replying to a message sent by
> anyone else would be no problem (using whatever mail client you
> like).
>
> As bill lam said, this is a very well known problem to do with
> your gmail account, and has nothing to do with the system used
> for the mailing list. I also have a gmail account, and am
> irritated by exactly the same issue both here and on mailman
> lists. However, in practice, it is not a problem because I
> rarely need to reply to myself.

Well the explanation was a lot simpler - and now I realize why you had
no idea what I was really talking about - and were trying to humor the
lunatic ;-)

I am dead certain that one of the first things I did was go see if gmail
accounts have a Spam folder and if unbeknownst to me, my lost messages
had found their way therein. But with Seamonkey eating up 90-99% CPU, as
soon as I log on to gmail, I probably mis-clicked on the microscopic
link and went to check the Trash folder instead. That would make
excellent sense because that's exactly what I did when I was retracing
my steps, an hour or so ago.. only this time I caught it.. :-(

Well to cut a long story short, I checked again because that was the
most likely explanation for the strange things I was seeing, and lo and
behold, I found not only my lost messages to the vim list, but also
about 50% of the the vim_use traffic since I subscribed. And naturally,
since all these messages were marked as spam they were never downloaded
to my local system.

I have set up a filter to disable Google's spam filter and will see what
happens.

The reason why the other lists I had subscribed to from this account
appeared to work correctly is that they _almost_ did: I only found one
message from the mutt-users list and about five from the python list.

Interestingly, my "new posts" to vim_use had a nice message at the top
informing me that they had been moved to the Spam folder because Google
believes that my From: header had been forged...!

For some reason, my "new posts" to the mutt-user list were not labeled
forgeries.. perhaps because they did not originate from Google groups?

So if anyone here uses a gmail account as a mail drop for the vim_use
mailing list and you hasn't already addressed this issue, it won't hurt
take a quick peek at your Spam folder - you may have been missing on
some of the action :-)

Thanks much for helping me figure this out.

Gen_Paul.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Thank you for your patience.

I'll see if I can get someone well-versed in the art of email, and more
particularly mailing lists to see if he can help me work around this
issue, or at least explain this inconsistent behavior & my disappearing
initial "sh.vim syntax file..." message.

I really appreciate the help, and since this appears to cause grief to
at least one of the list subscribers as well, I will definitely get back
to you if I find something useful.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: ":setlocal spell" shows "SpellLocal" errors

On Sat, Aug 29, 2009 at 10:01 AM, AndyHancock wrote:
>
> I'm using vim 7.1 from the cygwin 1.5.25 installation. I did:
>
>   :set spelllang=en_us,us_ca
>
> I got:
>
>   Warning: Cannot find word list "us.latin1.spl" or "us.ascii.spl"

Well, two points here - one, you should probably be using vim in UTF-8
mode unless you have a really good reason not to, and b) in vim 7.1
this would fail unless ~/.vim/spell/ already existed, so an mkdir
might help.

> Before getting the above error, Vim asked for permission to download
> those files, but couldn't find them.  After the above error, local
> spellings such as "neighbourhood" and "colour" are highlighted as
> SpellLocal, meaning that it is the /wrong/ spelling for the selected
> region.  I thought I was selecting the region with above command?

If I set spelllang to "en_us", "colour" is highlighted with
SpellLocal. If I set it to "en_ca", "color" is highlighted with
SpellLocal. If I set it to "en_us,en_ca", neither "color" nor
"colour" is highlighted as SpellLocal.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

Saluton Patrick :)

Patrick Gen-Paul <p...@gmail.com> skribis:
> I'm only missing my original post - looks like Google groups and gmail
> do not work together correctly.. since I have never had any such
> problems with gmail and traditional mailing lists - otherwise I would
> have ditched gmail the same day I created my first account :-)

I don't know why you had problems, since I haven't suffered them during
the time I've been using this mailing list using my GMail account :?
It's true that Google Groups is not very well maintained, that has many
problems and that bug reports sent to the Google people are going to be
ignored, but this particular problem you're having is weird. Mysteries
of electronic life, I suppose XD

> Well, I hope I won't have any problems unsubscribing ;-)

If so, drop me a note and I'll unsubscribe you manually.

--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

On Sun, Aug 30, 2009 at 12:46:17PM EDT, Raúl Núñez de Arenas Coronado wrote:
>
> Saluton Patrick :)
>
> Patrick Gen-Paul <p...@gmail.com> skribis:

> > Raúl, if you think this is worth investigating, the subject of my
> > original message is "vim 7.1 - sh.vim syntax file - unwarranted
> > syntax error detected" and it was posted "From: pgenpaul@gmail.com".

> It is on the mailing list archives (three times, because you reposted
> it or replied to it, I haven't investigated that) and you have a reply
> from John Little.

Hey, Raúl.. please don't bother investigating.. I am the guilty party
here and did post this message several times.

> See here:
> http://groups.google.com/group/vim_use/browse_thread/thread/3439b232367c7082/ac016dc831d36b12?lnk=gst&q=pgenpaul#ac016dc831d36b12

Yes, I saw that in Yahoo! groups as well.

And John Little's excellent reply did materialize on my local system.

I'm only missing my original post - looks like Google groups and gmail
do not work together correctly.. since I have never had any such
problems with gmail and traditional mailing lists - otherwise I would
have ditched gmail the same day I created my first account :-)

> If you have any other problem, please tell me, Google Groups has some
> problems at times.

Well, I hope I won't have any problems unsubscribing ;-)

I really don't have the time to follow and contribute to an additional
mailing list.

Thanks much for help.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Thank you for your patience.

I'll see if I can get someone well-versed in the art of email, and more
particularly mailing lists to see if he can help me work around this
issue, or at least explain this inconsistent behavior & my disappearing
initial "sh.vim syntax file..." message.

I really appreciate the help, and since this appears to cause grief to
at least one of the list subscribers as well, I will definitely get back
to you if I find something useful.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

Saluton Patrick :)

Patrick Gen-Paul <p...@gmail.com> skribis:
> Raúl, if you think this is worth investigating, the subject of my
> original message is "vim 7.1 - sh.vim syntax file - unwarranted syntax
> error detected" and it was posted "From: pgenpaul@gmail.com".

It is on the mailing list archives (three times, because you reposted it
or replied to it, I haven't investigated that) and you have a reply from
John Little.

See here:
http://groups.google.com/group/vim_use/browse_thread/thread/3439b232367c7082/ac016dc831d36b12?lnk=gst&q=pgenpaul#ac016dc831d36b12

If you have any other problem, please tell me, Google Groups has some
problems at times.

--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

On Aug 30, 5:29 am, Patrick Gen-Paul <pgenp...@gmail.com> wrote:
> Sorry Bill and Fuzzy Logic, and thanks for your patience, but I think
> there must be some kind of miscommunication going on: I do not post from
> a gmail account, or in other words, I do not start mozilla, log on to
> their nightmare of an interface, compose a message with their nightmare
> of an editor, waste five minutes trying to remember which silly little
> icon I need to click to make sure my message is sent a plain text and
> not as html.. etc.
>
> I am subscribed to v...@vim.org under a gmail account but I do all my
> mailing and composing under mozilla-mail running locally on my laptop.
> In other words, I use the gmail account as a mail drop because I do not
> have a fixed IP address, my own domain.. etc. and I do not run a mail
> server visible to the outside world.
>

Regardless of whether you use POP forwarding, regardless of whatever
mail client you actually use to check your email, YOUR EMAIL ACCOUNT
IS WITH GMAIL. All your mail goes through the gmail servers, whether
you read it on the web interface or not. All the mail downloaded to
your own PC is first processed by google's computers. There is no
possible way to receive a message from your gmail account in your
inbox on your PC without it also appearing in your inbox on the web
interface. Hence, as a limitation of gmail apparently, you will be
unable to receive messages that you yourself sent from your gmail
account.

Now, if you were to subscribe to the list using a non-gmail account
(i.e. one that does not end in @gmail.com, and regardless of where you
read it) then you may be able to receive messages you sent.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: MXML omnicomplete definition?

On Aug 30, 3:27 am, Tom Link <micat...@gmail.com> wrote:
> Hi,
>
> Does somebody happen to know of a mxml omnicomplete definition file
> for use with :h ft-xml-omni?
>
> If not, is there a way/script to turn a xsd xml schema into such a
> definition file?

I have built an entire Vim suite for Flex (MXML and ActionScript),
indent, syntax and documentation.

I am trying to finish the documentation and bundle it up to send to
Bram to include in the next Vim update.

If you are interested in it I can bundle it for you to try out.
Any feedback on what I have done is very welcome, so far I have been
the only tester.

One thing I have not been able to do yet is find a list of classes and
methods for ActionScript so I can complete it. I have everything I
need for MXML, just not ActionScript.

If anyone knows:
1. Where I can get a list of ActionScript classes and methods.
or
2. Use some ActionScript to generate that list I could incorporate
that into Vim's completion.

Thanks,
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

question about ShowFuncName

Dear all,

I get the following script from http://vim.wikia.com/wiki/Show_current_function_name_in_C_programs

fun! ShowFuncName()
let lnum = line(".")
let col = col(".")
echohl ModeMsg
echo getline(search("^[^ \t#/]\\{2}.*[^:]\s*$", 'bW'))
echohl None
call search("\\%" . lnum . "l" . "\\%" . col . "c")
endfun
map f :call ShowFuncName() <CR>

It works for most of the case, however, if there is some MACO used
like this,

void func_name(void)
{
MARCO;
// line x
}

it will display the MARCO name instead of function name.

Anyone would like to help? Thanks.

Regards,
Ivan

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: Trying to post.

Fuzzy Logic wrote:
> Any mailling list software which rewrites the Message-ID will cause
> Gmail senders to see their reply as a unique message.
>
> Mailmain claims that it cannot do anything about it, but someone could
> quite easily change the software to rename the existing Message-ID to
> X-OLDMessage-ID and write a new unique Message-ID. Wouldn't be
> RFC-compliant, but possible.
>
> On Sun, Aug 30, 2009 at 3:29 AM, bill lam<cbill.lam@gmail.com> wrote:
>
>> On the contrary I would like to learn which mailing lists you
>> subscribed can bounce emails back to the same gmail account.
>
>
Sorry Bill and Fuzzy Logic, and thanks for your patience, but I think
there must be some kind of miscommunication going on: I do not post from
a gmail account, or in other words, I do not start mozilla, log on to
their nightmare of an interface, compose a message with their nightmare
of an editor, waste five minutes trying to remember which silly little
icon I need to click to make sure my message is sent a plain text and
not as html.. etc.

I am subscribed to vim@vim.org under a gmail account but I do all my
mailing and composing under mozilla-mail running locally on my laptop.
In other words, I use the gmail account as a mail drop because I do not
have a fixed IP address, my own domain.. etc. and I do not run a mail
server visible to the outside world.

As a result mail from vim@vim.org is sent to pgenpaul@gmail.com and I
use POP3 to download the contents of that account's Inbox once in a
while to my local repository.

As to what mailing lists I subscribed to that do deliver copies of my
post, here is a simple example:

I subscribed to mutt-users@mutt.org on 08/02/2009 specifying the same
pgenpaul@gmail.com as when I subscribed to vim@vim.org.

On 08/11/2009, at about 7:41 PM EST, I posted a message from this
account whose title is "Malformed From: address in headers". This was
message was composed and sent using Thunderbird on my local system.

A few minutes later I downloaded new messages from pop.gmail.com for the
three mailing lists that pgenpaul@gmail.com is currently subscribed to,
mutt-users@mutt.org, vim@vim.org, and python-list@python.org.

As a part of this download, a copy of my message to mutt-users@mutt.org
ended up on my system.

Some time after 9:00 PM EST on the same day, I downloaded new messages
again from the pgenpaul@gmail.com account and I had a reply from one
Kyle Wheeler, with a timestamp of 8:19 PM.

I replied to his post at about 9:34 PM on the same day.

You can take a look at the thread at:

http://www.mutt.org/mail-lists.html

But then mutt-users is a proper mailing list, not a Google group.

:-)

I repeated the same scenario this morning with the vim@vim.org mailing
list and for some obscure reason, my initial post was never returned to
me, which means that instead of using my mailer to follow up, I now have
to fire up a web browser - why a web browser, I ask you.. I'm doing
email, no..?? what next.. I want to edit a file, can I use vim..?? well
no, you cannot, you must use a web browser..

Still doesn't really explain how my initial "Trying to post" message to
this "mailing list" made it back to my system, despite the fact that it
was posted in the exact same conditions, from the same gmail account..

No big deal anyway.. sorry about the noise and have a nice day.

Gen-Paul.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: vim 7.1 - sh.vim syntax file - unwarranted syntax error detected.

>  console-screen.kbd.sh

With vim 7.2.245, the highlighting of line 30 is ok but fails on and
after line 32, even with the very latest syntax file (v108) from the
maintainer's website (http://mysite.verizon.net/astronaut/vim/
index.html#vimlinks_syntax
). It doesn't like the escaped double quote
after the square bracket. The following two line shell script
exhibits the problem:

echo [ \"Lorem
echo ipsum

Dr Chip will likely see this thread, I hope this helps him, should he
be inclined to fix it.

Regards, John
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: changing what counts as a paragraph

On 20/08/09 21:00, Raúl Núñez de Arenas Coronado wrote:
>
> Saluton Wayne :)
>
> Wayne<b...@gmail.com> dixit:
>> Why people hates bottom post?
>
> First of all, you topposted after being warned about list guidelines.
> Please DON'T TOP POST ON THIS LIST. See the list guidelines, again:
>>> http://groups.google.com/group/vim_use/web/vim-information
>
> Second, it's not a matter of hate: http://www.caliburn.nl/topposting.html
>

He didn't ask why people (old Usenet hands) hate top-posting, but why
people [newbies I suppose] hates [sic] bottom post [sic]. ("sic" because
I would have asked "why people hate bottom posting" or maybe "why people
hate to bottom-post": "people" is a plural except when "a people" is
used as an approximate synonym of "a nation".)

The reason most newbies use top-posting is, I believe, that the
braindead software they use makes top-posting easier. I'm not saying
that it _enforces_ top-posting, and, indeed, in most cases, when
composing a reply you can move your edit cursor to below the part to
which you want to reply, after removing irrelevant quoted text.

One possible exception has been said to be some "Internet phone" servers
where the quoted text is added in front of the message by the server
_after_ you send the reply, where the quoted text is not included. If
such servers exist, IMO they are worse than braindead.


Best regards,
Tony.
--
Others will look to you for stability, so hide when you bite your
nails.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

RE: Trying to post.

Patrick Gen-Paul wrote:
> Er.. you mean that if I subscribe pgenpaul@gmail.com to the
> vim@vim.org mailing list, proceed to post a message from my
> machine, I then have to use a web browser rather than my MUA
> to follow up..?? Or in other words I have to subscribe from a
> non-gmail account to function normally within the context of
> this mailing list...???

You would only have trouble if you wanted to reply to your OWN
message. Sending a new message and replying to a message sent by
anyone else would be no problem (using whatever mail client you
like).

As bill lam said, this is a very well known problem to do with
your gmail account, and has nothing to do with the system used
for the mailing list. I also have a gmail account, and am
irritated by exactly the same issue both here and on mailman
lists. However, in practice, it is not a problem because I
rarely need to reply to myself.

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Re: changing what counts as a paragraph

On 19/08/09 17:21, at wrote:
>
> Thanks. I'm surprised there's no better way. I can't get used to
> watching my spaces at the end of equation lines, so I think I'll go
> for formatoptions=tcqw and then make a binding to gwap that I can hit
> occasionally.

With

:set list listchars=tab:\ \ ,eol:$

you'll see a blue dollar sign at the end of the lines, so end-of-line
spaces will be much more obvious.

See also ":help listchars" for the possible values of that option, and
don't forget that in operands of ":set" statements you must
backslash-escape all spaces, bars, double-quotes and -- well, backslashes.

Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---