Terminal based development environment

Hi all, I thought I'd bring this one up again as I'm struggling a bit and I've not been able to find help elsewhere.

Basically I've really taken to cscope and ctags, but I've not been able to get any confirmation on nvi's cscope integration capabilities.
Using
Code:
:cs find s <symbol>
will immediately open up the first result it finds without prompt. This is undesirable behaviour because it's usually the wrong one.

Looking at the usage:
+=+=+=+=+=+=+=+
Command: find (Query the databases for a pattern)
Usage: find c|d|e|f|g|i|s|t buffer|pattern
c: find callers of name
d: find all function calls made from name
e: find pattern
f: find files with name as substring
g: find definition of name
i: find files #including name
s: find all uses of name
t: find assignments to name
To me, this suggests that it should take you into interactive mode (find ALL, find FILES) as it does expect more than one result, so it should not be opening up the first thing it finds. At least, that's what I think.

Does anybody have any ideas about this? I've tried emailing the nvi maintainer but he's not very active and isn't sure about this. On the off-chance they were into vi, I emailed the cscope maintainers, but they didn't know either. I've posted to the hackers mailing list but haven't got a response yet.

Could it be that nvi isn't used very much to actually develop with? This seems like a very limiting bug(?) - you could get around it with just launching cscope from a command line, but you lose your tag stack, which is a very nifty thing indeed.

Confused!
 
andyzammy said:
Hi all, I thought I'd bring this one up again as I'm struggling a bit and I've not been able to find help elsewhere.

Basically I've really taken to cscope and ctags, but I've not been able to get any confirmation on nvi's cscope integration capabilities.
Using
Code:
:cs find s <symbol>
will immediately open up the first result it finds without prompt. This is undesirable behaviour because it's usually the wrong one.

Looking at the usage:

To me, this suggests that it should take you into interactive mode (find ALL, find FILES) as it does expect more than one result, so it should not be opening up the first thing it finds. At least, that's what I think.

Does anybody have any ideas about this? I've tried emailing the nvi maintainer but he's not very active and isn't sure about this. On the off-chance they were into vi, I emailed the cscope maintainers, but they didn't know either. I've posted to the hackers mailing list but haven't got a response yet.

Could it be that nvi isn't used very much to actually develop with? This seems like a very limiting bug(?) - you could get around it with just launching cscope from a command line, but you lose your tag stack, which is a very nifty thing indeed.

Confused!

cscope is integrated into nvi. Say's so on their web page: http://cscope.sourceforge.net/

Also may people use nvi for development. Just as people use ed for development also. Interesting fact. The author of nvi was actually the person who suggested removing AT&T code from the Berkeley stack in the 80's. Also cscope has been around probably a decade before vim was an idea for a vi clone for the amiga.

More importantly it may be a good idea to see how you would integrate something external, like spell checking in nvi, to understand how to use nvi with non built in functionality. This will get you closer to your goal of being in control of your editor.
 
IMHO there are not good choices right now. If you really need to, you could do with just vim mostly because it has decent syntax highlighting, a somewhat working completion plugin and you can invoke CMake (the build system used by KDevelop) pretty much from there, outside and IDE and X.

I've tried vim with different completions (I wanted to use a clang-based one if possible, because of C++11), but the lag spikes when you type a function call, an access operator and such is just unbearable ... and they are the result of invoking the compiler, parsing the code and outputting the completion and that piped up to vim.

There was a project of making up a "daemon" based off clang to provide proper completion to IDEs that request it, but unfortunately I don't know the state of it[1]

Regards.

1 > http://www.phoronix.com/scan.php?page=news_item&px=MTEyMDQ
 
I rarely understand the pop culture in *nix programming, to go for purely terminal based development.

I've used many different environments over the years, and in the end this (`This' being FreeBSD, xterm, Vim, tcsh, grep, etc.) works the best for me.

Is it perfect? Hell no.
Can $foo do $bar better? Often, yes.
Is it the best solution for everyone? Of course not.
But the *overall* system works very well for *me* (and others like me).

I think the best advice here is to experiment and see what works best for *you*. Different people prefer different stuff, and in the end the most important thing is getting your work done as fast & efficient as you can.
 
Carpetsmoker said:
I've used many different environments over the years, and in the end this (`This' being FreeBSD, xterm, Vim, tcsh, grep, etc.) works the best for me.

Is it perfect? Hell no.
Can $foo do $bar better? Often, yes.
Is it the best solution for everyone? Of course not.
But the *overall* system works very well for *me* (and others like me).

I think the best advice here is to experiment and see what works best for *you*. Different people prefer different stuff, and in the end the most important thing is getting your work done as fast & efficient as you can.

My comment was not saying that terminal based development is inferior in all cases, I just think that its becoming more of a fashion statement (just like whole hipster movement) and I find it ridiculously stupid. And that goes not only for development, but choice for computer software in general (terminal/ascii/tiled UIs). But thats just my opinion so feel free not to flame me.
 
fonz said:
It's actually a simple matter of personal preference.

Well of course it is a personal preference as nobody is holding a gun for you to choose it. I just think the reasons are wrong in most cases for 'fresh' developers as people tend to create a wrong mind image purely from observation of media/others.

For example, a fresh FreeBSD/linux developer could come here observe this forum like screenshot subsection and get an impression that to be/apear good developer/administrator he has to have a tiled window manager and purely terminal based tools. That is the group/social phenomenon as our brains are hard wired like that. And thats the reason why I always encourage new people to practice other more modern ways to do things before they make up their mind and are spoiled by stubbornness to a change.
 
expl said:
I just think the reasons are wrong in most cases for 'fresh' developers as people tend to create a wrong mind image purely from observation of media/others.
It is of course your prerogative to think so. And I in turn think I'll just leave it at that.

Fonz
 
"More modern" and new does not always mean better for either of those descriptions. There are reasons many of us use terminals for development. Less set up and "runs everywhere" including over the wire for three.
 
Back
Top