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


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: [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)


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!


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