Linux vi C make Primer Tutorial

Linux vi C make Primer Tutorial

Linux vi C make Primer Tutorial

The Linux (or unix) command vi is a powerful command line editor tool which has a long history with unix and the maintenance of C code (as just one example of its uses).

So much so, as far as C coding goes, that the creators of vi clearly thought you may “set up shop” in the vi world, because, if you have a makefile, like our simple one for today’s tutorial, you can use vi‘s :make command to compile your C or C++ code while in vi … for those thinking that they never “make” syntax errors in C … hope you know where all the Kryptonite supplies are?

You’ll notice that you can run that compiled code (if successful) and still not leave vi via :!./Hello (where the ! is taking you to the parent shell).

There are other text editors for command line Linux (or unix), some being pico and emacs, and there is a bigger version of vi called vim.

The thing about a lot of command line text editors is that they look unfriendly (it’s less unfriendly if you know {ESC}: gets you to the : prompt from the screen view … second green arrow in tutorial picture included this), and that can be true, and this has lead me to do more work with the GUI TextWrangler (when on a Mac) if there is going to be much cutting, copying and pasting, but you should know that vi has functionality to do with buffers, and some years back, there were maybe 6 or 7 days I’d have preferred to do copying and pasting between buffers using vi … you’re right … I’ll “take a Bex” and lie down now.

Here is a link to some downloadable C code you could call Hello.c and its associated makefile designed for Linux command line compilation via gcc (and here is a good tutorial regarding makefiles for gcc compiler … thanks).

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Operating System, Tutorials and tagged , , , , , , , , , , , , . Bookmark the permalink.

5 Responses to Linux vi C make Primer Tutorial

  1. There is evidently a lot to know about this. I suppose you made some good points in features also.

  2. buty zimowe says:

    I have been surfing online fodpdoss more than three hours today, yet I by no means discovered any attention-grabbing article like yours. It’s beautiful worth enough for me. In my opinion, if all webmasters and bloggers made excellent content as you did, the web will likely be a lot more helpful than ever before.

  3. wonderful points altogether, you just received a emblem new reader. What may you recommend about your put up that you just made a few days in the past? Any positive?

  4. wonderful put up, very informative. I wonder why the opposite experts of this sector don’t understand this. You must proceed your writing. I’m confident, you have a huge readers’ base already!

  5. I do trust all of the ideas you have presented for your post. They are very convincing and will definitely work. Still, the posts are very quick for beginners. May just you please prolong them a bit from next time? Thank you for the post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>