Monday, November 30, 2009

Re: Prevent from entering to insert mode before finishing mapping


It's necessary to escape "|" as <Bar> in {rhs} of :map commands.


hoooo, now I know why.
Thank you. it works.

Anna

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

Re: Prevent from entering to insert mode before finishing mapping

Sorry for typo. Use the following instead:

onoremap w :<C-U>exe DoCommand() <Bar> call DoSomethingElse()<CR>


On Dec 1, 4:19 pm, anna klein <annaklein...@gmail.com> wrote:
> This gives me error E488: Trailing characters.

It's necessary to escape "|" as <Bar> in {rhs} of :map commands.

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

Re: Prevent from entering to insert mode before finishing mapping

This gives me error E488: Trailing characters.
I don't know why I always get trailing characters error if I use "|". That's why I avoid using "|".
Any more advice?

Anna

On Tue, Dec 1, 2009 at 2:52 PM, Kana Natsuno <kana@whileimautomaton.net> wrote:
> onoremap w :<C-U><CR>:exe DoCommand()<CR>:call DoSomethingElse()<CR>

onoremap w  :<C-U>exe DoCommand() | call DoSomethingElse()<CR>

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

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

Re: Prevent from entering to insert mode before finishing mapping

> onoremap w :<C-U><CR>:exe DoCommand()<CR>:call DoSomethingElse()<CR>

onoremap w :<C-U>exe DoCommand() | call DoSomethingElse()<CR>

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

Prevent from entering to insert mode before finishing mapping

As per subject, is there a way to prevent from entering to insert mode
before finishing mapping?

Below is my script. There are three comands that I want to execute for
one mapping. When I type command dw or pw, it works as what I want,
because it stays in normal mode. However, when I type command cw, it
will enter to insert mode, and then type ":exe DoCommand()<CR>:call
DoSomethingElse()<CR>".

So, I guess that it enters insertmode after finishing first command.
Is there a way to make it finish the three comands first, and then go
to insert mode?
Any advice is really appreciated. Thank you.

onoremap w :<C-U><CR>:exe DoCommand()<CR>:call DoSomethingElse()<CR>

function! DoCommand() range
return 'normal! d2w'
endfunction

function! DoSomethingElse()
echo 'dummy'
endfunction

Note: I intentionally oversimplify the DoCommand() function.

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

Re: Specify a register for a custom command


This seems petty - it's the difference between 5 keystrokes and 2, but I use it
about 30 times a day.  Can I ask what the <C-U> does?  I tried the code w/o the <C-U> and I can't see a difference in the functionality.


You can find here.
:h count-variable

"Note: The <C-U> is required to remove the line range that you get when typing ':' after a count"

Anna


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

Re: groovy indent file?

> I would be interested in an updated groovy indent file, also.

AFAIK there is no groovy indent file. I now created a proxy file that
loads the java indent file instead. If you put semicolons at the end
of the lines, this should be an improvement. Let's see.

I guess one could modify the java file to handle missing semicolons
properly. The basic indentation level is set by cindent(). The problem
would be to define a set of rules that tell the current indentexpr
isn't a continuation of the previous one.

Regards,
Tom

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

Custom Paragraph Formatting with gq

I have logbook entries that have the following structure:

[entry title 1]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse blandit ipsum vel elit ultrices pharetra rhoncus tellus aliquam. Donec quis dolor ac elit vestibulum rhoncus. Quisque adipiscing dolor vitae urna molestie in vulputate arcu mattis. Donec felis augue, aliquam dictum mattis vitae, pretium in massa.

What I would like to do is apply 'gq' command to format all the paragraphs in the file, but the [entry title 1] header also gets formatted (which I don't want.) So it turns out something like this:

[entry title 1] Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse blandit ipsum vel elit ultrices pharetra rhoncus tellus aliquam.
Donec quis dolor ac elit vestibulum rhoncus. Quisque adipiscing dolor vitae
urna molestie in vulputate arcu mattis. Donec felis augue, aliquam dictum
mattis vitae, pretium in massa.

I want it to result in this way:

[entry title 1]
Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Suspendisse blandit
ipsum vel elit ultrices pharetra rhoncus tellus aliquam.  Donec quis dolor ac
elit vestibulum rhoncus. Quisque adipiscing dolor vitae urna molestie in
vulputate arcu mattis. Donec felis augue, aliquam dictum mattis vitae, pretium
in massa.

Any ideas?

(I've been reading 'formatoptions' and fo-table but could not find anything of related to custom paragraph settings.)

Thanks.

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

Re: ctrl+J without adding a space

On 2009-11-30, KKde wrote:
> >
> >    :help J
> >    :help gJ
> >
>
> gJ doesn't remove the indentation space whereas J removes the
> indentaion space and add's up to two spaces. Is there any command to
> join two lines without any white space added in between?or a function
> needs to be written to acheive this?

There's no built-in command to do that, but you could create a
mapping such as this one that redefines the behavior of gJ, taking
advantage of the observation that J moves the cursor to the
whitespace joining the two lines:

:nnoremap gJ Jdiw

HTH,
Gary


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

Re: ctrl+J without adding a space

>
>    :help J
>    :help gJ
>

gJ doesn't remove the indentation space whereas J removes the
indentaion space and add's up to two spaces. Is there any command to
join two lines without any white space added in between?or a function
needs to be written to acheive this?

Regards,
Sharat

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

Re: groovy indent file?



On Mon, Nov 30, 2009 at 9:26 PM, Nathan Neff <nathan.neff@gmail.com> wrote:


On Sun, Nov 29, 2009 at 10:09 AM, Tom Link <micathom@gmail.com> wrote:
Hi,

Does somebody know a groovy indent file? I found a thread from 1-2
years ago with no satisfying answer to a similar question. Has the
situation changed in the meantime?


Tom,

I would be interested in an updated groovy indent file, also.

Whenever I format a groovy file using gg=G, I end up with code like this:

def var1 = 'Foo'
    def var2 = 'Bar'
    def var3 = 'Baz'


Oops -- I mis-stated my problem (I don't mean to take over your thread, so I'll post a link to my question from awhile ago).

http://old.nabble.com/Groovy-Indenting-td20042847.html#a20042847

 
And obviously, all three lines should be on the same indent level.

Thanks,
--Nate
 
Regards,
Tom

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


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

Re: groovy indent file?



On Sun, Nov 29, 2009 at 10:09 AM, Tom Link <micathom@gmail.com> wrote:
Hi,

Does somebody know a groovy indent file? I found a thread from 1-2
years ago with no satisfying answer to a similar question. Has the
situation changed in the meantime?


Tom,

I would be interested in an updated groovy indent file, also.

Whenever I format a groovy file using gg=G, I end up with code like this:

def var1 = 'Foo'
    def var2 = 'Bar'
    def var3 = 'Baz'

And obviously, all three lines should be on the same indent level.

Thanks,
--Nate
 
Regards,
Tom

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

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

Re: Specify a register for a custom command



On Mon, Nov 30, 2009 at 9:09 PM, Nathan Neff <nathan.neff@gmail.com> wrote:


On Mon, Nov 30, 2009 at 3:36 AM, Andy Wokula <anwoku@yahoo.de> wrote:
Nathan Neff schrieb:
> I'm looking to create a custom command / mapping where I can use the
> contents of a register that is specified by the user.
>
> Similar to how ["x]p works.  The user can press "ap and the contents of the
> "a" register will be pasted.  The user can just press p and the contents of
> the unnamed register are pasted by default.
>
> I want to define a custom command where the user can put the optional ["x]
> in front of the mapping, and my command will work with the register that the
> user specified.
>
> If the user doesn't specify a register, then I'm going to use the unnamed
> register by default.
>
> Is there a way to create a mapping that accepts the optional ["x] in front
> of it?
>
> Thanks,
> --Nate

:h v:register


nn <Leader>a :<C-U>call MyPaste()<CR>

func! MyPaste()
   exec "normal!" v:count1. '"'.v:register. "p"
endfunc


And what is your command supposed to do?


Good question.  The command will take the contents of the specified register and paste it in a new line below the cursor.  Similar to the :pu command.

Thanks,
--Nate
 

Andy, your solution worked.

I have a mapping that will paste a newline plus the contents of the specified register (or the unnamed register by default)

func! MyPaste()
    exec "pu " . v:register
endfunc

nn <leader>p :<C-U>call MyPaste()

This seems petty - it's the difference between 5 keystrokes and 2, but I use it
about 30 times a day.  Can I ask what the <C-U> does?  I tried the code w/o the <C-U> and I can't see a difference in the functionality.

Thanks,

--Nate

--

Andy

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


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

Re: Specify a register for a custom command



On Mon, Nov 30, 2009 at 3:36 AM, Andy Wokula <anwoku@yahoo.de> wrote:
Nathan Neff schrieb:
> I'm looking to create a custom command / mapping where I can use the
> contents of a register that is specified by the user.
>
> Similar to how ["x]p works.  The user can press "ap and the contents of the
> "a" register will be pasted.  The user can just press p and the contents of
> the unnamed register are pasted by default.
>
> I want to define a custom command where the user can put the optional ["x]
> in front of the mapping, and my command will work with the register that the
> user specified.
>
> If the user doesn't specify a register, then I'm going to use the unnamed
> register by default.
>
> Is there a way to create a mapping that accepts the optional ["x] in front
> of it?
>
> Thanks,
> --Nate

:h v:register


nn <Leader>a :<C-U>call MyPaste()<CR>

func! MyPaste()
   exec "normal!" v:count1. '"'.v:register. "p"
endfunc


And what is your command supposed to do?


Good question.  The command will take the contents of the specified register and paste it in a new line below the cursor.  Similar to the :pu command.

Thanks,
--Nate
 
--
Andy

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

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

Re: character "\n" in SendKeys() parameter

       :exe 'let var="abc\' . 'ndef"'

where the :execute command will put the \ and n together inside a double-quoted string which :let will then evaluate.

Depending on how the "sending" application represents strings, there may be an easier way of ensuring that the \n remains two characters until the :let command evaluates the double-quoted string.


Thanks, Tony. It works.
My initial solution was to create a predefined variable storing '\n' and then use that variable in the argument of SendKeys.
Your solution is cleaner.
Thank you.

Anna

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

Re: ctrl+J without adding a space

> That said, "ctrl+J"? Isn't that just a newline? On my keyboard, shift-J
> joins two lines, adding a space between them (and trimming any leading
> space that may have been on the line below).

Correct -- Either the OP has a mapping, or mis-typed
"shift+J"/"capital J" which does as described (joins with extra
whitespace.

:help J
:help gJ

I find that by the time I think about whether I want whitespace
added or not, typing the "g" is less overhead than remembering a
non-standard mapping, so I just use the stock J/gJ when joining.

As an aside, it can also be done as an Ex command, using either

:j
:j!

which can be nice in a global command like

:g/pattern/,+3j

to join every line matching /pattern/ with the following 3 lines.

-tim


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

Re: ctrl+J without adding a space

On Nov 30, 2009, at 2:17 PM, Dominique Pellé wrote:

> Peng Yu wrote:
>
>> I use ctrl+J to join two lines. However, there will always be a space
>> added between the two lines that are joined. I'm wondering how to
>> configure gvim not to add this extra space?
>
> See :help gJ

Thanks to this question and answer, my .vimrc just gained a new mapping:

map <D-j> gJ

(I'm on a Mac, so <D-j> is Command-j, which was previously unmapped.)

That said, "ctrl+J"? Isn't that just a newline? On my keyboard, shift-J
joins two lines, adding a space between them (and trimming any leading
space that may have been on the line below).

Dave

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

Re: ctrl+J without adding a space

Peng Yu wrote:

> I use ctrl+J to join two lines. However, there will always be a space
> added between the two lines that are joined. I'm wondering how to
> configure gvim not to add this extra space?

See :help gJ

-- Dominique

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

RE: vim and a different python

Kevin wrote:
> I use vim with python. I also use buildout, and sometimes,
> virtualenv. Is there a way to enable vim to use a different
> python without recompiling?

I do not think so. However, that's to have Vim use :py to run
Python commands. You can always use ! to filter text using any
external program.

John

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

ctrl+J without adding a space

I use ctrl+J to join two lines. However, there will always be a space
added between the two lines that are joined. I'm wondering how to
configure gvim not to add this extra space?

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

Re: How building a List from a textfile in vimscript

On 30 nov, 20:46, Christian Brabandt <cbli...@256bit.org> wrote:
> Hi epanda!
>
> On Mo, 30 Nov 2009, epanda wrote:
>
>
>
>
>
> > Hi,
>
> > I have a text file and it contains those lines
>
> > item1
> > item2
> > item3
>
> > I would like to read this file from a vimscript and feed a List with
> > all items read.
>
> > echo myList
>
> > ['item1','item2',''item3]
>
> echo getline(1,'$')
>
> You should read eval.txt and/or usr_41.txt, if you'd like to script
> within vim.
>
> regards,
> Christian
> --
> Math problems?  Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

Sorry, I have read it few months ago and didn't remind where in the
help I can convert text file to string.
It is native with readfile func. So Cool !

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

Re: How building a List from a textfile in vimscript

Hi epanda!

On Mo, 30 Nov 2009, epanda wrote:

> Hi,
>
> I have a text file and it contains those lines
>
> item1
> item2
> item3
>
>
> I would like to read this file from a vimscript and feed a List with
> all items read.
>
> echo myList
>
> ['item1','item2',''item3]
>

echo getline(1,'$')

You should read eval.txt and/or usr_41.txt, if you'd like to script
within vim.

regards,
Christian
--
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

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

How building a List from a textfile in vimscript

Hi,

I have a text file and it contains those lines

item1
item2
item3


I would like to read this file from a vimscript and feed a List with
all items read.

echo myList

['item1','item2',''item3]

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

Re: Set variable to shell command output

On 2009-11-30, Aarto Matti wrote:
> Hi,
>
> I need to set the output from the following command to a variable:
> date +%s
> It's a string of 10 digits.
>
> I tried
> let stamp = execute "!date +\%s"
> but apparently "execute" doesn't return anything, besides I can't escape "%"
> character which is treated as buffer name.

As sc wrote, strftime() is a better solution in this case. However,
for commands for which Vim does not have an internal equivalent, use
system(), e.g.,

let stamp = system("date +%s")

That will include the trailing newline in your stamp variable. If
that's undesirable, use this instead:

let stamp = substitute(system("date +%s"), '\n', '', '')

HTH,
Gary


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

Re: & xmledit

On 2009-11-29, Andy Wokula wrote:
> Tuo Pe schrieb:
> > --- On Fri, 11/27/09, Andy Wokula <anwoku@yahoo.de> wrote:
> >
> >> :let maplocalleader = ','
> >>
> >> is a setting for the vimrc: controlled by the user, constant
> >> throughout the session.
> >
> > So this means that I should use mapleader instead of maplocalleader?
> > And that I should set in in .vimrc, not in .vim/ftplugin/ files etc?
> >
> > Tuomas
>
> No, you should stay with maplocalleader, but just define it in the
> vimrc.
>
>
> g:mapleader -> <Leader>
> g:maplocalleader -> <LocalLeader>
>
> It is a convention that global plugins should define mappings with
> <Leader> and filetype plugins with <LocalLeader>.
>
> :h <Leader>
> :h <LocalLeader>

But what Tuo Pe wants to do is change the leader for only the XML
mappings. He doesn't want it constant throughout the session, at
least as I understood his original question.

It seems to me that, according to Vim's documentation, setting
maplocalleader any time before the mappings of xml.vim were defined
should have worked.

As an experiment, I created a file with the contents shown here:

map <LocalLeader>X :echo "hello X"<CR>
let maplocalleader = ","
map <LocalLeader>Y :echo "hello Y"<CR>
let maplocalleader = ""
map <LocalLeader>Z :echo "hello Z"<CR>

and sourced it. Both the ":map" command and trying the mappings
verified that the left-hand sides of the mappings were as expected:

\X
,Y
\Z

It worked for me; I wonder why it didn't work for Tuo Pe.

Regards,
Gary


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

Re: Set variable to shell command output

On Monday 30 November 2009 11:38:26 am Aarto Matti wrote:

> Hi,
>
> I need to set the output from the following command to a
> variable: date +%s
> It's a string of 10 digits.
>
> I tried
> let stamp = execute "!date +\%s"
> but apparently "execute" doesn't return anything, besides I
> can't escape "%" character which is treated as buffer name.
>

just wondering: would you still want to do that if you knew vim
supports its own strftime function?

:let td = strftime("%Y-%b-%d")

will give you a nice 11 character string in 'td', and you can
adjust to your preferences

why go out for milk when there's plenty in the fridge?

sc

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

Set variable to shell command output

Hi,

I need to set the output from the following command to a variable:
date +%s
It's a string of 10 digits.

I tried
let stamp = execute "!date +\%s"
but apparently "execute" doesn't return anything, besides I can't escape "%" character which is treated as buffer name.

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

Re: using a file as quickfix

On Nov 29, 7:14 am, Marc Chantreux <kha...@phear.org> wrote:
> hello,
>
> Given a file ERR with the following content, i would like to use this
> file as quickfix error list. So i tried:
>
> vim ERR
> :cfile %
> :setf python
>
> well ... it doesn't work. can anyone help ?
>

To get Vim to understand the format of the error messages, you need to
tell Vim what compiler generated the messages, or at least how to
parse them. If your compiler is one of those in the officially
distributed runtime (in the "compiler" directory) you can just use
the :compiler command prior to your :cfile command to do it for you.
Otherwise, you'll need to set the 'errorformat' option appropriately
by hand or by finding a plugin to do it for you.

Note that the :compiler command offers tab completion/wildmenu entries
of all the installed compilers.

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

Re: Need to know how to load script in Vim

On Nov 29, 3:36 am, satuon <sasho...@gmail.com> wrote:
> > you can get a complete list of all scripts currently sourced by
> > issuing the
>
> >     :scriptnames
>
> > command -- the command to load a script is
>
> >     :source <scriptname>
>
> Thanks, I used that and it showed me that pythoncomplete was loaded. But I
> still have only the default autocomplete when hit Ctrl+N/Ctrl+P. Ctrl+X just
> outputs this at the bottom of the screen:
> -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)
>

Since you have a script loaded that is supposed to give you
completion, you probably need to use CTRL-X CTRL-O or *possibly* CTRL-
X CTRL-U to use the script-based completion. CTRL-N and CTRL-P are
just the built-in completion.

Since CTRL-X CTRL-O can be inconvenient to type, it is easy to map
this to another easier key such as CTRL-<Spacebar>.

I have this in my .vimrc:

imap <C-Space> <C-X><C-O>

I actually have another (somewhat complicated) mapping for completion
that sets up the selection menu behavior to be more intuitive to me,
so I used imap rather than inoremap. inoremap may be better for you,
or you can check out the tip I based my other mappings on here:

http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE

A further note on the "autoload" directory. "autoload" is for scripts
that define functions in a special way, so that the functions are not
defined until they are actually used. "plugin" is the directory for
scripts that define things that should always be defined, or
"ftplugin" for scripts that define things that should always be
defined for certain file types.

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

Re: How to beautify/tablize some C code

On Nov 29, 11:38 pm, Robert Bu <robert...@gmail.com> wrote:
> Hi,
>
> For example, I have some C code:
> helloa;
> helloab;
> hellofgh;
>
> Is there a way to change the C code into the form, which looks like:
> helloa      ;
> helloab    ;
> hellofgh   ;
> Where the semicolon is at a "TAB" position. So that I can use
> block-insert to insert some code, such as:
> helloa     ("helloa    ");
> helloab   ("helloab ");
> hellofgh  ("hellofgh ");

You might have a look at Dr. Chip Campbell's Align plugin. It's very
handy for aligning all sorts of things...

Brett Stahlman

>
> Thanks in advance.

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

Re: Need help with folding - I'm confused

On Nov 29, 9:00 pm, Tim Chase <v...@tim.thechases.com> wrote:
>
> > 1. when I open the file - it is not folded by default
>
> I *think* that the 'foldlevelstart' option controls this,
> allowing you to set it to some ridiculously high number like 99.
>
>    :help 'foldlevelstart'
>

Yes, but there are some side-effects of this, such as rendering the zm
command useless until you first do zMzR.

See http://vim.wikia.com/wiki/All_folds_open_when_open_a_file

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

How to compile with guifont ?

Hello

I compiled vim on a debian server and installed in in my home folder (~/usr/local),
but the resulting executable can see no fonts when I press Tab on
   :set guifont=<Tab>
and the default font is looking too condensed. The Edit menu has no GUI Font entry.

I use ssh -Y to run gvim on my local desktop (with Ubuntu 9.10).

fc-list shows many, many
fonts installed (also locally in my home folder) on the server, and the desktop machine also
has a GUI desktop with all the fonts.

My :version is
:version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Nov 27 2009 14:45:34)
Compiled by adrianc@web3.storm.lan
Normal version with X11-Athena GUI.  Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv +cscope
+cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer +fork() -gettext
-hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse +mouseshape -mouse_dec
-mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile
 -python +quickfix +reltime -rightleft -ruby +scrollbind -signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo
+termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11
+xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/home/adrianc/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_ATHENA   -I/home/adrianc/usr/include -I/home/adrianc/usr/local/include -I/home/adrianc/usr/Trolltech/Qt-4.5.3/include -I
/home/adrianc/include  -I/home/adrianc/usr/local/include -I/home/adrianc/usr/Trolltech/Qt-4.5.3/include -I/home/adrianc/usr/local/include/gstreamer-0.10  -I/home/adrianc/usr/local
/include -I/home/adrianc/usr/Trolltech/Qt-4.5.3/include -I/home/adrianc/usr/local/include/gstreamer-0.10  -I/home/adrianc/usr/local/include -I/home/adrianc/usr/Trolltech/Qt-4.5.3/
include -I/home/adrianc/usr/local/include/gstreamer-0.10   -march=native -mtune=native -mmmx -msse -msse2 -msse3 -mcx16 -mfpmath=sse -O3 -march=native -mtune=native -mmmx -msse -m
sse2 -msse3 -mcx16 -mfpmath=sse -O3 -march=native -mtune=native -mmmx -msse -msse2 -msse3 -mcx16 -mfpmath=sse -O3
Linking: gcc   -L/home/adrianc/usr/local/lib -L/home/adrianc/usr/lib -L/home/adrianc/lib -L/home/adrianc/usr/Trolltech/Qt-4.5.3/lib -L/home/adrianc/usr/local/lib/gstreamer-0.10  -
L/home/adrianc/usr/local/lib -L/home/adrianc/usr/Trolltech/Qt-4.5.3/lib -L/home/adrianc/usr/local/lib/gstreamer-0.10  -L/home/adrianc/usr/local/lib -L/home/adrianc/usr/Trolltech/Q
t-4.5.3/lib -L/home/adrianc/usr/local/lib/gstreamer-0.10  -L/home/adrianc/usr/local/lib -L/home/adrianc/usr/Trolltech/Qt-4.5.3/lib -L/home/adrianc/usr/local/lib/gstreamer-0.10  -L
/usr/local/lib -o vim -lXaw -lXext -lm -lncurses -liconv
Press ENTER or type command to continue


Do you know what can I do to get fonts with my vim  ?

Thank you,
Adrian Constantin

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

syntax file bug, vim bug or feature ?

Hello !

I would like to fold catch block in php file.
In order to do that, i have define my own syntax file for php.
But fold become available only when i move the line contain the "catch"
keyword, with "dd" and "p", for example.
Fold became also available if i'm put the "catch" region at top level in
the syntax file, and not in a nextgroup.
Is it a bug in my syntax file or a vim's bug, or a feature ?
Extract of syntax file is here : http://pastebin.com/m57ef7d41
And php file is here : http://pastebin.com/m6a0e8c38

Best regards, Fred

--
========================================================================
Frédéric HARDY Responsable technique
No parking Email : fhardy@noparking.net
10 rue Stappaert URL : http://www.noparking.net
59000 Lille Tel : +33 (0)3 20 06 51 26
France Fax : +33 (0)3 20 63 92 21
========================================================================

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

Syntax file bug or vim bug ?

Hello !

I would like to fold catch block in php file.
In order to do that, i have define my own syntax file for php.
But fold become available only when i move the line contain the "catch"
keyword, with "dd" and "p", for example.
Fold became also available if i'm put the "catch" region at top level in
the syntax file, and not in a nextgroup.
Is it a bug in my syntax file or a vim's bug, or a feature ?
Extract of syntax file is here : http://pastebin.com/m57ef7d41
And php file is here : http://pastebin.com/m6a0e8c38

Best regards, Fred

--
========================================================================
Frédéric HARDY Responsable technique
No parking Email : fhardy@noparking.net
10 rue Stappaert URL : http://www.noparking.net
59000 Lille Tel : +33 (0)3 20 06 51 26
France Fax : +33 (0)3 20 63 92 21
========================================================================

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

vim and a different python

I use vim with python. I also use buildout, and sometimes,
virtualenv. Is there a way to enable vim to use a different python
without recompiling?

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

Re: Specify a register for a custom command

On Mon, November 30, 2009 9:56 am, Andy Wokula wrote:
> Christian Brabandt schrieb:
>> You need to expand <reg>, e.g. com! -register Foo :echo expand("<reg>")
>
> You were just guessing?

No, I thought this would work. And a simple test case seemed to work.

Oh well, sorry.

regards,
Christian

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

Re: Specify a register for a custom command

Nathan Neff schrieb:
> I'm looking to create a custom command / mapping where I can use the
> contents of a register that is specified by the user.
>
> Similar to how ["x]p works. The user can press "ap and the contents of the
> "a" register will be pasted. The user can just press p and the contents of
> the unnamed register are pasted by default.
>
> I want to define a custom command where the user can put the optional ["x]
> in front of the mapping, and my command will work with the register that the
> user specified.
>
> If the user doesn't specify a register, then I'm going to use the unnamed
> register by default.
>
> Is there a way to create a mapping that accepts the optional ["x] in front
> of it?
>
> Thanks,
> --Nate

:h v:register


nn <Leader>a :<C-U>call MyPaste()<CR>

func! MyPaste()
exec "normal!" v:count1. '"'.v:register. "p"
endfunc


And what is your command supposed to do?

--
Andy

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

Re: Specify a register for a custom command



On Mon, Nov 30, 2009 at 2:56 AM, Andy Wokula <anwoku@yahoo.de> wrote:
Christian Brabandt schrieb:
> Hi Nathan!
>
> On Mo, 30 Nov 2009, Nathan Neff wrote:
>
>> I see that there's a "-register" option that I can use when defining
>> a custom command, but I'm having trouble understanding how to use it.
>>
>> For example, I just want to create a command that prints out the contents of
>> a register that is specified by the user.
>>
>> I tried something like this, but can't print out the <reg> part:
>>
>> :command! -register Foo :echo You picked this register: <reg>
>>
>> What am I doing wrong?
>
> You need to expand <reg>, e.g. com! -register Foo :echo expand("<reg>")

You were just guessing?
   :Foo a
executes
   :echo expand("a")

Nathan, try these examples:
   :com! -register  Foo  echo 'Register:' <q-reg>
   :com! -register  Foo  display <reg>

   :h <q-args>

Thanks for the replies, but none of these examples do what I'm looking for.

I'm looking to create a custom command / mapping where I can use the contents of a register that is specified by the user.

Similar to how ["x]p works.  The user can press "ap and the contents of the "a" register will be pasted.  The user can just press p and the contents of the unnamed register are pasted by default.

I want to define a custom command where the user can put the optional ["x] in front of the mapping, and my command will work with the register that the user specified.

If the user doesn't specify a register, then I'm going to use the unnamed register by default.

Is there a way to create a mapping that accepts the optional ["x] in front of it?

Thanks,
--Nate

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

Re: Specify a register for a custom command

Christian Brabandt schrieb:
> Hi Nathan!
>
> On Mo, 30 Nov 2009, Nathan Neff wrote:
>
>> I see that there's a "-register" option that I can use when defining
>> a custom command, but I'm having trouble understanding how to use it.
>>
>> For example, I just want to create a command that prints out the contents of
>> a register that is specified by the user.
>>
>> I tried something like this, but can't print out the <reg> part:
>>
>> :command! -register Foo :echo You picked this register: <reg>
>>
>> What am I doing wrong?
>
> You need to expand <reg>, e.g. com! -register Foo :echo expand("<reg>")

You were just guessing?
:Foo a
executes
:echo expand("a")

Nathan, try these examples:
:com! -register Foo echo 'Register:' <q-reg>
:com! -register Foo display <reg>

:h <q-args>

--
Andy

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

Re: Delete weird paragraph (or "item" paragraph)

Saluton Tony :)

Tony Mechelynck <a...@gmail.com> skribis:
> On 28/10/09 11:36, Raúl Núñez de Arenas Coronado wrote:
>> I use Vim to store lists of items, like the one below:
>>
>> - This is a think I should do, or maybe buy - Feed my cat - Tell my
>> cat he is a naughty boy for having chewing up my most   expensive
>> headphones without having even considered the possibility of   eating
>> a cheaper pair (or none). - Write a message to vim_use to ask how to
>> delete items from lists like   this, where some of the items are
>> oneliners but others are clearly   not, and may or may not have a
>> final period - More items, this time an oneliner - Stop using
>> computers. NOW!
>>
>> The problem is that, sometimes I want to delete, cut or paste an
>> item. Deleting, cutting or pasting one-line items is very easy, just
>> dd or yy and p afterwards. The problem are the multiline items.
>
> Hi Raúl: As you can see, I'm still a month behind.

Don't worry, I understand perfectly. I've been almost a week far from
the computer and I have a ton of pending mail (including this!). Thanks
a lot for your reply :)

> However, have you thought of using ranges made of search patterns (for
> the ":y[ank]" and ":d[elete]" commands)?

I must confess that this is the first time I heard about ranges made of
search patterns O:) They're QUITE useful!

Thanks for the examples. I'll try to make much more use of them, they're
very useful. I don't know why I didn't discover them before!

Oh, and BTW, I saw your correction in your next message, thanks :)

--
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: How to beautify/tablize some C code

On Mon, Nov 30, 2009 at 12:38:01AM EST, Robert Bu wrote:
> Hi,
>
> For example, I have some C code:
> helloa;
> helloab;
> hellofgh;
>
> Is there a way to change the C code into the form, which looks like:
> helloa ;
> helloab ;
> hellofgh ;
> Where the semicolon is at a "TAB" position. So that I can use
> block-insert to insert some code, such as:
> helloa ("helloa ");
> helloab ("helloab ");
> hellofgh ("hellofgh ");

I would do something like:

1. Ctrl-V + movement to select block
2. hit $ to extend selection to end of line
3. type :s/;$/<Tab><Tab><Tab><Tab>;<Enter>

Note: <Tab> means you hit the tab key, and should display as ^I

You should see something like:

:'<,'>s/;$/^I^I^I^I^I; before you

Some of the ';' will probably be misaligned, but this shouldn't be a
problem if you just want to do some block-inserts, anyway (?).

CJ

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

Sunday, November 29, 2009

Re: Specify a register for a custom command

Hi Nathan!

On Mo, 30 Nov 2009, Nathan Neff wrote:

> I see that there's a "-register" option that I can use when defining
> a custom command, but I'm having trouble understanding how to use it.
>
> For example, I just want to create a command that prints out the contents of
> a register that is specified by the user.
>
> I tried something like this, but can't print out the <reg> part:
>
> :command! -register Foo :echo You picked this register: <reg>
>
> What am I doing wrong?

You need to expand <reg>, e.g. com! -register Foo :echo expand("<reg>")

regards,
Christian
--
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

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

Specify a register for a custom command

Hello,

I'd like to create a custom command where the user could specify
the register to use.

Like the ["x]p and ["x]P commands in Vim.

I see that there's a "-register" option that I can use when defining
a custom command, but I'm having trouble understanding how to use it.

For example, I just want to create a command that prints out the contents of a register that is specified by the user.

I tried something like this, but can't print out the <reg> part:

:command! -register Foo :echo You picked this register: <reg>

What am I doing wrong?

Thanks,
--Nate

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

Re: How to get the screen of the previous command that was executed?

Hi Joan!

On Mo, 16 Nov 2009, Joan Miquel Torres Rigo wrote:

> The best solution which I found is to select the query which I want to test
> (writting it if I am retriving data instead of testing) and then normally
> execute ':!psql <database>'.
>
> This replaces selected text by the result of the command but, if you want,
> you can restore the selection by undoing changes with 'u'. I did'nt found
> any way to avoid deletion of selected text yet.

Well you could write a wrapper (e.g. a shell script), that first outputs
the input, and afterwards processes the input with sql. That's no
generic solution and a little bit awkward.

regards,
Christian
--
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

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

How to beautify/tablize some C code

Hi,

For example, I have some C code:
helloa;
helloab;
hellofgh;

Is there a way to change the C code into the form, which looks like:
helloa ;
helloab ;
hellofgh ;
Where the semicolon is at a "TAB" position. So that I can use
block-insert to insert some code, such as:
helloa ("helloa ");
helloab ("helloab ");
hellofgh ("hellofgh ");

Thanks in advance.

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

RE: Why I keep receiving mails from this group?

Discard my mail I see VIM is the vim_use group. I unsubscribed now.
Thanks all!

-----Original Message-----
From: Ni, Ruiyu
Sent: Monday, November 30, 2009 1:22 PM
To: vim_use@googlegroups.com
Subject: RE: Why I keep receiving mails from this group?

But I cannot find the vim_use group?

-----Original Message-----
From: Reid Thompson [mailto:reid.thompson@ateb.com]
Sent: Monday, November 30, 2009 1:21 PM
To: vim_use@googlegroups.com
Subject: Re: Why I keep receiving mails from this group?

Ni, Ruiyu wrote:
while I don't know how to
> unsubscribe.
>
> Could anyone tell me how to remove me from the mailing list?
>
> Thanks a lot
>
> --
> You received this message from the "vim_use" maillist.
> For more information, visit http://www.vim.org/maillist.php
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sure, this link at the bottom of every email will tell you how

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

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

RE: Why I keep receiving mails from this group?

But I cannot find the vim_use group?

-----Original Message-----
From: Reid Thompson [mailto:reid.thompson@ateb.com]
Sent: Monday, November 30, 2009 1:21 PM
To: vim_use@googlegroups.com
Subject: Re: Why I keep receiving mails from this group?

Ni, Ruiyu wrote:
while I don't know how to
> unsubscribe.
>
> Could anyone tell me how to remove me from the mailing list?
>
> Thanks a lot
>
> --
> You received this message from the "vim_use" maillist.
> For more information, visit http://www.vim.org/maillist.php
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sure, this link at the bottom of every email will tell you how

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

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

Re: Why I keep receiving mails from this group?

Ni, Ruiyu wrote:
while I don't know how to
> unsubscribe.
>
> Could anyone tell me how to remove me from the mailing list?
>
> Thanks a lot
>
> --
> You received this message from the "vim_use" maillist.
> For more information, visit http://www.vim.org/maillist.php
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sure, this link at the bottom of every email will tell you how

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

Why I keep receiving mails from this group?

I know I am using VIM and may visit this group once before. But now it seems I am in the mailing list of this group while I don’t know how to unsubscribe.

Could anyone tell me how to remove me from the mailing list? No offense this group is a good source for my daily vim using but I just don’t want to receive so many mails.

 

Thanks a lot

Bug in User Manual

usr_02.txt:line 506
:help usr-toc.txt
should be
:help usr_toc.txt

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

Re: Need help with folding - I'm confused

> I don't want to have to do all that 'manual' effort, so I changed .vimrc to
> this:
> set foldmethod=syntax
> move cursor to an open '{' and type 'zc': "E490: No fold found"
> move cursor to an open '{' and type 'zf': "E350: Cannot create fold with
> current 'foldmethod'"

sounds like a peculiarity of the folding syntax definition.
Alternatively, if you're trying a top-level fold, there might not
actually be a fold there. You can view them more readily by
setting the fold-column width to something non-zero:

:set foldcolumn=3

to view them.

> 1. when I open the file - it is not folded by default

I *think* that the 'foldlevelstart' option controls this,
allowing you to set it to some ridiculously high number like 99.

:help 'foldlevelstart'

Or, if you want (per your later example), you can set it to 1 for
one level of indent.

> 2. I would like to be able to issue a command that folds everything at a
> certain 'depth'

You can manually set it to a certain depth with

:set foldlevel=3

(or whatever level you want), or you can use

zr
zm

to increase/decrease (respectively) the fold level from its
current count (though unfortunately these don't take a prefixed
count of levels to increase/decrease).

:help 'foldlevel'
:help zr
:help zm

> 3. I want vim to remember what lines were folded the last time I was editing
> the file
>
> I'm pretty sure I'm ok with #3 with these lines in .vimrc:
> au BufWinLeave ?* mkview
> au BufWinEnter ?* silent loadview

If that works, no need to mess with it :)

> for #2, here's what I'd like to be able to do:
>
> [php code - before folding]
> class Foo extends Bar
> {
> function __construct()
> {
> //stuff
> }
>
> function method1($arg1,$arg2)
> {
> //stuff
> }
> }
>
>
> do a folding command to collapse everything that's "1 deep"
> class Foo extends Bar
> {
> +--- 4 lines: function __construct()
>
> +--- 4 lines: function method1($arg1,$arg2)
> }

I think (with "let php_folding=1") setting foldlevel=1 will bring
it to this point. You can map this if you do it regularly

:nnoremap <f4> :set foldlevel=1<cr>

or

:nnoremap <f4> zMzr


-tim


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

Need help with folding - I'm confused

[disclaimer: I am still a vim novice]

When I've used Visual Studio, UltraEdit, Aptana, Eclipse, etc.. I've noticed 2 things:
1. The ability to fold code is noted in the line number column with a clickable "+" or "-" sign according to the fold status
2. I don't have to tell the IDE where folding is allowed (actually, I can define it with the wordfiles in Ultra Edit)

I've been trying to get code folding to work in Gvim (PHP code) and end up with these results:

Default behavior: manual folding (works as expected)
move cursor to an open '{' and type zf% to fold the code between the braces {}

I don't want to have to do all that 'manual' effort, so I changed .vimrc to this:
set foldmethod=syntax
move cursor to an open '{' and type 'zc': "E490: No fold found"
move cursor to an open '{' and type 'zf': "E350: Cannot create fold with current 'foldmethod'"

So, I made sure that php has folding enabled and added this to .vimrc:
let php_folding = 1
set foldmethod=syntax
when I open the PHP file - *everything* is folded by default now and I have to unfold before I can do anything else...

Here's what I'd like:
1. when I open the file - it is not folded by default
2. I would like to be able to issue a command that folds everything at a certain 'depth'
3. I want vim to remember what lines were folded the last time I was editing the file

I'm pretty sure I'm ok with #3 with these lines in .vimrc:
au BufWinLeave ?* mkview
au BufWinEnter ?* silent loadview

for #2, here's what I'd like to be able to do:

[php code - before folding]
class Foo extends Bar
{
    function __construct()
    {
         //stuff
    }

    function method1($arg1,$arg2)
    {
        //stuff
    }
}


do a folding command to collapse everything that's "1 deep"
class Foo extends Bar
{
+--- 4 lines: function __construct()

+--- 4 lines: function method1($arg1,$arg2)
}


Thanks in advance for pointing me in the right direction :)

Jon

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

Re: Compiling Vim for 64-bit Fedora Linux

On 11/29/2009 11:34 AM, Bram Moolenaar wrote:
>
> Michael Henry wrote:
>
>> I recently decided to try out 64-bit Linux with Fedora 12. When
>> I tried to compile Vim, the configure script couldn't locate the
>> Python "config" directory, which is necessary to successfully
>> compile with --enable-pythoninterp. This is because 64-bit
>> Fedora 12 puts the Python libraries beneath /usr/lib64 instead
>> of /usr/lib.

> Using python-config sounds like it's something that is the recommended
> way. I have no idea when this was introduced, we should fall back to the
> old method when it can't be found.
>
> You say the libs are below /usr/lib64, but the --libs output doesn't
> contain this. Does the compiler have a builtin path for this?

Yes, /usr/lib64 is in the default set of paths of gcc:

$ gcc -print-search-dirs # trimmed for email
install: /usr/lib/gcc/x86_64-redhat-linux/4.4.2/
[...]
libraries:
[...]
/lib/../lib64/
[...]
/usr/lib/../lib64/
[...]

I took a quick look at the source RPM for Vim on Fedora 12 to
see how the distro handles this problem. They've patched Vim's
configure script to search the "lib64" directory in addition to
"lib" and "share" as follows:

$ cat SOURCES/vim-7.1-lib64.patch
diff -up vim71/src/auto/configure.lib64 vim71/src/auto/configure
--- vim71/src/auto/configure.lib64 2008-07-23 12:36:17.000000000 +0200
+++ vim71/src/auto/configure 2008-07-23 12:37:04.000000000 +0200
@@ -4291,7 +4291,7 @@ else

vi_cv_path_python_conf=
for path in "${vi_cv_path_python_pfx}"
"${vi_cv_path_python_epfx}"; do
- for subdir in lib share; do
+ for subdir in lib64 lib share; do
d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
if test -d "$d" && test -f "$d/config.c"; then
vi_cv_path_python_conf="$d"
diff -up vim71/src/configure.in.lib64 vim71/src/configure.in
--- vim71/src/configure.in.lib64 2008-07-23 12:36:17.000000000 +0200
+++ vim71/src/configure.in 2008-07-23 12:36:17.000000000 +0200
@@ -634,7 +634,7 @@ if test "$enable_pythoninterp" = "yes";
[
vi_cv_path_python_conf=
for path in "${vi_cv_path_python_pfx}"
"${vi_cv_path_python_epfx}"; do
- for subdir in lib share; do
+ for subdir in lib64 lib share; do
d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
if test -d "$d" && test -f "$d/config.c"; then
vi_cv_path_python_conf="$d"

It seems like the Fedora team's patch to include lib64 in the
list of subdirectories might be the simplest fix, though the
python-config tool seems like the right idea when it's
available.

I also looked quickly to see how old python-config might be, but
I think it's new enough that you are right to want to fall back
to the old configuration logic.

Michael Henry

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

vim swap file format

G'day everyone,

I've been fruitlessly searching for documentation on the format of vim
swap files. Does anybody have a link for that? All I want is a way to
tell whether the swap file is for a file that's been modified. It
seems that most of the time, swap files for modified files start with
an uppercase 'U', but this isn't an entirely reliable indicator.

Thanks,
MS.

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

Re: Compiling Vim for 64-bit Fedora Linux

Michael Henry wrote:

> I recently decided to try out 64-bit Linux with Fedora 12. When
> I tried to compile Vim, the configure script couldn't locate the
> Python "config" directory, which is necessary to successfully
> compile with --enable-pythoninterp. This is because 64-bit
> Fedora 12 puts the Python libraries beneath /usr/lib64 instead
> of /usr/lib.
>
> I was able to work around the problem in two ways.
>
> First, based on clues from this posting to the mailing list:
> http://old.nabble.com/Trouble-compiling-vim-%2B-python-td21136985.html
>
> I added the following switch to the configure script:
>
> --with-python-config-dir=/usr/lib64/python2.6/config
>
> Since I didn't want to hard-code that path into my generic
> script for building Vim, I also tried the following symlink,
> which appeared to work as well:
>
> ln -s /usr/lib64/python2.6/config /usr/lib/python2.6/config
>
> Neither approach above seems quite smooth to me. I didn't drill
> down into the configure script very far, but I'm wondering if
> using Python's "python-config" tool would help ferret out the
> necessary configuration information. For example, on my system,
> I get the following output:
>
> $ python-config --prefix
> /usr
> $ python-config --includes
> -I/usr/include/python2.6 -I/usr/include/python2.6
> $ python-config --libs
> -lpthread -ldl -lutil -lm -lpython2.6
>
> The python-config tool comes in the python-devel package on
> Fedora. This package is required when building Vim using the
> --enable-pythoninterp switch anyway, and I imagine it's true
> in general that python-config would be available anywhere that
> the necessary Python development libraries were installed. In
> any event, the configure script could check for the presence of
> python-config and use that if found, falling back to the old
> method if not.

Using python-config sounds like it's something that is the recommended
way. I have no idea when this was introduced, we should fall back to the
old method when it can't be found.

You say the libs are below /usr/lib64, but the --libs output doesn't
contain this. Does the compiler have a builtin path for this?

--
I learned the customs and mannerisms of engineers by observing them, much the
way Jane Goodall learned about the great apes, but without the hassle of
grooming.
(Scott Adams - The Dilbert principle)

/// 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.
For more information, visit http://www.vim.org/maillist.php

groovy indent file?

Hi,

Does somebody know a groovy indent file? I found a thread from 1-2
years ago with no satisfying answer to a similar question. Has the
situation changed in the meantime?

Regards,
Tom

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

Compiling Vim for 64-bit Fedora Linux

All,

I recently decided to try out 64-bit Linux with Fedora 12. When
I tried to compile Vim, the configure script couldn't locate the
Python "config" directory, which is necessary to successfully
compile with --enable-pythoninterp. This is because 64-bit
Fedora 12 puts the Python libraries beneath /usr/lib64 instead
of /usr/lib.

I was able to work around the problem in two ways.

First, based on clues from this posting to the mailing list:
http://old.nabble.com/Trouble-compiling-vim-%2B-python-td21136985.html

I added the following switch to the configure script:

--with-python-config-dir=/usr/lib64/python2.6/config

Since I didn't want to hard-code that path into my generic
script for building Vim, I also tried the following symlink,
which appeared to work as well:

ln -s /usr/lib64/python2.6/config /usr/lib/python2.6/config

Neither approach above seems quite smooth to me. I didn't drill
down into the configure script very far, but I'm wondering if
using Python's "python-config" tool would help ferret out the
necessary configuration information. For example, on my system,
I get the following output:

$ python-config --prefix
/usr
$ python-config --includes
-I/usr/include/python2.6 -I/usr/include/python2.6
$ python-config --libs
-lpthread -ldl -lutil -lm -lpython2.6

The python-config tool comes in the python-devel package on
Fedora. This package is required when building Vim using the
--enable-pythoninterp switch anyway, and I imagine it's true
in general that python-config would be available anywhere that
the necessary Python development libraries were installed. In
any event, the configure script could check for the presence of
python-config and use that if found, falling back to the old
method if not.

Michael Henry

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

Detect func/method constructor and destrutor

Hi,

I got a little problem with my detect pattern for C++ constructor/
destructor methods and func

This is this :

^\(\w\+\s*\)\{0,10}\w\+\(::\~*\w\+\)\?[^(]\{0,10}(

It fails when I encounter spaces before constructor

constructor::constructor


destructor::destructor

Can you correct my pattern ?

Thanks

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

Re: Need to know how to load script in Vim

On 11/29/2009 06:18 AM, satuon wrote:
> On Nov 29, 4:43 am, Christian Brabandt <cbli...@256bit.org> wrote:
>
>> That means, vim is expecting a second <Ctrl-> Letter, to choose the
>> completion you want. There are several different ways of completion:
>>
>> 1. Whole lines |i_CTRL-X_CTRL-L|
>> 2. keywords in the current file |i_CTRL-X_CTRL-N|
>> 3. keywords in 'dictionary' |i_CTRL-X_CTRL-K|
>> 4. keywords in 'thesaurus', thesaurus-style |i_CTRL-X_CTRL-T|
>> 5. keywords in the current and included files |i_CTRL-X_CTRL-I|
>> 6. tags |i_CTRL-X_CTRL-]|
>> 7. file names |i_CTRL-X_CTRL-F|
>> 8. definitions or macros |i_CTRL-X_CTRL-D|
>> 9. Vim command-line |i_CTRL-X_CTRL-V|
>> 10. User defined completion |i_CTRL-X_CTRL-U|
>> 11. omni completion |i_CTRL-X_CTRL-O|
>> 12. Spelling suggestions |i_CTRL-X_s|
>> 13. keywords in 'complete' |i_CTRL-N|
>>
> I've tried some of them (tags seems the most promising), but they don't work
> quite as I extpected.
>

I generally use the omni-completion functionality, using the
pythoncomplete script from here:
http://www.vim.org/scripts/script.php?script_id=1542

I also update the syntax highlighting support for Vim by
installing this:
http://www.vim.org/scripts/script.php?script_id=790

I found some inspiration here as well:
http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/

Michael Henry

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

using a file as quickfix

hello,

Given a file ERR with the following content, i would like to use this
file as quickfix error list. So i tried:

vim ERR
:cfile %
:setf python

well ... it doesn't work. can anyone help ?

regards.

marc

ERR file:
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 236, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 188, in main
base.doTransaction()
File "/usr/share/yum-cli/cli.py", line 364, in doTransaction
if self.gpgsigcheck(downloadpkgs) != 0:
File "/usr/share/yum-cli/cli.py", line 464, in gpgsigcheck
self.getKeyForPackage(po, lambda x, y, z: self.userconfirm())
File "/var/lib/python-support/python2.5/yum/__init__.py", line 2571, in getKeyForPackage
misc.import_key_to_pubring(rawkey, po.repo.cachedir)
File "/var/lib/python-support/python2.5/yum/misc.py", line 278, in import_key_to_pubring
ctx = gpgme.Context()
AttributeError: 'module' object has no attribute 'Context'

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

Menu translation & wrong encoding in Windows 7

Hello,

I have submitted Slovenian Vim menu translation a while ago while I
was still using XP (and then didn't use Windows for ages; menu
translations don't work with Aqua Vim at all).

Now I tried it on Windows 7 and discovered that the language is set to
Slovenian_Slovenia.1250. That might be a bit weird. The native
encoding used to be cp1250 indeed, but it could be that Windows 7 now
tries to use utf-8 whenever possible ... but I don't really know.

The problem is that now I get translation
Pomoé (eacute)
instead of
Pomoč (ccaron)
for "Help". S and Z with caron are missing completely, so there's a
big bunch of wrong translations.

Does anyone have a hint how to solve this problem?

Thanks a lot,
Mojca

PS: I didn't try to modify any setting. I'm just using the defaults of
what gvim 7.2 for windows provides. I tried to rename files
afterwards, but with zero success.

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

Re: Need to know how to load script in Vim

On Nov 29, 4:43 am, Christian Brabandt <cbli...@256bit.org> wrote:
> That means, vim is expecting a second <Ctrl-> Letter, to choose the
> completion you want. There are several different ways of completion:
>
> 1. Whole lines |i_CTRL-X_CTRL-L|
> 2. keywords in the current file |i_CTRL-X_CTRL-N|
> 3. keywords in 'dictionary' |i_CTRL-X_CTRL-K|
> 4. keywords in 'thesaurus', thesaurus-style |i_CTRL-X_CTRL-T|
> 5. keywords in the current and included files |i_CTRL-X_CTRL-I|
> 6. tags |i_CTRL-X_CTRL-]|
> 7. file names |i_CTRL-X_CTRL-F|
> 8. definitions or macros |i_CTRL-X_CTRL-D|
> 9. Vim command-line |i_CTRL-X_CTRL-V|
> 10. User defined completion |i_CTRL-X_CTRL-U|
> 11. omni completion |i_CTRL-X_CTRL-O|
> 12. Spelling suggestions |i_CTRL-X_s|
> 13. keywords in 'complete' |i_CTRL-N|

I've tried some of them (tags seems the most promising), but they don't work
quite as I extpected.

I've programmed a lot in Visual-C++ and when I'm talking about
auto-completion I mean mostly things like the editor supplying a dropdown
list
of the member variables of a structure after you type foo-> for example,
or giving you
the names of the functions visible from the current file and the files it
includes, and the files
they include, etc.

I know how to use ctags to create tags file, and I can use it to parse
the standard headers for python, but even with tags, the auto-completion I
get
is not aware of the scope of variables/namespaces/classes

--
View this message in context: http://old.nabble.com/Need-to-know-how-to-load-script-in-Vim-tp26560003p26560492.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: Need to know how to load script in Vim

On Nov 29, 4:43 am, Christian Brabandt <cbli...@256bit.org> wrote:
> That means, vim is expecting a second <Ctrl-> Letter, to choose the
> completion you want. There are several different ways of completion:
>
> 1. Whole lines                                          |i_CTRL-X_CTRL-L|
> 2. keywords in the current file                         |i_CTRL-X_CTRL-N|
> 3. keywords in 'dictionary'                             |i_CTRL-X_CTRL-K|
> 4. keywords in 'thesaurus', thesaurus-style             |i_CTRL-X_CTRL-T|
> 5. keywords in the current and included files           |i_CTRL-X_CTRL-I|
> 6. tags                                                 |i_CTRL-X_CTRL-]|
> 7. file names                                           |i_CTRL-X_CTRL-F|
> 8. definitions or macros                                |i_CTRL-X_CTRL-D|
> 9. Vim command-line                                     |i_CTRL-X_CTRL-V|
> 10. User defined completion                             |i_CTRL-X_CTRL-U|
> 11. omni completion                                     |i_CTRL-X_CTRL-O|
> 12. Spelling suggestions                                |i_CTRL-X_s|
> 13. keywords in 'complete'                              |i_CTRL-N|

I've tried some of them (tags seems the most promising), but they
don't work quite as I extpected.

I've programmed a lot in Visual-C++ and when I'm talking about
auto-completion I mean mostly things like the editor supplying a
dropdown list
of the member variables of a structure after you type foo-> for
example, or giving you
the names of the functions visible from the current file and the files
it includes, and the files
they include, etc.

I know how to use ctags to create tags file, and I can use it to parse
the standard headers for python, but even with tags, the auto-
completion I get
is not aware of the scope of variables/namespaces/classes

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

Re: Need to know how to load script in Vim

On Nov 29, 4:43 am, Christian Brabandt <cbli...@256bit.org> wrote:
> > outputs this at the bottom of the screen:
> > -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)
>
> That means, vim is expecting a second <Ctrl-> Letter, to choose the
> completion you want. There are several different ways of completion:

How can I make it use an easier shortcut. Two ctrl-key combinations
for every auto completion will make it slower to use auto completion
that not :)

> 1. Whole lines                                          |i_CTRL-X_CTRL-L|
> 2. keywords in the current file                         |i_CTRL-X_CTRL-N|
> 3. keywords in 'dictionary'                             |i_CTRL-X_CTRL-K|
> 4. keywords in 'thesaurus', thesaurus-style             |i_CTRL-X_CTRL-T|
> 5. keywords in the current and included files           |i_CTRL-X_CTRL-I|
> 6. tags                                                 |i_CTRL-X_CTRL-]|
> 7. file names                                           |i_CTRL-X_CTRL-F|
> 8. definitions or macros                                |i_CTRL-X_CTRL-D|
> 9. Vim command-line                                     |i_CTRL-X_CTRL-V|
> 10. User defined completion                             |i_CTRL-X_CTRL-U|
> 11. omni completion                                     |i_CTRL-X_CTRL-O|
> 12. Spelling suggestions                                |i_CTRL-X_s|
> 13. keywords in 'complete'                              |i_CTRL-N|

Wow, that's a lot of auto-completions. Now which one of these gives
me
a Visual-C++-like intellisense for python :D

If there is a tutorial or a thread in some forum where this question
is answered,
please point me to it. Cause I've been searching the internet for
hours now
and I've found many sites with instructions, or vim scripts, etc. that
claim to
enable intellisense and even to "turn Vim into IDE" but I just can't
make any of them work. It's really frustrating.

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

Re: & xmledit

Tuo Pe schrieb:
> --- On Fri, 11/27/09, Andy Wokula <anwoku@yahoo.de> wrote:
>
>> :let maplocalleader = ','
>>
>> is a setting for the vimrc: controlled by the user, constant
>> throughout the session.
>
> So this means that I should use mapleader instead of maplocalleader?
> And that I should set in in .vimrc, not in .vim/ftplugin/ files etc?
>
> Tuomas

No, you should stay with maplocalleader, but just define it in the
vimrc.


g:mapleader -> <Leader>
g:maplocalleader -> <LocalLeader>

It is a convention that global plugins should define mappings with
<Leader> and filetype plugins with <LocalLeader>.

:h <Leader>
:h <LocalLeader>

--
Andy

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

Re: trouble with 'map :!gnome-terminal -e=python'

Gary Johnson wrote:

> map <F5> :!gnome-terminal -x python -i %<CR>

This did the trick! Thanks!

David

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

Re: & xmledit

--- On Fri, 11/27/09, Andy Wokula <anwoku@yahoo.de> wrote:

>     :let maplocalleader = ','
>
> is a setting for the vimrc: controlled by the user,
> constant throughout
> the session.

So this means that I should use mapleader instead of maplocalleader? And that I should set in in .vimrc, not in .vim/ftplugin/ files etc?

Tuomas


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

Re: Need to know how to load script in Vim

Hi satuon!

On So, 29 Nov 2009, satuon wrote:

>
> > you can get a complete list of all scripts currently sourced by
> > issuing the
> >
> > :scriptnames
> >
> > command -- the command to load a script is
> >
> > :source <scriptname>
>
> Thanks, I used that and it showed me that pythoncomplete was loaded. But I
> still have only the default autocomplete when hit Ctrl+N/Ctrl+P. Ctrl+X just
> outputs this at the bottom of the screen:
> -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)

That means, vim is expecting a second <Ctrl-> Letter, to choose the
completion you want. There are several different ways of completion:

1. Whole lines |i_CTRL-X_CTRL-L|
2. keywords in the current file |i_CTRL-X_CTRL-N|
3. keywords in 'dictionary' |i_CTRL-X_CTRL-K|
4. keywords in 'thesaurus', thesaurus-style |i_CTRL-X_CTRL-T|
5. keywords in the current and included files |i_CTRL-X_CTRL-I|
6. tags |i_CTRL-X_CTRL-]|
7. file names |i_CTRL-X_CTRL-F|
8. definitions or macros |i_CTRL-X_CTRL-D|
9. Vim command-line |i_CTRL-X_CTRL-V|
10. User defined completion |i_CTRL-X_CTRL-U|
11. omni completion |i_CTRL-X_CTRL-O|
12. Spelling suggestions |i_CTRL-X_s|
13. keywords in 'complete' |i_CTRL-N|

See :h ins-completion for the glory details on how to use each
completion.

regards,
Christian
--
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

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

Re: Need to know how to load script in Vim

> you can get a complete list of all scripts currently sourced by
> issuing the
>
> :scriptnames
>
> command -- the command to load a script is
>
> :source <scriptname>

Thanks, I used that and it showed me that pythoncomplete was loaded. But I
still have only the default autocomplete when hit Ctrl+N/Ctrl+P. Ctrl+X just
outputs this at the bottom of the screen:
-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)

> loaded -- there should be script specific documentation in your
> doc path to help out too -- try
>
> :help python<tab>

That gave me some results about syntax highlighting and indenting in python
but no autocomplete

So if the script is loaded, how do I go about activating it? I mean I still
can't get autocompletion for class members or standard functions in python.


--
View this message in context: http://old.nabble.com/Need-to-know-how-to-load-script-in-Vim-tp26560003p26560430.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: Need to know how to load script in Vim

On Sunday 29 November 2009 01:55:28 am satuon wrote:

> I've spent several hours now trying to configure Vim use
> autocompletion for python. The default omni-completion is
> nice but it only completes words that I've already typed.
>
> I'm trying to use this script
> /usr/share/vim/vim71/autoload/pythoncomplete.vim which comes
> with Vim However I don't know how to load it, or if it's
> already loaded - how to check that. Can anyone tell me how
> you load a script in Vim, i.e. is there a command like
>
> :load-script /usr/share/vim/vim71/autoload/pythoncomplete.vim
>
> or
>
> :check-if-script-is-already-loaded pythoncomplete.vim
>
> Does this autoload directory mean the script is already
> loaded?
>

it should be, yes

you can get a complete list of all scripts currently sourced by
issuing the

:scriptnames

command -- the command to load a script is

:source <scriptname>

but you won't need that if the python script is in your autoload
directory

see

:help autoload
:help autoload-functions

for information on how to call autoloaded functions -- if you can
successfully call a function in pythoncomplete, you'll know it's
loaded -- there should be script specific documentation in your
doc path to help out too -- try

:help python<tab>

for a list of python specific help that has been installed and
indexed -- just keep hitting the tab key til one you're
interested in is highlighted, then hit enter

hmmm -- that :help <subject><tab> trick works in vim 7.1 --
right?

sc

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

Saturday, November 28, 2009

Need to know how to load script in Vim

I've spent several hours now trying to configure Vim use autocompletion for
python. The default omni-completion is nice but it only completes words that
I've already typed.

I'm trying to use this script
/usr/share/vim/vim71/autoload/pythoncomplete.vim which comes with Vim
However I don't know how to load it, or if it's already loaded - how to
check that. Can anyone tell me how you load a script in Vim, i.e. is there a
command like

:load-script /usr/share/vim/vim71/autoload/pythoncomplete.vim
or
:check-if-script-is-already-loaded pythoncomplete.vim

Does this autoload directory mean the script is already loaded?

--
View this message in context: http://old.nabble.com/Need-to-know-how-to-load-script-in-Vim-tp26560003p26560003.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: Problem about the "browse" command

On 29/11/09 05:58, winterTTr wrote:
>
>
> On Sat, Nov 28, 2009 at 1:08 AM, Tony Mechelynck
> <antoine.mechelynck@gmail.com <mailto:antoine.mechelynck@gmail.com>> wrote:
>
> On 27/11/09 09:41, winterTTr wrote:
>
>
>
> On Fri, Nov 27, 2009 at 4:31 PM, Tony Mechelynck
> <antoine.mechelynck@gmail.com
> <mailto:antoine.mechelynck@gmail.com>
> <mailto:antoine.mechelynck@gmail.com
> <mailto:antoine.mechelynck@gmail.com>>> wrote:
>
> On 30/10/09 15:50, Ben Fritz wrote:
> >
> >
> >
> > On Oct 29, 8:49 pm, winterTTr<winterttr....@gmail.com
> <mailto:winterttr....@gmail.com>
> <mailto:winterttr....@gmail.com
> <mailto:winterttr....@gmail.com>>> wrote:
>
> >> There is a problem about the "browse" command for my gvim now.
> >> However, i can not find the reason for it.
> >>
> >> I remember that , when i run the command
> >> :browse w <filename>
> >> to a new buffer, there should be a dialog shown to let me select
> >> the file position for saving , but now the dialog does not
> show any
> >> more, it seems
> >> like that , i have never input the command . Nothing
> happens, and
> >> the command following the "browse" which is "w<filename>" for
> this case
> >> is not executed neither.
> >>
> >
> > I cannot reproduce, using the Vim 7.2.267 "Cream" build on
> Windows XP.
> > Does the same thing happen for you when running from the command
> > prompt with gvim -N -u NONE?
>
> Neither can I on Linux with gvim 7.2.309 for GTK2/Gnome2 GUI.
>
> WinterTTr, you _are_ giving a "real" filename aren't you,
> without the
> less-than and greater-than signs given in your message?
>
> When I do
> :browse w
> I see a save-as dialog with the directory and current
> filename filled-in
> as defaults, and when I do
> :browse w foobar
> the default filename is replaced by foobar
>
>
> I compile the new version ( 7.2.276 ) from svn not long ago,
> but the
> problem is
> also occurred now.
> I am using VIM on office WindowsXP and the same EXE file on Win7
> home.
> However, the same things happen, and i can not see the FileBrowser
> Dialog anymore.
>
> It is really inconvenient, but i don't know how to fix it.
> Does this thing just happen to me ?
>
>
> Well, have you tried, as Ben said, to start Vim from the command
> prompt as
>
> gvim -N -u NONE
>
> so that any "weird" settings in your vimrc don't make the waters
> murkier?
>
> If this works, then it must be something in your vimrc or in a
> nonstandard plugin. To know which, try either
>
> gvim -N -u NORC
>
> or
>
> gvim --noplugin
>
>
> Yes, I have tried to load the "clean" vim with command " gvim -N -u NORC"
> However, the thing goes as before.
>
> when i try to write the file with :browse w C:\1.bat
> There is nothing happed, even some kind of warning is not displayed.
>
> It is SO weird.
>
> I compile the vim using Mingw On Windows, not using nmake && cl in
> Visual Studio.
> And with the feather of python+ ( which is python 2.6 )
> Maybe there some mistake from the compile environment? I'm not sure.
>
> Maybe i could try to compile with namke && cl and try again.
>
> Anyway , thanks so much for your help :-)
>
>
>
> Best regards,
> Tony.
> --
> "But don't you worry, its for a cause -- feeding global corporations
> paws."
>
>

When I was on Windows, I used to compile with Cygwin (which generates a
native-Windows not-for-cygwin executable by means of the Cygwin version
of MinGW gcc): see
http://users.skynet.be/antoine.mechelynck/vim/compile.htm -- however,
you could use Steve Hall's precompiled "Vim without Cream" installer as
the "Vim" package from http://sourceforge.net/projects/cream/files/ (By
clicking "View all files" you have access to the "Release notes" which
are actually the ":version" output from the build in question). I see
that the latest distro there at the moment is at patchlevel 7.2.303
which is only 6 patches behind Bram's "latest"; and it supports Python
2.6 if the file "python26.dll" can be found in the $PATH at run-time.

Sometimes run-time errors can be erased so fast that you don't have time
to see them (try the ":messages" command to recall them).

Does it make a difference if you use ":browse w x.bat" (not starting
with a letter) or ":browse w x.txt" (with a non-executable extension)
instead of 1.bat ? I suppose not...

Oh, one thing I forgot to ask: your Vim build _is_ compiled with +browse
isn't it? If it isn't, the ":browse" prefix will be accepted as a no-op.


Best regards,
Tony.
--
Review Questions

(1) If Nerd on the planet Nutley starts out in his spaceship at 20 KPH,
and his speed doubles every 3.2 seconds, how long will it be before
he exceeds the speed of light? How long will it be before the
Galactic Patrol picks up the pieces of his spaceship?

(2) If Roger Rowdy wrecks his car every week, and each week he breaks
twice as many bones as before, how long will it be before he breaks
every bone in his body? How long will it be before they cut off
his insurance? Where does he get a new car every week?

(3) If Johnson drinks one beer the first hour (slow start), four beers
the next hour, nine beers the next, etc., and stacks the cans in a
pyramid, how soon will Johnson's pyramid be larger than King
Tut's? When will it fall on him? Will he notice?

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