hi! I'm trying to adapt to C-Progamming in Linux (We have our B.E. project on Neural Networks and we are supposed to write the c programs in Linux)
I find the Vi features set cindent and syntax on very helpful.
After writing the program I have to press ctrl-z ,run gcc ,check the errors , fg
This is very annoying.I would like to compile the program in vi itself, see the errors,go to the line causing the error,and then if the compile is succsessful run the program.
Is this possible ? (I guess this is possible with some tinkering with .vimrc) Can anyone please post his .vimrc
Are there any good ide's exclusively for character mode ? I checked out freshmeat but did not find any good ide (I've used Anjuta but I would like console based ide)
Please help
-- Nikhil Joshi
On Sun, 2002-08-25 at 13:04, Nikhil Joshi wrote: [snip]
This is very annoying.I would like to compile the program in vi itself, see the errors,go to the line causing the error,and then if the compile is succsessful run the program.
Is this possible ? (I guess this is possible with some tinkering with .vimrc)
In command mode (SHIFT-:) (hehe)
:!command
runs a shell command
for more info on compiling and error checking see section 30.1 of vim user guide. You can go there by doing :help and navigating ahead.
Are there any good ide's exclusively for character mode ? I checked out freshmeat but did not find any good ide (I've used Anjuta but I would like console based ide)
No clue about IDEs but I guess a simple editor and command line combination is better than a IDE, at least in my opinion, under Linux it is already very well integrated :-) using editors like vi, emacs and shells like bash, tcsh and GNU readline packages, man pages, info pages etc.
You might want to consider using screen command to have your editor open in one window while a prompt in another, and docs in third and so on...
have fun,
Rajesh
On Sun, 25 Aug 2002 22:34:39 +0530 (IST) Nikhil Joshi nikhiljoshi@subdimension.com wrote:
errors , fg
This is very annoying.I would like to compile the program in vi itself, see the errors,go to the line causing the error,and then if
Try Emacs - you can write your program in it, compile it, run it and even debug it within Emacs. If you have prior experience of using the VC++ IDE and are kinda missing it, try Anjuta.
Hi,
Have you tried writing a makefile and then.. :!make Makefile >make.out or some such easy script name.. and then split ur vi in to two (CTRL + WS)opening the file make.out in the other half.. or better still have another window (ALT + LEFT ARROW if not in X :-) else just another terminal window) and have a "tail -f make.out " running..
there sure are some X tools to make u feel like u r programming in (click-click -click mode) windoz..
hth, shailesh
Nikhil Joshi wrote:hi!I'm trying to adapt to C-Progamming in Linux(We have our B.E. project on Neural Networks and we are supposed to write the c programs in Linux)I find the Vi features set cindent and syntax on very helpful.After writing the program I have to press ctrl-z ,run gcc ,check the errors , fgThis is very annoying.I would like to compile the program in vi itself,see the errors,go to the line causing the error,and then if the compile is succsessful run the program.Is this possible ?(I guess this is possible with some tinkering with .vimrc)Can anyone please post his .vimrcAre there any good ide's exclusively for character mode ?I checked out freshmeat but did not find any good ide (I've used Anjuta but I would like console based ide)Please help--Nikhil Joshi_______________________________________________http://mm.ilug-bom.org.in/mailman/listinfo/linuxers
__________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com
On Sun, 25 Aug 2002, Shailesh wrote:
Have you tried writing a makefile and then.. :!make Makefile >make.out
:make is sufficient.
it will also report errors to screen, and you can do :cn or :cN to go to the next/previous error (line).
On Mon, 26 Aug 2002, Philip S Tellis wrote:
On Sun, 25 Aug 2002, Shailesh wrote:
Have you tried writing a makefile and then.. :!make Makefile >make.out
:make is sufficient.
I searched the net and got this tip : if you want to use gcc use set makeprg=gcc now i just do :make filename in vi and the cursor goes to the line containing error(s) (if any)
Just inquisitive : what is make and what exactly is Makefile ?
I've used this command to install apps (make ,make install ...) but really haven't got into knowing what it exactly is I tried man make but I could not follow it
Please enlighten
-- Nikhil Joshi
On Wed, 28 Aug 2002, Nikhil Joshi wrote:
if you want to use gcc use set makeprg=gcc now i just do :make filename in vi and the cursor goes to the line containing error(s) (if any)
you can do the same for java also, or you could build a Makefile and let the makefile do all that. Then you can also do things like :make install
Just inquisitive : what is make and what exactly is Makefile ?
info make
On Wed, 2002-08-28 at 10:05, Philip S Tellis wrote:
Just inquisitive : what is make and what exactly is Makefile ?
info make
Wonder of wonders! I thought you would say http://sources.redhat.com/autobook/
Sameer.
On 29 Aug 2002, Sameer D. Sahasrabuddhe wrote:
info make
Wonder of wonders! I thought you would say http://sources.redhat.com/autobook/
heh. I'd suggest the autobook after he's been through the info pages. at least that's the way I did it, or maybe even together. Then again, some people may prefer the book before.
Sometime yesterday, Nikhil Joshi wrote:
Are there any good ide's exclusively for character mode ? I checked out freshmeat but did not find any good ide (I've used Anjuta but I would like console based ide)
You can make a good IDE out vim.
:help quickfix :help tags
man etags
Search the vim mailing list archives. http://groups.yahoo.com/group/vim/messages
Check out the vim scripts page. http://vim.sourceforge.net/scripts.php
Manish
Are there any good ide's exclusively for character mode ? I checked out freshmeat but did not find any good ide (I've used Anjuta but I would like console based ide)
Motor is a great/proper IDE
- Mayank