programming in c
please advice on how to use the terminal to program in the c language.
|
Hello ohmsray, welcome to LQ,
in the terminal you will need an editor, for example vi or emacs. You write the sourcecode with the editor. Compiling is done on the commandline. For example, if you have progamcode called hello.c you may execute Code:
gcc -o hello hello.c Code:
./hello It would be helpful if you explain what you want to do. Markus |
Note that vi and Emacs are not like most editors, you can't just start typing like in a normal GUI editor. If you want something simpler, try nano. But if you're going to do a lot of editing, I would recommand that you learn vi or Emacs.
|
thanks
i appreciate your responses alot thanks once again,my problem is that am not familiar enough with using the editors.guys if you dont mind would you please advice or atleast help me on it or give me a tutorial on how to use emacs,vi,and nano.
|
Well, assuming you have vim already installed. Check that you have a file .vimrc in your home-directory, if not copy the file /usr/share/vim/vim73/vimrc.sample.vim as .vimrc into your home-directory.
vim is a modern clone of the standard-Unix-editor vi. vim comes with a tutorial, simply execute "vimtutor" on the commandline. At first sight vim is a little difficult to use, but the best choice when one uses no gui at all. Once you are familiar with vim you'll never use another editor. It is the fastest and most convenient way to edit files. I've installed vim on all my Windows-servers. Markus |
Hey,
Well you can use Vi or Nano. Nano is more user friendly, but if you willing to learn a little bit than i agree with marcush, that is, Vi is a lot better for editing. If you want a non-terminal editing program, Kate is awesome for any KDE system, and i dont mind Gedit (after a little bit of customizing) for gnome. The first look at Vi, its a little difficult to grasp, but once you know it thats all you'll use :) Jump onto youtube and have a look, they have some pretty good tutorials on how to use editors. If your after programming tutorials, "thenewboston" <<---- (his channel on youtube) has easy to understand beginner tutorials. Good Luck ! |
No learning is necessary for nano. Just open it up and start typing. It even has a keyboard shortcut reference at the bottom of the screen.
For Vim, try running the "vimtutor" command. There are also many vi and Vim tutorials on the Internet. |
grattyud
guys thanks alot
|
you can also use scite if you want as an alternative or blue-fish
|
All times are GMT -5. The time now is 08:31 PM. |