vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

alessandro.bernardini.1979

I think that the power of shell programming (particularly with the use
of the perl language) is by far superior of the power of modern GUI
applications.

In particular, I would like to compare programming with vim + shell
scripting + perl with programming with IDEs like Eclipse or NetBeans.

And of course I am asking your opinion !

Perhaps one problem in vim is the source code browsing: the standard
tags facilities aren't too much advanced and useful.

But this can be adjusted writing a simple program in perl (or even a
awk script) that extracts information from the tags file generated
with exuberant ctags. And I think this is superior to the standard
functionality of Eclipse or NetBeans.

Vim can even be controlled via shell scripting with the --remote
options !

The question is:
- are there better solutions ?
- what else is missing for making vim and the unix shell (with perl,
awk, ecc.) the "ultimative IDE", better than Eclipse or NetBeans or
Visual Studio ? (and this for every language).
(I don´t forget the existence of gnu global or doxygen too...).
- what other unix tools are needed (for listing call trees for
debugging, ecc) ?
- Unix + vim are better than GUI-IDEs or not in your eyes ?

Thx very much
:-)

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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

Mr. Shawn H. Corey

If you use Perl, you don't need any shell.


--
Just my 0.00000002 million dollars worth,
  Shawn

The key to success is being too stupid to realize you can fail.


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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

MarcWeber
In reply to this post by alessandro.bernardini.1979

On Wed, Dec 17, 2008 at 06:39:44AM -0800, alex wrote:
> I think that the power of shell programming (particularly with the use
> of the perl language) is by far superior of the power of modern GUI
> applications.
... This heavily depends on
a) the language you want to program in
b) your shell (perl), vim knowledge..

Eg if you only want to use subversion and you do a lot of heavy
refactorings in Java I'd recommend Eclipse for that all. Why? Most of
the work as already been done and if you want to rename a method you can
use Eclipse Wizards for that which will be superior to vim search
repalce methods.

But if you have a slow PC and if you don't have to browse dozens of
existing packages vim can be faster.

Don't forgett that there is a vi plugin for eclipse. A lot of features
are missing but at least basic things such as multiple registers, the
most useful movements commands do work. (Text objects don't yet :-( )

To be honest I couldn't even imagine doing real Java programming in vim
because I don't konw the libraries and language support in Eclipse is
perfect. (I mean where else can you just press c-s-o to fix imports
etc?)

So unless you don't tell the mailinglist what you really want to do it's
hard to tell which way is better or faster. vim does startup a lot
faster.

Even for C/C++ code within Eclipse I've had good experiences just for
browsing code. Some important features just did work without setting
anyhing up (I still would not know how to make the project compile
within eclipse..)

I haven't used netbeans yet.

Things I do miss in Eclipse:
* g; can't be used multiple times, there is only c-q
* some registers such as paste deleted nth text
* text-objects or the like
* macro programmming
* different tab settings for different projects within a workspace (!)
* Lot's trivial mappings such as <m-=> <space>=<space> (Eclipse maybe
  can do auto formatting.. )
* Jump to next search location by keys.

In vim I do miss
* language support (on the fly syntax checking (bufwritepost auto
  commands do pretty well as replacement for PHP, ruby, perl, ..)
* really language aware completion. (Eg the PHP completion is pretty
  good in Eclipse, the default $VIMRUNTIME PHP completion is partially
  based on tags and shows too many matches to be really useful (IMHO))
  Or such simple thing as show order of arguments an which you're
  editing.. I always forgot about this and looking it up takes time even
  with a good tags setup..
  Or I can't imagine browsing class hirachies the way you can do in
  eclipse. Another example is debuggin support for some languages:
  for PHP I code in vim but I do use Eclipse for debugging. (I know
  there is a python script which adds php debugging support.. But Eclipse
  is much better here!)

So I'd say: Learn both and pick the best tool for a particular task.
There has also been some projects to integrate vim in Eclipse (see
sourceforge) or to use Eclipse as server to provide code completion
features to vim (eclim -> http://eclim.sourceforge.net/ see also related
projects). However be aware that running vim within Eclipse will be a
pain because you have to learn two ways to get an Eclipse feature: The
default one and the way to access it from within vim..

If you want to extend vim to support more features I'd like to invite
you having a look at my tovl lib (github) which does already provide
some small features for vim.

Sincerly
Marc Weber

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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

Anton-3

> Eg if you only want to use subversion and you do a lot of heavy
> refactorings in Java I'd recommend Eclipse for that all. Why?
> Most of the work as already been done and if you want to rename
> a method you can use Eclipse Wizards for that which will be
> superior to vim search repalce methods.

Indeed. But I will highly recommend to use eclim additionally to
that setup.

> To be honest I couldn't even imagine doing real Java
> programming in vim because I don't konw the libraries and
> language support in Eclipse is perfect. (I mean where else can
> you just press c-s-o to fix imports etc?)

In eclim you can't (yet) do something like c-s-o, but this
feature must be fairly straight forward to implement. (I miss it
also all the time). But there are several basic things for this
feature already here: 1) obtaining of the java compilation errors
from the java builder (used to maintain quickfix list of the
compilation errors on save the java file); 2) JavaImport command,
which allow you to automatically import for _one_ identifier; 3)
JavaImportClean command to clean unused imports; 4)
JavaImportSort command to sort imports. We just need some
"volunteer", who will combine all this into one new command, lets
say :JavaImportMissing.

> There has also been some projects to integrate vim in Eclipse
> (see sourceforge) or to use Eclipse as server to provide code
> completion features to vim (eclim ->
> http://eclim.sourceforge.net/ see also related projects).
> However be aware that running vim within Eclipse will be a pain
> because you have to learn two ways to get an Eclipse feature:
> The default one and the way to access it from within vim..

About "pain": it is the same as with learning vim: things which
you do most of the time and very often, you just learn how to do
efficiently with vim + eclim; things which are used not so often
you continue to do in eclipse directly. Not complicated at all.
Especially since recent eclim trunk, which (finally) allows to
run eclipse and eclim simultaneously on the same workspace.

--
Anton.

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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

MarcWeber

> About "pain": it is the same as with learning vim: things which
> you do most of the time and very often, you just learn how to do
> efficiently with vim + eclim; things which are used not so often

The trouble is if you learn vim + eclim only you won't even know that
those "missing" features do exist.. :-(

For example can you view the class hirarchy (a class and it's parents)
in eclim as easy as you can do in Eclipse (pressing F4 or such)..

Also can you browse jars in eclim?
(That's a quick way to get an idea about a package without installing
source..)

Marc Weber

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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

Anton-3

> The trouble is if you learn vim + eclim only you won't even
> know that Those "missing" features do exist.. :-(

No, you shouldn't learn vim + eclim only. One must obviously
learn "pure eclipse" as well - but this is anyway happens
"automatically", during your day-to-day usage.

> For example can you view the class hirarchy (a class and it's
> parents) in eclim as easy as you can do in Eclipse (pressing F4
> or such)..

For the up-stream types not (up-stream = base classes or the
interfaces, which my class implements), but for the down-stream
types you have very well possibility of going down in the
hierarchy, and even more convenient in my opinion, as F4 of
eclipse. I have defined :AI command exactly for that, which uses
:JavaSearch facility of eclim:

" _A_lter to _I_mplementation
function! AImplementation ()
 let fname = expand("%:t")
 let fnameAndExt = split(fname , '\.')
 let className = fnameAndExt[0]
 exec "JavaSearch -p " . className . " -x implementors"
endfunction
command! AImplementation call AImplementation ()

This way, doing :AI being in the interface file, I got the list
of the implementations of this interface in the quickfix
(location) window and can jump to each of them using just normal
vim location window commands.

> Also can you browse jars in eclim?  (That's a quick way to get
> an idea about a package without installing source..)

This I just don't know yet, since I have not yet recognized the
real need for that (you know, most often operations are learned
first :) ). And I have nothing against switching from time to
time to always running in background eclipse and doing tasks from
there - I do it all the time in fact. So I think the real power
is in improving integration in both directions (vim <-> eclipse)
and use the best of both tools.

I will agree that eclipse has more features, as I can even
imagine. But from all those features I actively use only dozen,
and from this dozen almost all are available in eclim + vim.

--
Anton.

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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

Benjamin Fritz
In reply to this post by alessandro.bernardini.1979



On Dec 17, 8:39 am, alex <[hidden email]> wrote:

> Perhaps one problem in vim is the source code browsing: the standard
> tags facilities aren't too much advanced and useful.
>
> ...
>
> - what other unix tools are needed (for listing call trees for
> debugging, ecc) ?

I've never used it myself...but I understand that cscope is much more
useful than ctags (but it takes a little more in the way of setup).
cscope also integrates handily into Vim.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

Nazri Ramliy
In reply to this post by alessandro.bernardini.1979

On Wed, Dec 17, 2008 at 10:39 PM, alex
<[hidden email]> wrote:
> - Unix + vim are better than GUI-IDEs or not in your eyes ?

Absolutely, if you know what you're doing and you're a touch typist -
can type without looking at the keyboard, ever.  Mind you that's quite
a big `if' there. The shell gives you a means to speed up the way you
work exactly how you want it to be speeded up.

Customize the shell so that your fingers do not have to leave the home
rows at all while coding.  That means never lifting your your hand to
reach for the mouse; exploit your fingers' muscle memory to the
maximum level possible which would result in faster editing plus full
concentration on coding itself.  I find that moving the mouse can be
somewhat distracting at times as I have to set aside some brain
activity resources for navigating the work area (haha).  Your eyes
focuses on an area the size of about a quarter, the area outside this
are sort of blurred out. As you hunt around for that pixel that you
want to click that focus area wanders on the screen which forces your
brain to process whatever it is that you are seeing whether it is
relevant to your coding or not. Using the mouse requires hand-eye
coordination - more brain resources needed; while using the keyboard
doesn't as you make use of your ingrained muscle memory. Your only
focus on things that matter the most.

This would include, among others, grokking the shell's programmable
completion so that you can easily autocomplete your vim aliases based
on the context. For example don't limit the filename completion to the
files in your current directory. Make it attempt the completion on the
relevant filenames in all the subdirectories of your project. Put vim
-c "find $1" in say ~/bin/vif and make that vif's tab completion to
search for those files in you project while filtering out files that
you'd never touch. Add an alias, say 'vit' to vi -t and make it
autocomplete to entries in from your tags file.

I guess the main idea here is to focus on customizing the shell in
order to automate away stuff that would slow you down when coding.

nazri.

P/S: Of course, there will always be trade-offs :)

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

Reply | Threaded
Open this post in threaded view
|

Re: vim + unix shell + perl better than moder GUI IDEs like Eclipse or NetBeans ?

Bertram Scharpf
In reply to this post by alessandro.bernardini.1979

Hi,

Am Mittwoch, 17. Dez 2008, 06:39:44 -0800 schrieb alex:
> I think that the power of shell programming (particularly with the use
> of the perl language) is by far superior of the power of modern GUI
> applications.

You got it. Once learned it you cannot return.

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de

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