Re: C++ IDE

2006-10-06 Thread Yakov Lerner

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

Hi all,

after being fed up by Eclipse's slowness/memory usage, I've decided to
see if Vim could replace it. I've already found numerous nice plugin's
that each implement part of the functionality of Eclipse:
- quickfix
- clewn/vimgdb
- Taglist
- Project

Configuring it all to work nicely together is another matter. I could of
course spend a couple of days learning how to write vim scripts and
rolling my own solution. But as I'm probably not the first to try to use
Vim as an IDE, there must be a nice all-in-one solution out there
somewhere. Or that's what I thought anyway. I can't seem to find any!

Is the anything like Cream that turns Vim into a development
environment? I'm thinking about something that includes all those
plugins and has easy-to-remember shortcut keys mapped to actions such as
build, debug, name completion etc.


For name completion, it's probably best to use vim-standard
completion keys, there are too few of them anyway.

But for everything else, I suggest that you
prepare to define your own key mappings.
I find often then keys easiest-to-remember for me are
keys I mapped myself. Once you mastered to map keys
in your vimrc, it's easy and you're on the way to your very
own vimrc with your very own key mappings that are easy
to remember for *you*.  Don't expect that
keys that someone X finds rememberable is also
rememberable for someone Y. That's why I find it
important to make your own mappings.

Yakov


Re: C++ IDE

2006-10-05 Thread A.J.Mechelynck

James Oliver wrote:

Hi,

[Using vim as an IDE]

Of course, there are many who use vi as an IDE and I think many use it
differently.

Does anyone know a good information source where I can see _how_
people are using vim as an IDE?

I know http://www.vim.org/tips/tip.php?tip_id=1119 "How to use Vim
like an IDE" and http://www.vim.org/tips/tip.php?tip_id=3 "use vim to
quickly compile java files".

(I see some of you writing you defined shortcuts, list errors, use
ctags,... - where can I get an overview or an introduction on how to
do all this?)

Thanks,
James



To know how to use Vim (as Vim or as anything else that it can be used as), 
read the help. ;-)


OK, I know it's a tall order. The Vim help is unbelievably complete, but that 
also means unbelievably bulky. (TANSTAAFL.) But there are several ways to use it.


- Cover-to-Cover (not very useful). Start by hitting F1. When you come to the 
end of that file, you will see a list of other help files. Tackle them one 
after the other. -- This method should work, in theory, but IMHO it is not the 
best one for this purpose, among other reasons because it is too tedious.


- The Dictionary Game: start anywhere, and when a link (in gvim, something 
displayed in dark green) looks interesting, follow it, either by 
double-clicking it with the mouse or by hitting Ctrl-] with the cursor on it. 
Repeat at will.


- Helptag "menu" completion: First, set menu completion mode:

:set wildmenu

That's once and for all. You can write it into your vimrc (see ":help vimrc"). 
Then, type ":help " (without the quotes) followed by part of a help topic 
name, or by a Vim pattern (see ":help pattern-overview") which might match 
something that interests you. Instead of completing your command with the 
Enter key, hit the Tab key instead. The bottom status line (where you normally 
see the file name -- if using split windows, the name of the file in the lower 
split window) will become a menu of possible entries (if there are two or 
more: if there is only one you will see it on the command-line). Select by 
hitting the left and right arrow keys, then hit Enter to accept or Esc to cancel.


- Searching the whole text of all helpfiles:

:helpgrep 

where  is, again, a Vim pattern which defines what to search for: for 
instance, \ where \< and \> represent word boundaries. When Vim has 
searched all the help for matches, it will show the first one (if any). Use 
":cn[ext]", ":cp[revious]" (or ":cN[ext]), ":cfir[st]" (or ":cr[ewind]"), 
":cla[st]" to navigate the list of matches, or ":cope[n]" to show all the 
matching lines in a split window (see ":help quickfix"). (In all cases without 
the quotes and brackets, and you can include or omit all or part of the text 
in brackets).



Best regards,
Tony.


RE: C++ IDE

2006-10-05 Thread Steve Hall
From: Brecht Machiels, Thu, October 05, 2006 1:07 pm
> 
> While we're at it... I recently installed Cream and I very much like
> the shortcut key mappings. Unfortunately, Cream disables Vim's modes
> by default. The option of "Creamlite" behaviour enables modes, but
> removes (most of) the shortcut key mappings along with it. Is there
> any way to have the best of both worlds?

Of course, Cream *IS* Vim, it uses 100% Vim commands and binaries. You
should be able to use it's Expert Mode and turn off insertmode. But
this is OT for this list, please email me privately or use the Cream
lists if you want to discuss the Cream configuration further.



-- 
Steve Hall  [ digitect dancingpaper com ]



Re: C++ IDE

2006-10-05 Thread Brecht Machiels

Hello,


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.


Oops... What I wrote there does look a tad confusing indeed :)
The autotools sentence should've been added to my paragraph about the 
build tools.



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.


I know it's not *that* much work. But I know that when I start messing 
around with such things, I'll end up tweaking it for days on end. I was 
hoping someone would reply and say "go to this website and download that 
nicely set up Vim 'IDE' configuration" :)



Now, rant time.  A fully "cross platform" build system is a fallacy.


I'm actually starting to think that you are absolutely correct. If I had 
more time, I'd probably try to prove us wrong, but that'll never happen :)


Perhaps I can still use Jam as an easier and faster make (if it is 
indeed as fast as that article claims).


Regards,
Brecht


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: C++ IDE

2006-10-05 Thread Brecht Machiels

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


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.


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.


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

Regards,
Brecht



Re: C++ IDE

2006-10-05 Thread James Oliver

Hi,

[Using vim as an IDE]

Of course, there are many who use vi as an IDE and I think many use it
differently.

Does anyone know a good information source where I can see _how_
people are using vim as an IDE?

I know http://www.vim.org/tips/tip.php?tip_id=1119 "How to use Vim
like an IDE" and http://www.vim.org/tips/tip.php?tip_id=3 "use vim to
quickly compile java files".

(I see some of you writing you defined shortcuts, list errors, use
ctags,... - where can I get an overview or an introduction on how to
do all this?)

Thanks,
James


RE: C++ IDE

2006-10-05 Thread Billy Patton
Just to add to what you said about IDE, I moved from MSVC++ to vim.  I had
to write my own make file,  big++ for future.
I eventually programmed my function keys to do
Make
Make clean
Make test
First error
Next error
Previous error
List all errors

It was no where as "nice" as mscv++ but after the transition, I will never
go back to an "ide"
On my pc now I use cygwin for all my unix compatible work, which is my
entire world.

> -Original Message-
> From: Aaron Griffin [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 05, 2006 12:50 PM
> To: Brecht Machiels
> Cc: vim@vim.org
> Subject: Re: C++ IDE
> 
> 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:

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.