Re: Why bottom-posting is preferred on Vim Mainling List?

2007-05-29 Thread Aaron Griffin

On 5/29/07, Micah Cowan [EMAIL PROTECTED] wrote:

[EMAIL PROTECTED] wrote:
 In the end, what's preferred is personal despite arguments pro and con.

 However, the preponderant opinion and therefore usage in the Vim group
 is bottom-posting, though many use interspersed posting and get away
 with it. If you don't bottom-post, you get told about it by the other,
 frequent Vim posters and that's enough to sway me to bottom-post in
 this forum even if I personally don't like it.

Unless I completely misunderstand what you mean by the term,
interspersed posting /is/ bottom-posting; there is no distinction. If
there were no need to intersperse quotes with responses, there'd be
little reason at all to bottom-post, and nobody would care enough at any
rate to correct people who top-posted.


By corollary, I guess, no one intersperses while top posting
this just looks dumb:

No you understood right

Unless I completely misunderstand what you mean by the term,


Yeah, there's no distinction.

interspersed posting /is/ bottom-posting; there is no distinction. If


I can think of little else to say for my contrived example.

there were no need to intersperse quotes with responses, there'd be
little reason at all to bottom-post, and nobody would care enough at any


7.1a patch for Mingw32

2007-05-08 Thread Ron Aaron
It doesn't compile under Mingw32 unless gui_w32.c is patched:

--- gui_w32.c.orig  Sat May 05 04:24:58 2007
+++ gui_w32.c   Tue May 08 09:01:11 2007
@@ -232,6 +232,7 @@
 LPARAM lParam;
 } NMTTDISPINFO_NEW;

+#ifndef __MINGW32__
 #ifndef LPNMTTDISPINFO
 typedef struct tagNMTTDISPINFOA {
 NMHDR  hdr;
@@ -251,6 +252,7 @@
 UINT   uFlags;
 LPARAM lParam;
 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
+#endif
 #endif

 #include poppack.h



Re: Python crash

2007-04-06 Thread Aaron Griffin

On 4/5/07, Chuck Mason [EMAIL PROTECTED] wrote:


/nodefaultlib:python24.lib

That's 2.4 right?

The point is that vim.command() is not thread-safe.  I tried this in
pearl (5.8) as well with the same result.  Except that perl's VIM::Msg
works in a thread (albeit things seem unstable) and VIM::DoCommand does
not.


What do you need separate thread in a text editor for, anyway?


Re: python omnicompletion with Python 2.5

2007-03-26 Thread Aaron Griffin

On 3/26/07, Christian Ebert [EMAIL PROTECTED] wrote:

Hello,

I wanted to try out omnicompletion with Python 2.5, and I get the
following:

Error detected while processing function

Try the following in vim:

:python import sys; print sys.version


Re: question about a python plugin

2007-03-25 Thread Aaron Griffin

On 3/25/07, shawn bright [EMAIL PROTECTED] wrote:

yep, tis the same, i am looking all over for this thing and i already have it !
thanks.


For the record, I believe that was python-calltips which was the
inspiration for the original pythoncomplete


Re: install custom python module?

2007-01-17 Thread Aaron Griffin

On 1/17/07, Tom Whittock [EMAIL PROTECTED] wrote:

I would like to install an external python module (ctypes) into vim
+python, so I can use that modules functionality from my script, but
am unsure as to how to do that. Is this a reasonable thing to want to
do? Is it possible? There doesn't seem to be a python_path equivalent
that I can see...


vim +python runs a typical python session - anything that the python
REPL sees, vim +python will too.

FTR though, sys.path contains the paths python searches.

:python import sys
:python print sys.path


Re: vim 7 python completion

2006-12-13 Thread Aaron Griffin

On 12/13/06, Andrea Spadaccini [EMAIL PROTECTED] wrote:

It shows correctly all the members of os. But if I do

self.win = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.win.C-XC-O

It doesn't show anything.
Is it meant to work in this way?


I would recommend upgrading to the latest version from www.vim.org
(here: http://vim.sourceforge.net/scripts/script.php?script_id=1542 )

The following code works fine:
import gtk

class Foo(object):
   def __init__(self):
   self.win = gtk.Window()
   self.win.C-x,C-o


Please note: if you have syntax errors above the code you are working
with the current code may not complete correctly, due to the top-down
nature of python structure.  I have tried to deal with this as
gracefully as possible, but there are cases where it still happens.


Re: vim 7 python completion

2006-12-13 Thread Aaron Griffin

On 12/13/06, Andrea Spadaccini [EMAIL PROTECTED] wrote:

Thanks a lot, now it works, except for warnings from python:

Errore/i eseguendo function pythoncomplete#Complete:
linea   35:
__main__:157: GtkDeprecationWarning: gtk.FALSE is deprecated, use False
instead
Errore/i eseguendo function pythoncomplete#Complete:
linea   35:
__main__:157: GtkDeprecationWarning: gtk.TRUE is deprecated, use True
instead


Yeah that one is known, but it's cosmetic really, it doesn't hurt
anything.  I will get rid of that next release.


Another small question: how can I see the parameters for the current
method? Say that I do

win = gtk.Window(

and I want to know the possible constructors of gtk.Window.. How can I
do that?


That mostly works, *except* for the instance you mention
(constructors).  I haven't yet made the mapping from __init__ to the
name of the class.

For example:
  import sys
  sys.C-x,C-o
move to excepthook which will contain the parameters in the popup
window (for convenience).  When you accept that entry, it completes
to:
  sys.excepthook(
Allowing you to enter the parameters themselves.  Hitting C-x,C-o at
this point will complete the parameters as named in the original
popup, leaving you with:
  sys.excepthook(exctype, value, traceback)


Re: some ideas

2006-12-11 Thread Aaron Griffin

On 12/11/06, Rodolfo Borges [EMAIL PROTECTED] wrote:

(1)
When tab-completing on Vim :cmdline, start with the dir of the current
file being edited, instead of the $PWD (use ./ for that).


:h autochdir



(2)
When pasting, arrange spaces and separators automagically:


This is a special case that fits your needs, and no one else.  Try
writing a plugin to do this - it wouldn't be that hard.


(3)
A mode (to be used by /usr/bin/view) with less-like interface.
I currently use :so=999 for easier scrolling.


:h less


(4)
About that generic syntax highlighting that uses just # for comments,
and  ' for strings:
Don't hightlight the # unless on the first column, and don't
hightlight strings at all.


Easy to do, why not do it yourself?


Re: cw without losing 0

2006-12-07 Thread Aaron Griffin

On 12/7/06, Chuck Mason [EMAIL PROTECTED] wrote:


Does anyone know of a shorter, happier way to perform (in normal mode)
Pdwbyw

That is, replace the current word with whats in 0 but leave 0 alone?


If I understand you right, here's what I do in that situation.

Say I want to replace all foo with bar like that...
/\foo\
find the first foo
cwbaresc
n
. repeat
n
. repeat
etc etc etc


Re: Useful Tools to Assist Editing (Not just VIM)

2006-12-01 Thread Aaron Griffin

On 11/30/06, zzapper [EMAIL PROTECTED] wrote:

I've done a page to describe these tools in more details.

http://successtheory.com/tips/vimtools.php


Related note, but not on topic:
I like slimKEYS under windows for global hotkey management:
http://slimcode.com/slimKEYS/


Re: suggestions for ssh under windows

2006-11-30 Thread Aaron Griffin

On 11/30/06, Charles E Campbell Jr [EMAIL PROTECTED] wrote:

So, where can he get ssh for WinXP?


I would recommend putty, especially if you just need scp and sftp for
netrw - you can use pscp and psftp from here:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html


Re: search and replace function in vimrc

2006-11-27 Thread Aaron Griffin

On 11/27/06, Samuel Wright [EMAIL PROTECTED] wrote:

:function FixJHIndex


:call FixJHIndex


Re: vim.org refreshed mockup

2006-11-07 Thread Aaron Griffin

On 11/7/06, Gene Kwiecinski [EMAIL PROTECTED] wrote:

Just looked at it again from the above link, and yeah, it's a white
checkerboard pattern, 'though the gray matches the background of the
viewer (M$ Photo Editor? whatever comes out-of-the-box on LoseXP), so it
might be a transparency color/layer that just lets the background poke
through.


Why are you looking at it outside of a browser it's a URL


Re: Confused about omni-complete for Python

2006-10-31 Thread Aaron Griffin

On 10/31/06, Mike Hansen [EMAIL PROTECTED] wrote:

I'm confused about omni-complete for Python.

How should it work?

Let's say that I type in the following on a .py file.

import cgi

form = cgi.

At the . in insert mode I type Ctrl-X Ctrl-O.

A bunch of errors pop up and the omni-complete fails.

Error detected while processing function pythoncomplete#Complete:

Traceback (most recent call last):
File string, line 1, in ?
NameError: name 'vimcomplete' is not defined
E121: Undefined variable: g:pythoncomplete_completions
E15: Invalid expression: g:pythoncomplet_completions
Omni completion ...pattern not found.


Do you get an error about pythoncomplete requiring python?  What is
the output of :version in vim?


Re: navigate in command line completion

2006-10-25 Thread Aaron

koxinga wrote:

hello,

I like to have a menu to navigate through the propositions available 
when I hit Tab so I love the option wildmenu. However, it would be 
even better if the navigation was two-dimensional, on several lines, 
like in zsh when the option zstyle ':completion:*' menu select is set.


Is there a script doing that ?

thanks,

Pierre


I didn't know about wildmenu until just now, it is *awesome*.

--
Aaron
The Dude abides.


Binary files, noeol, and other such things.

2006-10-24 Thread Aaron
Please, oh Vim gurus, explain this binary/noeol situation. It seems to 
me that if I open a text file in e.g. metapad or Edit Plus or any of 
these other very simple Windows-based text editors, I am able to delete 
the final line break, which appears on screen as though there is a 
zero-length line right after the last line of text. I press backspace on 
that empty line and it is gone; so is the EOL.


In order to achieve this in Vim, I must perform strange acrobatics 
including turning on binary, which clobbers my textwidth, wrapmargin, 
expandtab, and modeline options, and forces unix-like line separators.


My only guess is that Vim follows certain established rules for the 
formatting of proper text files, but I have run across situations where 
I need to edit text files (AS text files) that have no final EOL, and it 
pains me that Vim makes this harder than such functionally limited 
editors as Edit Plus.


Is there some Better Way?

--
Aaron
The Dude abides.


Re: Binary files, noeol, and other such things.

2006-10-24 Thread Aaron

A.J.Mechelynck wrote:
 Aaron wrote:
 Please, oh Vim gurus, explain this binary/noeol situation. It seems
 to me that if I open a text file in e.g. metapad or Edit Plus or any
 of these other very simple Windows-based text editors, I am able to
 delete the final line break, which appears on screen as though
 there is a zero-length line right after the last line of text. I
 press backspace on that empty line and it is gone; so is the EOL.

 In order to achieve this in Vim, I must perform strange acrobatics
 including turning on binary, which clobbers my textwidth,
 wrapmargin, expandtab, and modeline options, and forces unix-like
 line separators.

 My only guess is that Vim follows certain established rules for the
 formatting of proper text files, but I have run across situations
 where I need to edit text files (AS text files) that have no final
 EOL, and it pains me that Vim makes this harder than such
 functionally limited editors as Edit Plus.

 Is there some Better Way?


 In text, each line is supposed to end in an end-of-line. This avoids,
 for instance, that concatenating two text files would make the last
 line of the one run into the first line of the other. Whenever Vim
 writes a text file, it makes sure that the last character or character
 pair is the end-of-line marker corresponding to the file's 'filetype'.
 This is intentional.

 In binary files (such as programs), there are no true lines to speak
 of, and the length of the file must be preserved. Therefore Vim checks
 at load whether the file ends in and end-of-line, saves it in the
 boolean buffer-local option 'eol', and uses that when writing the
 file.  Alternately, you may filter binary files through the xxd
 utility (distributed with Vim), and edit them in hex.

 If other editors are broken in the sense that they forget to write the
 last line's end-of-line marker, that's no fault of Vim's. And they
 _are_ broken: I don't remember off the top of my head where the
 corresponding regulation is to be found, but the matter has been
 discussed time and time again in these mailing lists; I guess
 searching the list archive might give you something to chew on.


 Best regards,
 Tony.



Thanks Tony, that's along the lines of what I expected to hear back from
everyone. Perhaps my solution is to edit the file normally and then set
binary just before writing it to preserve its broken state.

If anyone is curious, the reason this came up is because ColdFusion
custom tags will print that trailing newline as a space even when you
tell it to suppress white space. The only way to avoid it is to save the
custom tag file without the final newline (as a broken file).

In this case, two wrongs do equal a right...

Sorry for the long lines and top-posting in my earlier correspondence!

--
Aaron
The Dude abides.


Re: Binary files, noeol, and other such things.

2006-10-24 Thread Aaron

Bram Moolenaar wrote:
 Aaron Thebailiwick wrote:

 Please, oh Vim gurus, explain this binary/noeol situation. It seems to
 me that if I open a text file in e.g. metapad or Edit Plus or any of
 these other very simple Windows-based text editors, I am able to delete
 the final line break, which appears on screen as though there is a
 zero-length line right after the last line of text. I press 
backspace on

 that empty line and it is gone; so is the EOL.

 In order to achieve this in Vim, I must perform strange acrobatics
 including turning on binary, which clobbers my textwidth, wrapmargin,
 expandtab, and modeline options, and forces unix-like line separators.

 My only guess is that Vim follows certain established rules for the
 formatting of proper text files, but I have run across situations where
 I need to edit text files (AS text files) that have no final EOL, 
and it

 pains me that Vim makes this harder than such functionally limited
 editors as Edit Plus.

 Is there some Better Way?

 I've heard people argue that a newline character separates lines, thus
 it's not needed or even desired after the last line.  That's the
 theoretical approach.  In practice a text file that doesn't have a
 newline at the end is most probably truncated.  Thus it's more practical
 to see the newline character as a marker for the end of the line.  This
 has been so for ages on Unix and there is no good reason to do
 otherwise.

Then it's no surprise that Windows text editors follow the theoretical
and probably broken approach, while the Unix ones do things the way
they've always been done.

Thanks for weighing in on this one, Bram.

--
Aaron
The Dude abides.


Re: Binary files, noeol, and other such things.

2006-10-24 Thread Aaron

A,



A.J.Mechelynck wrote:
 Aaron wrote:
 [...]
 Here's a thought, though. There is nothing in the file type or
 filename that will indicate that it is a custom tag, but the file
 will *always* live in /some/path/custom_tags/myfile.cfm. That's where
 the CF server will look for custom tags so they have to be there by
 design.

 So perhaps I can do something like:

 au BufWritePre *.cfm call MaybeSetBinary()
 au BufWritePost *.cfm call MaybeUnsetBinary()

 fun! MaybeSetBinary()
   if match(expand('%'),'custom_tags')  -1
 setlocal binary
   endif
 endfun

 fun! MaybeUnsetBinary()
   if match(expand('%'),'custom_tags')  -1
 setlocal nobinary
   endif
 endfun

 I'll do some experimentation. Thanks again Yakov and Tony.


 You can use the path in the autocommand filename pattern, e.g.

 au BufWritePre  */custom_tags/*.cfm setl bin
 au BufWritePost */custom_tags/*.cfm setl nobin

 See for instance the autocommand set by default for etc/a2ps/*.cfg at
 the BufRead and BufNewFile events.


 Best regards,
 Tony.

Brilliant! I suspected this, but didn't see a specific mention of it in
the autocommand help. I will probably put this in my .vimrc right now.

Cheers!

--
Aaron
The Dude abides.


Re: Binary files, noeol, and other such things.

2006-10-24 Thread Aaron

Aaron wrote:
 A.J.Mechelynck wrote:
  Aaron wrote:
  [...]
   Here's a thought, though. There is nothing in the file type or
   filename that will indicate that it is a custom tag, but the file
   will *always* live in /some/path/custom_tags/myfile.cfm. That's where
   the CF server will look for custom tags so they have to be there by
   design.
  
   So perhaps I can do something like:
  
   au BufWritePre *.cfm call MaybeSetBinary()
   au BufWritePost *.cfm call MaybeUnsetBinary()
  
   fun! MaybeSetBinary()
 if match(expand('%'),'custom_tags')  -1
   setlocal binary
 endif
   endfun
  
   fun! MaybeUnsetBinary()
 if match(expand('%'),'custom_tags')  -1
   setlocal nobinary
 endif
   endfun
  
   I'll do some experimentation. Thanks again Yakov and Tony.
  
 
  You can use the path in the autocommand filename pattern, e.g.
 
  au BufWritePre  */custom_tags/*.cfm setl bin
  au BufWritePost */custom_tags/*.cfm setl nobin
 
  See for instance the autocommand set by default for etc/a2ps/*.cfg at
  the BufRead and BufNewFile events.
 
 
  Best regards,
  Tony.
 
 Brilliant! I suspected this, but didn't see a specific mention of it in
 the autocommand help. I will probably put this in my .vimrc right now.

 Cheers!

I just want to say that your settings there work a treat! Autocommands
are my new best friend.

--
Aaron
The Dude abides.


Shading alternating patterns.

2006-10-10 Thread Aaron
I've been swapping my subscribed addresses, so I apologize if this got 
posted more than once.


My question is casual, but I wasn't able to find anything on the FAQs or
Google, so I hope someone here can tell me if I'm nuts or not.

In my ideal world (which, so far, Vim has done an excellent job creating
for me), CSS definitions would be lightly, alternatingly shaded. Here at
work, we format our CSS files like so:

.selector { property: value; property: value;
property: value; }
.selector { property: value; }
.selector { property: value; property: value;
property: value; property: value; }

You can see immediately that it is easy enough to scan down the left
column to find the selector you're interested in, but it's a bit more
difficult to see where one definition's property list starts and
another's ends (especially with syntax highlighting in there).

Is there some way, perhaps through a syntax rule, or rules, to have Vim
shade the background of *alternating* CSS definitions, assuming this
file format?

I'm handy with regex but I don't know if Vim's syntax system is even up
to the task. A function that ran against the buffer would be fine, too.

Thanks!

--
Aaron


Re: Shading alternating patterns.

2006-10-10 Thread Aaron

Tim Chase wrote:
   Is there some way, perhaps through a syntax rule, or
   rules, to have Vim shade the background of *alternating*
   CSS definitions, assuming this file format?

 While I'm not sure the below will solve it, I've pasted in
 some dialog from Benji Fisher and Tony Mechelynck (from back
 in February of this year, which I saved as I thought it was
 a nifty stunt) regarding the highlighting of alternate
 *lines*.  One might be able to use this as a foundation for
 doing alternate CSS-rule-blocks:

 BF I have not used syntax much either, but I decided to test
 BF this.  I think what you want is (two :hi lines and)
 BF something like this:
 BF
 BF :syn match Oddlines ^.*$ contains=ALL nextgroup=Evenlines skipnl
 BF :syn match Evenlines ^.*$ contains=ALL nextgroup=Oddlines skipnl
 BF
 BF In other words, drop transparent and add skipnl.  I
 BF tested it with
 BF
 BF :syn clear
 BF
 BF first; I am not sure how well it will work without that.
 AM
 AM I agree about skipnl.
 AM
 AM Got it to work on text files, as follows (on W32)
 AM
 AM  ~/vimfiles/after/syntax/text.vim
 AM hi default Oddlines ctermbg=grey guibg=#808080
 AM hi default Evenlines cterm=NONE gui=NONE
 AM
 AM syn match Oddlines ^.*$ contains=ALL nextgroup=Evenlines skipnl
 AM syn match Evenlines ^.*$ contains=ALL nextgroup=Oddlines skipnl
 AM
 AM  $VIM/vimfiles/after/filetype.vim
 AM augroup filetypedetect
 AM au BufRead,BufNewFile *.txt setf text
 AM augroup END
 AM
 AM  ~/vimfiles/colors/almost-default.vim
 AM [...]
 AM hi Oddlines ctermbg=yellow guibg=#99
 AM hi Evenlines ctermbg=magenta guibg=#FFCCFF
 AM [...]
 AM
 AM Notes:
 AM 1. filetype.vim in an after-directory and with :setf
 AM to avoid overriding already-detected special .txt files.
 AM 2. With default before the highlight name in the syntax
 AM file (but not without it) the colors from the colorscheme
 AM (invoked from the vimrc) are used. (Without a colorscheme,
 AM the default colors from the syntax file are still used.)
 AM 3. Haven't succeeded (but haven't much tried) to make it
 AM work for a more complex filetype with an already defined
 AM syntax like HTML
 AM 4. After entering the above changes, Vim must be restarted
 AM for them to take effect.

 Hope it helps give you some grounds from which to find a
 solution (even if I think Tony's a tad messed-in-the-head for choosing
 yellow/magenta for alternating colors ;-)

 -tim

Thanks much, Tim, I will experiment with some of this and see what
happens! Thanks also to Tony and Benji for coming up with this in the
first place.

--
Aaron
The Dude abides.


Re: [BOF] Killer feature

2006-10-09 Thread Aaron Griffin

On 10/7/06, Martin Krischik [EMAIL PROTECTED] wrote:

Eclipse-Integration

And yes, I already voted on it. I soon have to work with Eclipse - no two ways
around it. And I don't think I am the only one. And while Eclipse has tons of
features when it comes to text editing it's just another CUA Editor.


Don't forget visual studio too!


Re: tags - alternative ways to use them

2006-10-06 Thread Aaron Griffin

On 10/6/06, Kim Schulz [EMAIL PROTECTED] wrote:

Hi,
Most of you probably know about using tags, tagfiles and the taglist
plugin, but I am courious if anyone has used the tags functionality in
interesting alternative ways? maybe in plugins or simple macros -
I want to know it all :-)

So let me know what neat ideas you have.


You could probably use C tags from a header file (with the arguments
turned on) to generate a skeleton .c file just an idea.


Re: C++ IDE

2006-10-05 Thread Aaron Griffin

On 10/5/06, Brecht Machiels [EMAIL PROTECTED] wrote:

But as I'm probably not the first to try to use Vim as an IDE


No, you're not.  The issue is not that you're trying to use vim as an
IDE, it is that you're trying to use vim as Eclipse.
Define IDE.

When I use vim as an IDE, I use things like ctags to jump around
files, change things here and there, run :make, etc etc  taglist is
nice.  So are clewn/vimgdb, but not as much as raw gdb.

Now, if you want vim to write makefiles and things for you, that's
another story.  I have a feeling this is what you want - a step to
integrate build these files.  Things like Eclipse / Visual Studio
have a files listing which is used to know which files to compile /
embed / whatever.  make does this just fine, and better, IMO, but
requires you to write a Makefile.

I guess I could answer better if you defined what an IDE is to you.  I
get mixed answers on this when I ask people.  In short: you are trying
to use vim like tools you are used to.  It doesn't work that way.  vim
is vim.  It is not Eclipse.


Re: C++ IDE

2006-10-05 Thread Aaron Griffin

On 10/5/06, Brecht Machiels [EMAIL PROTECTED] wrote:

Hello Aaron,

 Now, if you want vim to write makefiles and things for you, that's
 another story.  I have a feeling this is what you want - a step to
 integrate build these files.

No. I was looking into build systems for that. I'm very disappointed by
what's on offer though. I given Boost.build V2 a shot, but it is
over-complex. Or at least the documentation isn't good enough. I also
tried SCons. It seems alot more intuitive. But according to
http://www.gamesfromwithin.com/articles/0509/000100.html it is rather
slow (if that article is to be trusted). Jam is dead, but FTJam seems to
be alive. I think I'll try that next (but first check to see if they
have some decent docs).


While this is a tad offtopic, I will touch on this below.


  Things like Eclipse / Visual Studio
 have a files listing which is used to know which files to compile /
 embed / whatever.  make does this just fine, and better, IMO, but
 requires you to write a Makefile.

I have written makefiles in the past. However, I'd like to be able to
build my projects on several platforms. From what I hear the autotools
require you to read tons and tons of documentation.


autotools != Makefile
I dislike autotools.  I write makefiles by hand.  Not Makefile.am
files, but actual Makefiles.


I just used IDE to describe what I was thinking of. What I mean
exactly is that I simply want to have all those plugins nicely
integrated with keys mapped to them for easy access. As soon as I got
that (and found a decent build system), I'll be perfectly satisfied :)


Most of these plugins come with a function to toggle/show whatever UI
you want.  It's a vimrc one-liner to bind it to a key.  i.e. doing
something like this:
http://phraktured.net/screenshots/ss-20060427211348.png
is two keypresses (except the help screen).  That screenshot is just
an omg look at all the crap screenshot.  I actually used it to help
someone further describe what an IDE means to them (I get into
conversations like this alot).

As for build systems, there's alot of the integrated into vim.  :make
doesn't necessarilly call make - it uses makeprg (set via the
'compiler' option).  You can use this to easilly expand to whatever
build system you want - there's alot already there and on vim.org.

Now, rant time.  A fully cross platform build system is a fallacy.
Unless you're unduely smart, you'll run into a problem *somewhere*.
Doing everything zomgcrossplatform requires layers and layers of
additional complexity to push things into common denominator land.
I prefer, instead, to embrace the differences.  As I stated, I like to
write makefiles by hand.  I also prefer the OS/host based makefile
concept: Makefile just passing things off to the correct
Makefile.linux or Makefile.solaris or Makefile.mingw.  GNU make, or
some version thereof is on most systems anyway - at least more than
bjam or python+scons or perl+cons.

People are scared of Makefiles because of the abomination autotools
have cause them to be.  Try writing them by hand without autotools a
few times.

rant over


Re: Python/Ruby completion requires language interface ?

2006-09-27 Thread Aaron Griffin

On 9/27/06, Mark Guzman [EMAIL PROTECTED] wrote:

A.J.Mechelynck wrote:
 Yes, I never said anything else: ...the scripts... terminate early
 and with error It surprised me because, after all, Vim doesn't
 need to be a C compiler to run ccomplete.vim, or a Web browser (hiding
 tags, the whole HEAD part, and OTOH showing clickable A HREF=...
 links and graphical IMG pictures) to use htmlcomplete.vim. Executing
 a script and editing it are two different things.
My other message covered the reason for the requirement. C as a language
does not provide introspection, python and ruby do. The most effective
completion (for ruby) comes from asking the ruby interpreter itself
what do you know about X. I will probably add a fail-over to syntax
completion as someone else mentioned. I wonder how microsoft manages
their completion system, I'm of the belief that they are also using
introspection (probably in some sort of sandbox).


For obvious reasons, I'm going to side with Mark here.  You can claim
that vim doesn't need to be a C compiler to complete C - that's like
comparing cats and potatoes.  C and C++ have inheirant type
information directly in the code itself.  Header files are included
verbatim, and easy to parse (when needed).  Also, with regards to C,
all completable symbols are top-level  and require no extra scoping.

Let's take a look a python.  Tell me how you would gather the
information from the sys module in order to complete it.  Sure you
could run through all of sys.path oh wait! no... somehow you'd
have to determine the path python WOULD use to find the module, find
the .py file (assuming you don't have a gimped install containing only
pyc files), and parse that.  Sure it's possible, and sure, it might be
easy for sys - but take a look at pygtk.  Tell me how long that
would take to parse.

Now, go to a terminal, type python and hit enter. Then type import
sys; dir(sys) - tell me which was:
a) faster
b) easier
c) less error prone
d) guaranteed to work on all python installs




It would be nice if I could access the spelling/underlining stuff to
provide syntax error information. I haven't look too hard yet to see if
this is possible, but I for one would find it useful.

 P.S. Is that really your mail address? Looks bogus to me. But then if
 it were, you shouldn't stay long on the mailing list...
Yes, it is indeed my email address, though I have a few aliases that are
a bit more formal. I am quite the trouble maker. I'm sure you can
imagine that my address does not validate on many websites, apparently
.info domains aren't valid in most peoples eyes.
  --mark


--
sic transit gloria et adulescentia
blog | http://blog.hasno.info/blog
wiki | http://wiki.hasno.info




Re: Visual Studio 2005 and gvim

2006-09-26 Thread Aaron Griffin

On 9/26/06, Thore B. Karlsen [EMAIL PROTECTED] wrote:

On Tue, 26 Sep 2006 13:13:46 +0300, Stavros Tsolakos
[EMAIL PROTECTED] wrote:
I was thinking about writing a plugin from scratch, adding similar
functionality with VisVim.dll to VS2005. I believe that it could be
nothing more than intercepting a few events and launching gvim.exe.


I like this one: http://www.vim.org/scripts/script.php?script_id=864


I looked into doing that (I also used VisVim in previous versions of
VS), but what I ended up doing was adding Vim as an external tool in
the Tools menu of VS with the following arguments:

  -c exe $(CurLine) $(ItemPath)

I also assigned a keyboard shortcut to it. Now, if I select a file in
the solution explorer in VS and hit the keyboard shortcut, Vim is
opened with the right file. If I already have a file open in the VS
editor, I can hit the shortcut and it is opened in Vim on the right
line.


I've done the same, though I use a named session and open the new item
in a new tab.  The plugin referenced about helps alot too (put file,
compile, etc etc)


vim nxml?

2006-09-21 Thread Aaron Mehl
Hi all,

I asked this a while ago, but I will try again,

Is there anything like nxml mode for vim?

Especially for Docbook?

and not just syntax highlighting but autocomplete and parse as you go
and .

Thanks,
Aaron



Specifying vim options in the files being edited

2006-09-08 Thread Aaron Johnson

List,

How can I include vim settings in the files I'm editing? For example, if 
system wide I have syntax highlighting disabled but I want to enable it just 
for one particular file. For c code I'd like to be able to include something 
like this:


/*
* ?:syntax on
*/

It would have to always always be commented obviously, and the '?:' would 
trigger reading those lines as vim options.


Any ideas if this is somehow supported by default or how to implement it?

Thanks.




Re: VIM 7.0 scripts, ctags and taglist.vim

2006-07-12 Thread Aaron Griffin

Commet nitpick/correction:

// '#' is sed in the new autoload mechanism. see :h autoload in vim help
Is missing a 'u':
// '#' is used in the new autoload mechanism. see :h autoload in vim help


Re: Authors

2006-06-29 Thread Aaron Griffin

On 6/29/06, Seweryn Habdank-Wojewódzki [EMAIL PROTECTED] wrote:

Finally I've found 383 authors :-).


Hurry, someone go write a plugin and ++ that number!


Re: File browsing in Vim

2006-06-22 Thread Aaron Griffin

On 6/21/06, Nick Lo [EMAIL PROTECTED] wrote:

Textmate, that I mentioned, also works on a Project basis and my only
qualms about that approach is that I'm often jumping between
projects ...eg I may open a file from one project to use in another
and so on.


That's what tabs are for!


Strange redraw problem on x86-64 Linux

2006-06-01 Thread Ron Aaron
I'm using Frugalware x86-64 as my Linux distro on my server machine.

For some reason, gvim (compiled with --enable-features=big) has a very
strange redraw problem, which is that it doesn't properly redraw the
screen if the vim window is obscured, and requires ^L to redraw.

The problem also seems to manifest itself when doing any colon command, in
that the first word on the command line shows up, but subsequent words are
not drawn visibly (though they are there).

A further problem is that the fonts are ragged rather than smooth.

The same vim (e.g. compiled from the same source) on my Frugalware x86
32-bit on my laptop works fine.

So I don't know if there is some strangeness about the distro or whether
there may be a 64bit linux problem.

Does anyone have ideas on how to narrow down the problem?



Re: Strange redraw problem on x86-64 Linux

2006-06-01 Thread Ron Aaron
 I'm using Frugalware x86-64 as my Linux distro on my server machine.

 For some reason, gvim (compiled with --enable-features=big) has a very
 strange redraw problem, which is that it doesn't properly redraw the
 screen if the vim window is obscured, and requires ^L to redraw.

I should add that the system was using xorg 7.1, which I downgraded to 7.0
based upon some comments on the Frugalware forum -- but that did not
change the problem.

I've got GTK2 GUI, X11.  The GTK version on the machine is 2.4



Re: Strange redraw problem on x86-64 Linux

2006-06-01 Thread Ron Aaron
 I'm using Frugalware x86-64 as my Linux distro on my server machine.

Aha!  When I change to a bitmap font the display problem seems to go away!
 TrueType and PS fonts look ugly.



Re: vim7: problem with regex subst and combining chars

2006-05-18 Thread Ron Aaron

 I notice other problems.  For example, $ (in Normal mode) takes me to
 the fifth character.  (With 'ruler' set, I see 17-5 in the status line.)
 Maybe there is a null byte in the fifth or sixth multi-byte character?

I think $ and ruler are working correctly; the other 'characters' are
combining characters and you cannot navigate to them directly.  But if you
do 'ga' on the second character, you'll see it's composed of two
characters (05dc and 05b0).

Thanks for verifying the problem isn't just my builds :)



Re: Vim7 - intellisense problem

2006-05-18 Thread Aaron Griffin

On 5/18/06, Dan Clarke [EMAIL PROTECTED] wrote:

In my workplace, our coding standard states that we have to declare our
variables on the next line from the variable type.  The intellisense in
vim7 doesn't work when it's like this.


Vim7 does not have Intellisense - Intellisense is a trademarked
name.  Vim7 has Omni Completion.

Are you using the properly patched ctags?  Can you verify it works on
your system if you move the variables to the same line?

The ccomplete script simply runs through the tags file.  Have you
generated a proper tag file, and can you jump around via these tags?


Re: vim7: problem with regex subst and combining chars

2006-05-17 Thread Ron Aaron
Arrgh!  I can't send this message to the list, for some reason!  Maybe
because it has strange characters in it?

OK:  you can download my test.zip from here:

http://ronware.org/test.zip

In it you will find a file 'test.txt' which is UTF8 and will tell you how
to  see the problem I am finding with using s/// with combining
characters.





Re: vim7: problem with regex subst and combining chars

2006-05-16 Thread Ron Aaron
 (I've attached the zip with the following text in case it doesn't come
 through for you).

 If you do:

   :s/.*/hi/

Verified this happens on Linux as well.



Re: vim7: problem with regex subst and combining chars

2006-05-16 Thread Ron Aaron
 (I've attached the zip with the following text in case it doesn't come
 through for you).

 If you do:

  :s/.*/hi/

 Verified this happens on Linux as well.

And furthermore verified it does NOT happen on vim 6.4



Re: vim7 possible bug

2006-05-11 Thread Aaron Griffin

On 5/11/06, Bram Moolenaar [EMAIL PROTECTED] wrote:

1. Vim is not an IDE
2. Vim works differently
3. Get used to it


Hah.  Awesome, I literally LOLed


Re: More ^P/^N weirdness

2006-05-09 Thread Aaron Griffin

On 5/9/06, Robert Webb [EMAIL PROTECTED] wrote:

I'm still finding the ^P/^N behaviour in insert mode kind of annoying.

I still think ^N/^P should wrap around the matches found so far while
bim is searching in the background.


This is not a new feature in vim7.  This has been in the codebase for a while.

:help 'complete


Re: Omni-completion howto?

2006-05-09 Thread Aaron Griffin

On 5/8/06, Robert Webb [EMAIL PROTECTED] wrote:

I was also expecting there to be C++ support, but only C
support is provided.  Surely C++ is in wider use than C
these days?  There is a plugin you can download separately
for this however:
http://www.vim.org/scripts/script.php?script_id=1520


There is no c++ support because no one has completed it.  Bram writes
vim in C.  As such, he made the C omnifunc.  C++ is _much_ more
complicated due to namespaces, class hierarchies, static functions,
'this' and many many more things.

Feel free to help out with the C++ omni completion plugin if you'd
like it to work.


Re: perlcomplete.vim -- anyone working on this?

2006-05-09 Thread Aaron Griffin

On 5/9/06, Keith Corwin [EMAIL PROTECTED] wrote:

Anyone know of good work-arounds or alternatives?


Yeah, write one.  It's not all that hard.


Re: Omni-completion problems

2006-05-03 Thread Aaron Griffin
My 2 cents - I highly dislike the C-p/C-n use omnicompletion thing. 
When I hit C-p or C-n I *know* that I am using standard vim

completion, and that's what I want.  Just like C-x,C-f or C-x,C-o.  I
know exactly what I'm trying to complete.

The argument I don't want to think about the completion I want is
moot.  If you're writing something that requires omni-completion, you
probably should be thinking.


Re: omni + case

2006-04-28 Thread Aaron Griffin

On 4/28/06, Hugo Ahlenius [EMAIL PROTECTED] wrote:

Hi,

I 6.x series vim, I had the completion to cycle through all the available
keywords in the existing buffer, and it was then case insensitive.

Now I am on gvim 7.0f (on WinXP) and omni-completion looks very cool -- but
is there any (easy) way to make the preview list all the alternative
capitalizations of a specific keyword? I would like FunctionName,
functionName and functionname etc to show up in the menu...


:set ignorecase
should do it.


Re: omni-completion: info bug

2006-04-20 Thread Aaron Griffin
On 4/20/06, Bram Moolenaar [EMAIL PROTECTED] wrote:
 Nice feature, right?  I'll add a remark about that.  The idea is that
 the preview info remains there for a while, so that you can see function
 arguments, for example, while you continue typing.  But if you want to
 explicitly clear it using a space is a good idea.

If I didn't know anything about it, I would expect it to work as follows:

   if length of info text  0, clear window and output text
   else remove preview window

It might be nice to offer two options: '' will kill the preview window
and ' ' would blank it.

Is there any possiblity to get the preview window to pop up for single
completions? If not, I can always force a single empty entry like
{'word':'', 'abbr':'[Cancel]'} or some such oddity...


omni-completion: info bug

2006-04-19 Thread Aaron Griffin
Just a heads up:

Using an omni-completion dictionary, a single completion entry (for
which no menu is displayed) does not update the info preview window.

Thanks,
Aaron Griffin