Launching browser problem(gvim/win32)

2009-07-14 Thread justbegin

The file's Chinese character directory can't be identified correctly,so the
browser or explorer can't locate it. It works  if the file's path is all
English character.Could we solve it??

My definition:

map lt;leadergt;f :updatelt;CRgt;:silent !start X:\browser.exe
file://%:plt;CRgt;
map lt;leadergt;i :updatelt;CRgt;: !start X:\browser.exe
lt;cWORDgt;lt;CRgt;




nnoremap lt;silentgt; lt;C-F5gt; :if expand(%:p:h) !=
lt;CRgt;:!start explorer.exe %:p:hlt;CRgt;:endiflt;CRgt;lt;CRgt; 

-- 
View this message in context: 
http://www.nabble.com/Launching-browser-problem%28gvim-win32%29-tp24473019p24473019.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: Vim run error on Solaris 10

2009-07-14 Thread Sapfeer

Thanks a lot all! Actually, I've done it just by issuing clre -c
/var/ld/ld.config -l /lib:/usr/lib:/usr/sfw/lib:/usr/local/lib. I
suppose it's just added needed libraries directories so that vim is
able to find it

Thanks a lot all!!!

On 7/13/09, Tony Mechelynck antoine.mechely...@gmail.com wrote:

 On 13/07/09 09:23, Sapfeer wrote:

 Hi

 I've installed gtk+, ncurses, then install vim on my Solaris 10 x86,
 but when I try to run it, I get the following error:

 ld.so.1: vim: fatal: libgtk-1.2.so.0: open failed: No such file or
 directory
 Killed

 How can I fix this issues?..

 Did you compile Vim yourself? Was there a configure run (as part of the
 make run or as a separate make config)? Was there anything about gtk
 in the configure log?

 And, yes, which version of GTK did you install? When compiling (and even
 running) Vim, GTK1 (gtk 1.x) and GTK2 (gtk 2.x) are very different.
 Since GTK1 isn't supported anymore, I recommend compiling with GTK2
 (and, if you want Gnome2 too, you need an additional
 --enable-gnome-check configure switch).

 See my Unix/Linux HowTo
 http://users.skynet.be/antoine.mechelynck/vim/compunix.htm -- the top
 paragraph may be slightly different on Solaris but I believe most of the
 page applies without much changes. In particular, I think the script
 which I use to set my configure arguments can be reused with almost no
 changes (other than the compiled by line, of course) on practically
 any Unix-like system.


 Best regards,
 Tony.
 --
 If the aborigine drafted an IQ test, all of Western civilization would
 presumably flunk it.
   -- Stanley Garn

 


-- 
Sent from my mobile device

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



Re: What's missing to get OLE support in Eclipse?

2009-07-14 Thread Anton Sharonov

On 12/07/09 22:40, Chaim 'Tinjaw' Krause wrote:

 It appears that the community is almost there in terms of getting gVim
 to work with Eclipse, but I can't seem to find the magic formula to
 get things working.

To get vim running within eclipse, you can try eclim:

http://eclim.sourceforge.net/

I personally use it according the scenario 2 from the project web page
(headed Eclipse running eclim server). For you it seems to be most
appropriate scenario 3 (embed gvim into headed Eclipse running eclim
server).

-- 
Anton

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



vim on ARM

2009-07-14 Thread meino . cramer

Hi,

I will (try to) cross-compile vim for my CentiPad.
CanriPad is a AT91RM9200-Atmel microcontroller computer
in hand-size. It runs linux. I will try to cross as
less as possible additionl stuff and libs for it,
so that the build image does not get too bloated.
BUT I will try to put as much features in vim as possible.

Does anyone has any additional experience/hints/tips/links etc.
for me, before I possibly start to invent the wheel a seventh time ?
;)

Thank you very much for any help in advance!
Kind regards,
Meino Cramer





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



Re: vim on ARM

2009-07-14 Thread Dominique Pellé

Meino cra...@gmx.de wrote:

 Hi,

 I will (try to) cross-compile vim for my CentiPad.
 CanriPad is a AT91RM9200-Atmel microcontroller computer
 in hand-size. It runs linux. I will try to cross as
 less as possible additionl stuff and libs for it,
 so that the build image does not get too bloated.
 BUT I will try to put as much features in vim as possible.

 Does anyone has any additional experience/hints/tips/links etc.
 for me, before I possibly start to invent the wheel a seventh time ?
    ;)

 Thank you very much for any help in advance!
 Kind regards,
 Meino Cramer


One way to build  use Vim for ARM would be
to use QEMU, which can emulate an ARM machine
on x86.  I've never used it myself yet, but I thought
of using it to test Vim on ARM, even if I don't have
an ARM machine.

Google search for QEMU, ARM for more information.

Regards
-- Dominique

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



Re: vim on ARM

2009-07-14 Thread meino . cramer

Dominique Pellé dominique.pe...@gmail.com [09-07-14 11:21]:
 
 Meino cra...@gmx.de wrote:
 
  Hi,
 
  I will (try to) cross-compile vim for my CentiPad.
  CanriPad is a AT91RM9200-Atmel microcontroller computer
  in hand-size. It runs linux. I will try to cross as
  less as possible additionl stuff and libs for it,
  so that the build image does not get too bloated.
  BUT I will try to put as much features in vim as possible.
 
  Does anyone has any additional experience/hints/tips/links etc.
  for me, before I possibly start to invent the wheel a seventh time ?
     ;)
 
  Thank you very much for any help in advance!
  Kind regards,
  Meino Cramer
 
 
 One way to build  use Vim for ARM would be
 to use QEMU, which can emulate an ARM machine
 on x86.  I've never used it myself yet, but I thought
 of using it to test Vim on ARM, even if I don't have
 an ARM machine.
 
 Google search for QEMU, ARM for more information.
 
 Regards
 -- Dominique
 
 
Hi Dominique,

thank you for your fast response.

My problem isn't the lack to run a crosscompiled vim since
I have my CentiPad (as described in my initial posting) -- my 
problem is how to crosscompile vim with as less size as possible 
and with as much features as possible.
QUEMU is only a emulator which tries to run (not compile) architecture
foreign executables.
Why to exchange my real CentiPad with an emulator?

Kind regards,
Meino Cramer


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



Re: Launching browser problem(gvim/win32)

2009-07-14 Thread Bram Moolenaar


sunhuanzxc wrote:

 The file's Chinese character directory can't be identified correctly,so the
 browser or explorer can't locate it. It works  if the file's path is all
 English character.Could we solve it??
 
 My definition:
 
 map leaderf :updateCR:silent !start X:\browser.exe file://%:pCR
 map leaderi :updateCR: !start X:\browser.exe cWORDCR
 
 nnoremap silent C-F5 :if expand(%:p:h) != CR:!start explorer.exe 
 %:p:hCR:endifCRCR 

Arguments for command line commands need to be escaped.  shellescape()
usually works for this.

-- 
From know your smileys:
 :}  You lie like Pinocchio

 /// Bram Moolenaar -- b...@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
-~--~~~~--~~--~--~---



vim and windows vista

2009-07-14 Thread Nicolas Aggelidis

hi vimmers!

i am interested in testing windows 7, so i am wondering if vim is
compatible with them...


best regards,
nicolas

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



Re: vim on ARM

2009-07-14 Thread Tim Chase

 I will (try to) cross-compile vim for my CentiPad.
 CanriPad is a AT91RM9200-Atmel microcontroller computer
 in hand-size. It runs linux. I will try to cross as
 less as possible additionl stuff and libs for it,
 so that the build image does not get too bloated.
 BUT I will try to put as much features in vim as possible.


I think the biggest tip would be to take a look at what features 
you use least/most and exclude/include them.  Using vim 
--version from the command-line or :ver within Vim, you can 
see the multitude of knobs that you can twiddle.  For me, I know 
I'd exclude all the embedded interpreters  (Python, Ruby, Perl, 
Scheme, etc), any international stuff (-arabic -rightleft 
-gettext -farsi -inconv -hangul_input -keymap -langmap 
-multi_byte* and perhaps -digraphs), mouse stuff, balloon 
evaluation, -signs, -profile, -cryptv, -cscope, -emacs_tags, 
-float, and if it won't have a GUI, exclude all the GUI stuff 
(clipboard, dialog_gui, GUI_*, etc).  If my environment supports 
its own terminals, I'd exclude builtin_terms too.  Additionally, 
I don't use printing/hardcopy much (only on my Win32 machine at 
work), so I'd skip those too.

You can get a good idea at

   :help +feature-list

as there's a key that tells you whether items are (T)iny, 
(S)mall, (N)ormal, (B)ig, or (H)uge.  If you want to cut fat, 
attack the Big/Huge items first.  Most of my list came from issuing

   :help +feature-list
   :set hls
   :/^[NH].*

to highlight the biggest offenders.  You can also comb through 
the list for other things you just don't care about and nuke them 
as well.

-tim





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



Re: Launching browser problem(gvim/win32)

2009-07-14 Thread justbegin



Bram Moolenaar wrote:
 
 
 
 sunhuanzxc wrote:
 
 The file's Chinese character directory can't be identified correctly,so
 the
 browser or explorer can't locate it. It works  if the file's path is all
 English character.Could we solve it??
 
 My definition:
 
 map leaderf :updateCR:silent !start X:\browser.exe file://%:pCR
 map leaderi :updateCR: !start X:\browser.exe cWORDCR
 
 nnoremap silent C-F5 :if expand(%:p:h) != CR:!start
 explorer.exe %:p:hCR:endifCRCR 
 
 Arguments for command line commands need to be escaped.  shellescape()
 usually works for this.
 
 -- 
 From know your smileys:
  :}  You lie like Pinocchio
 
  /// Bram Moolenaar -- b...@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   
 ///
 
  
 
 

I think shellescape() will helps , I tried many times ,but-_||,could you
show me the completed codes?
-- 
View this message in context: 
http://www.nabble.com/Launching-browser-problem%28gvim-win32%29-tp24473019p24477958.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: What's missing to get OLE support in Eclipse?

2009-07-14 Thread Chaim 'Tinjaw' Krause

Thank you. It appears to register properly, however I still can't get
gVim to open in-place in WordPad. Maybe I am not understanding how
things are supposed to work, but I *thought* that gVim would act as an
in-place editor if registered as a OLE server. Maybe I should look
into contacting the developers who wrote the OLE portions of the code.
Any ideas?

On Jul 13, 11:56 am, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 12/07/09 22:40, Chaim 'Tinjaw' Krause wrote:

  It appears that the community is almost there in terms of getting gVim
  to work with Eclipse, but I can't seem to find the magic formula to
  get things working.

  Here is my current setup:
  * Windows Vista SP2
  * Eclipse Version: 3.4.2 Build id: M20090211-1700
  * gVim version 7.2

  I have the OLE version installed. (Help | Version confirms this.)

  However, it appears that it is not properly registered for OLE use. I
  have tested this by running WordPad and choosing to Insert | Object,
  but there is nothing there related to gVim for the Object Type.

 [...]

 To register Vim for OLE use, run it as

         gvim -register

 The install process ought to have done that, but since you're running on
 Vista, maybe it hadn't got the right privileges. RUNNING FROM AN
 ADMINISTRATOR LOGIN IS NOT ENOUGH. You must, *in addition*, request
 admin privileges (for the Dos Box where you'll be typing gvim
 -register, I suppose) *before* you do this registration, and as a
 distinct step.

 Also, if you're running 32-bit Vim on a 64-bit Vista, you might have to
 intervene manually in addition to this, but I'm not sure whether or how.

 I don't use Vista myself, but I've read this on other mutual-help
 newsgroup as the answer to some questions told by Vista users. So be
 careful: this is all hearsay, I've tested none of it myself (except the
 -register switch, which already worked on XP).

 For the Vim side of it, see

         :help -register

 Best regards,
 Tony.
 --
 If you live to the age of a hundred you have it made because very few
 people die past the age of a hundred.
                 -- George Burns
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: What's missing to get OLE support in Eclipse?

2009-07-14 Thread Chaim 'Tinjaw' Krause

I had forgotten about eclim. It has been quite a long time since I
last looked at the project. I will spend some time revisiting it.

On Jul 14, 2:41 am, Anton Sharonov anton.sharo...@gmail.com wrote:
 On 12/07/09 22:40, Chaim 'Tinjaw' Krause wrote:



  It appears that the community is almost there in terms of getting gVim
  to work with Eclipse, but I can't seem to find the magic formula to
  get things working.

 To get vim running within eclipse, you can try eclim:

 http://eclim.sourceforge.net/

 I personally use it according the scenario 2 from the project web page
 (headed Eclipse running eclim server). For you it seems to be most
 appropriate scenario 3 (embed gvim into headed Eclipse running eclim
 server).

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



Re: What's missing to get OLE support in Eclipse?

2009-07-14 Thread Chaim 'Tinjaw' Krause

After further investigation, I think the problem may be more
complicated then I thought. As I can get Paint to work in WordPad as
an in-place editor, I tried opening Paint as an in-place editor in
Eclipse and got the same errors about there being no registered OLE
editor. I am off to find an example on the web of using *any* program
as an in-place editor in Eclipse on Windows.
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: What's missing to get OLE support in Eclipse?

2009-07-14 Thread bill lam

On Tue, 14 Jul 2009, Chaim 'Tinjaw' Krause wrote:
 
 After further investigation, I think the problem may be more
 complicated then I thought. As I can get Paint to work in WordPad as
 an in-place editor, I tried opening Paint as an in-place editor in
 Eclipse and got the same errors about there being no registered OLE
 editor. I am off to find an example on the web of using *any* program
 as an in-place editor in Eclipse on Windows.

afaics not all ole servers support in place activation because that
need to implement extra interface to work with the container and
delegate menu bar to the containing program.  You may try ms word
itself to see it that work or not.

-- 
regards,

GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

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



Re: storing files without a name

2009-07-14 Thread Ben Fritz



On Jul 13, 11:57 pm, Tony Mechelynck antoine.mechely...@gmail.com
wrote:

 :help mkdir()
 says not available on all systems; and the description uses Unix
 protection bits (as in numeric arguments to chmod). I suspect it doesn't
 work on Windows, or not the same way. Windows has mkdir (make
 directory, synonymous to md) in command.com or cmd.exe but AFAIK it
 hasn't got mkdir -p.


It does work on Windows. I've used it before without the p and just
tried it with the p and it seems to work. That being said...does
Vim's mkdir() return a status indicating success/fail? If not, the
script would need to find a new way to determine that.
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: What's missing to get OLE support in Eclipse?

2009-07-14 Thread Chaim 'Tinjaw' Krause

Good suggestion. I am able to use Microsoft Word 2008 as an in-place
editor in Eclipse 3.4. So we now know it is possible to use one if
everything is correctly configured and supported.

On Jul 14, 8:52 am, bill lam cbill@gmail.com wrote:
 You may try ms word itself to see it that work or not.
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Java stacktrace highlighting

2009-07-14 Thread Nathan Neff

Hello,

I'd like to see if there's any scripts/syntax files for highlighting
stack traces, and underlining files in the stacktrace in blue or
something similar.

This would make it easy to see where I can jump to, to debug errors.

For example, in Grails (A web-framework built on Java) you can run tests,
and the test output will look like this:

java.lang.NullPointerException
at 
org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:178)
at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:477)
at BookTests.testSomething(BookTests.groovy:6)
at 
org.codehaus.groovy.grails.support.GrailsTestSuite.runTest(GrailsTestSuite.java:72)

I'd like for the BookTests.groovy:6 to be highlighted.

This seems like a pretty standard format, so I was wondering if
there's already a
filetype or syntax that's defined for highlighting stack traces.

I checked out the vjde.vim script, but it seemed to be more focused on
editing code
and refactoring.

Are there any syntax files defined for these stack traces?

Thanks,
--Nate

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



Re: Errors from commands being imported more than once when opening multiple files

2009-07-14 Thread wormwood_3
I had ! on the functions, but not on the commands. Adding the latter removed 
the errors.

Regarding per-buffer function definitions: Can anyone point me to the 
applicable part of the docs describing how to specify this option? Didn't see 
anything applicable with :help command or :help function.

Thanks,
Sam

 ___
Samuel Huckins


Homepage - http://samuelhuckins.com
Tech blog - http://dancingpenguinsoflight.com/
Photos - http://www.flickr.com/photos/samuelhuckins/
Twitter - http://twitter.com/shuckins
AIM - samushack | Gtalk - samushack | Skype - shuckins





From: Ben Fritz fritzophre...@gmail.com
To: vim_use vim_use@googlegroups.com
Sent: Monday, July 13, 2009 10:37:22 PM
Subject: Re: Errors from commands being imported more than once when opening  
multiple files




On Jul 13, 7:30 pm, wormwood_3 wormwoo...@yahoo.com wrote:
 Greetings noble vim users!

 In .vim/ftplugin/python.vim, I have a number of Python related 
 configurations...

 command Pyflakes :call Pyflakes()
 function! Pyflakes()
   ...
 endfunction

 The problem is that when I call vim opening multiple Python files, as soon as 
 the first is opened and the others start to open I get errors like:

 Error detected while processing /home/sam/.vim/ftplugin/python.vim:
 line   24:
 E174: Command already exists: add ! to replace it
 line   31:
 E122: Function Pyflakes already exists, add ! to replace it
 line   33:

 ...
 So it seems that all the applicable config is loaded per file sent to vim, 
 and after the first is loaded the above functions are already in place. Is 
 there a different way to define custom commands to get around this issue? It 
 doesn't affect the functionality, it's just an annoyance to wait for the 
 errors to disappear, especially when opening a number of files. And I'm also 
 wondering if I'm doing something wrong.


The easiest way, for functions, would be to define them with a ! as
you show in your example. Are you sure the ! occurs in all the
functions in your file?

For commands, you could do the same (use command! instead of command)
or you can pass it the -buffer argument to only define the command
on a per-buffer basis. The latter is probably better anyway, as you
don't need to be able to use the command in an xml file you open, for
example.

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



Re: vim and windows 7

2009-07-14 Thread George V. Reilly

[Changed Subject line]

On Tue, Jul 14, 2009 at 3:04 AM, Nicolas Aggelidis
n.aggeli...@gmail.com wrote:
 i am interested in testing windows 7, so i am wondering if vim is
 compatible with them...

I've been running Vim on the 64-bit version of Windows 7 for the last
few weeks without any problems. Feels just like it did on Vista, XP,
Server 2003, etc.

The only thing that needs changing is that there should be a 64x64
icon, as the scaled-up 32x32 icon looks ugly.
--
/George V. Reilly  geo...@reilly.org
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

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



Re: storing files without a name

2009-07-14 Thread Деян Дойчев

Ben Fritz wrote:

 On Jul 13, 11:57 pm, Tony Mechelynck antoine.mechely...@gmail.com
 wrote:
   
 :help mkdir()
 says not available on all systems; and the description uses Unix
 protection bits (as in numeric arguments to chmod). I suspect it doesn't
 work on Windows, or not the same way. Windows has mkdir (make
 directory, synonymous to md) in command.com or cmd.exe but AFAIK it
 hasn't got mkdir -p.

 

 It does work on Windows. I've used it before without the p and just
 tried it with the p and it seems to work. That being said...does
 Vim's mkdir() return a status indicating success/fail? If not, the
 script would need to find a new way to determine that.
 

   
Wasn't cygwin required to install vim on windows? It provides mkdir.

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



Re: Errors from commands being imported more than once when opening multiple files

2009-07-14 Thread Ben Fritz



On Jul 14, 10:28 am, wormwood_3 wormwoo...@yahoo.com wrote:
 I had ! on the functions, but not on the commands. Adding the latter 
 removed the errors.

 Regarding per-buffer function definitions: Can anyone point me to the 
 applicable part of the docs describing how to specify this option? Didn't see 
 anything applicable with :help command or :help function.


Functions aren't per-buffer AFAIK, but see :help :command-buffer for
commands.
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: Errors from commands being imported more than once when opening multiple files

2009-07-14 Thread Charles Campbell

Ben Fritz wrote:

 On Jul 14, 10:28 am, wormwood_3 wormwoo...@yahoo.com wrote:
   
 I had ! on the functions, but not on the commands. Adding the latter 
 removed the errors.

 Regarding per-buffer function definitions: Can anyone point me to the 
 applicable part of the docs describing how to specify this option? Didn't 
 see anything applicable with :help command or :help function.

 

 Functions aren't per-buffer AFAIK, but see :help :command-buffer for
 commands.
   
Functions may be made accessible only to the script that they're defined 
in.  See  :help local-function  .

Regards,
Chip Campbell


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



Re: vim and windows 7

2009-07-14 Thread Nicolas Aggelidis

On Tue, Jul 14, 2009 at 7:14 PM, George V. Reillygeo...@reilly.org wrote:

 [Changed Subject line]

 I've been running Vim on the 64-bit version of Windows 7 for the last
 few weeks without any problems. Feels just like it did on Vista, XP,
 Server 2003, etc.

 The only thing that needs changing is that there should be a 64x64
 icon, as the scaled-up 32x32 icon looks ugly.
 --
 /George V. Reilly  geo...@reilly.org

thank you george!

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



Re: storing files without a name

2009-07-14 Thread Ben Fritz


 Wasn't cygwin required to install vim on windows? It provides mkdir.- Hide 
 quoted text -


No, there are plenty of native Windows binaries out there that you can
just install.

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



Re: Errors from commands being imported more than once when opening multiple files

2009-07-14 Thread Ben Fritz



On Jul 14, 12:10 pm, Charles Campbell charles.e.campb...@nasa.gov
wrote:
 Functions may be made accessible only to the script that they're defined
 in.  See  :help local-function  .


Right, but that's not going to avoid errors for multiple definitions
due to sourcing the same script multiple times, in this example
because the function is inside a ftplugin and multiple files are
loaded.

Either use ! as you have, or check for the function's existence before
defining it, like this:

if !exists(*Foo)
  function Foo()
...
  endfunction
endif

(substitute s:Foo instead of just Foo to use the local functions Dr.
Chip is referring to)
--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: Regex help for huge csv file

2009-07-14 Thread Blake M. Sisco
John,
Sorry about that.  Here's a set of examples

Before:
*,WIRE HARNESS,
,20403,16
,FIBERGLASS,
,100 FOOT,
,20400,7
,FIBERGLASS,
,250 FOOT SPOOL,
,WX12-0,35
,WX14-1BR/YLW,160
,YELLOW STRIPE,
,87K 7267,16
,SINGLE TWISTED PAIR SHIELDED,
,WITH DRAIN,
,32206,5
,RING NON INS.,
,DT06-3S,4
,W3S,2
,ORANGE,
,W3S-P012,2
,GREEN,
,DT06-2S,2*

After:
*WIRE HARNESS,,
,20403,16
,20400,7
,WX12-0,35
,WX14-1BR/YLW,160
,87K 7267,16
,32206,5
,DT06-3S,4
,W3S,2
,W3S-P012,2
,DT06-2S,2*

I'll take a look at that script later today.

Thanks for the response,

Cheers,

Blake M. Sisco
LOR Manufacturing Co., Inc
Web Presence • Graphic Design
www.lormfg.com
(866) 644-8622
(888) 524-6292 FAX

The information transmitted by Blake Sisco herewith is intended only for the
person or entity to which it is addressed and may contain confidential
and/or privileged material.  Any review, retransmission, dissemination or
other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited.  If you
received this in error, please contact the sender and delete the material
from any computer



On Mon, Jul 13, 2009 at 7:06 PM, John Beckett johnb.beck...@gmail.comwrote:


 bsisco wrote:
  Here's my problem.  I have a csv file that has just over 21k lines.
  It's basically a bom list for some of our products.  It contains:
  -Product P/N
  |--Component P/N, Component QTY
  |--Misc. info that is not needed

 It's too hard to decode your example. A simpler 'before and
 after' example (using short fields) would help.

 Meanwhile, there is a sensational script that can probably help,
 although you would want to give the results a careful check:

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

 John


 


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



Re: storing files without a name

2009-07-14 Thread Matt Wozniski

On Tue, Jul 14, 2009 at 10:12 AM, Ben Fritz wrote:



 On Jul 13, 11:57 pm, Tony Mechelynck wrote:

 :help mkdir()
 says not available on all systems; and the description uses Unix
 protection bits (as in numeric arguments to chmod). I suspect it doesn't
 work on Windows, or not the same way. Windows has mkdir (make
 directory, synonymous to md) in command.com or cmd.exe but AFAIK it
 hasn't got mkdir -p.


 It does work on Windows. I've used it before without the p and just
 tried it with the p and it seems to work.

Yeah, it definitely works properly on at least windows, linux, and OS X.

 That being said...does
 Vim's mkdir() return a status indicating success/fail? If not, the
 script would need to find a new way to determine that.

No, but the script can determine that with getftype().

~Matt

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



BufEnter event

2009-07-14 Thread Roman Khlystik

Hi guys!
I trying write script which will be react to switching between
buffers.
Code from my config file:

augroup testgroup
au!
au BufEnter * echo 'bufenter'
au BufLeave * echo 'bufleave'
augroup END

When I open two files:
# vim bla.cpp main.c
and then execute :bnext I'll be seen two string 'bufenter' and
'bufleave' all the time while executing :bnext.
If I comment line
 au BufLeave * echo 'bufleave'
and then repeat procedure I'll be seen string 'bufenter' just one time
after first command :bnext.
I do not understand why BufEnter event not correctly triggered without
BufLeave event.
Please, give my some hints.
Thanks.



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



Re: BufEnter event

2009-07-14 Thread Matt Wozniski

On Tue, Jul 14, 2009 at 4:39 PM, Roman Khlystik wrote:

 Hi guys!
 I trying write script which will be react to switching between
 buffers.
 Code from my config file:

 augroup testgroup
    au!
    au BufEnter * echo 'bufenter'
    au BufLeave * echo 'bufleave'
 augroup END

 When I open two files:
 # vim bla.cpp main.c
 and then execute :bnext I'll be seen two string 'bufenter' and
 'bufleave' all the time while executing :bnext.
 If I comment line
  au BufLeave * echo 'bufleave'
 and then repeat procedure I'll be seen string 'bufenter' just one time
 after first command :bnext.
 I do not understand why BufEnter event not correctly triggered without
 BufLeave event.
 Please, give my some hints.

I bet it is retriggered, and the screen is just being redrawn after
the BufEnter so that you don't wind up seeing the echoed text.  With
two things having been printed, vim will wait for you to press a key
before it does the redraw.  Try switching from :echo to :echomsg, or
printing two lines in each event, and I bet you'll see that it is
being executed.

~Matt

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



Vim and ctags, C# code navigation

2009-07-14 Thread Arun

Hello Listmates,
I am using ctags to navigate C# code, facing a few issues
here:

a. If a tag is defined in two classes, using C-] moves me to the
definition of the tag that appears first in the tags file. It
seems vim doesn't make use of the namespace/class info.
My ctags commandline: 
ctags --recurse --extra=+fq --fields=+ianmzS --c\#-kinds=cimnp .

Is this an issue with VIM not using the tag info? Any plugins that 
can help me?

b. Similar issue for tag autocomplete, I get a list of all tags in my
tags files when I try C-X C-], though I would like to get
identifiers related to the particular class.

c. A related question. Can anyone comment on cscope for c#/java? Does
it allow to search for tokens w/ namespace/class context?

Appreciate any help here.

Thanks,
Arun

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



systemwide vimrc file.

2009-07-14 Thread Senthil Cheetancheri


Hi,
I am using vim7.2 on a linux machine.

How do I tell vim7.2 the location of my systemwide vimrc? As per
:version, it is currently set to $VIM/vimrc. For various reasons, I
don't want to change $VIM. Instead I want to hard-code the location of
the system-wide vimrc location.

Thanks in advance.
Senthil.

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



Re: storing files without a name

2009-07-14 Thread Christian Brabandt

On Wed, July 15, 2009 1:44 am, Matt Wozniski wrote:

 On Tue, Jul 14, 2009 at 10:12 AM, Ben Fritz wrote:
 That being said...does
 Vim's mkdir() return a status indicating success/fail? If not, the
 script would need to find a new way to determine that.

 No, but the script can determine that with getftype().

Well, I can only speak for Windows and Linux but there mkdir returns a
status.  Actually it returns an error, if it could not create the
directory.

#v+
:let a=mkdir('C:\Documents and Settings\bar')
E739: Cannot create directory: C:\Documents and Settings\bar
:echo a
0
:let a=mkdir('C:\temp\bar')
:echo a
1
:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled May 12 2007 14:17:41)
MS-Windows 32 bit GUI version
[…]
#v-

regards,
Christian



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