CS252 Lab 1 - CS252 Lab 1: C/C+ Programming and GDB Goal...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS252 Lab 1: C/C++ Programming and GDB Goal The goal of this lab is to help you better understand both the tools that are available to you as a programmer, and the UNIX environment. A substantial part of being a good programmer is understanding the tools available to you and using them correctly. The lab also serves as a review for C/C++. Advice The Editor Picking an editor that can work for you is critical to efficient programming. This does not include such simple text editors as pico or the CDE text editor. There are plenty of programmers' editors out there, and several are available on lore. We recommend using either XEmacs or vim. If you are not already familiar with vi, XEmacs will probably present you with the simplest learning curve. XEmacs XEmacs is a fork of the GNU emacs text editor with a comprehensive graphic interface. Virtually all of the operations you would want to do are available from drop- down menus and toolbars, letting you learn the keybindings and complex commands at your own pace. You do not need to learn complex commands in order to get started using XEmacs. To start XEmacs, type: csh> Once you have started XEmacs, you can open files, copy, paste, save, and perform other standard operations using the pull-down menus and toolbars. You can open more than one file simultaneously and switch between them using the Buffers pull-down menu. You probably won't want to open more than one copy of XEmacs, choosing to use multiple buffers instead. As you become more familiar with the editor, you will probably want to learn the keybindings to often-used commands. For instance: Ctrl-x Ctrl-s Save the current buffer Ctrl-x Ctrl-f Find a file by name and open it in a buffer Ctrl-x 2 Split the screen into two windows (to see two files simultaneously Ctrl-x 1 Return to only one window Ctrl-x o Switch from one window to another Ctrl-g Abort the command prompt if you accidentally open it We strongly suggest you take a look at the UNIX and XEmacs tutorials at: UINX and XEmacs Tutorials . More information on how to use XEmacs is available through the Help menu or from your TA.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
vim vim is an enhanced version of the vi editor, which has been the "standard" editor on UNIX for years. Vim adds features such as syntax hilighting, extended macros, and smart indenting to the same vi that UNIX users have always had. If you're already a vi user, you should consider trying vim. To start vim, type: csh> vim filename The majority of vim commands are the same as their vi counterparts, with some additions. An addition you may be immediately interested in is :syntax on , which will turn on syntax hilighting. The vimtutor command provides a nice beginner's tutorial, and the :help command is quite extensive. Assignment
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/30/2012 for the course CS 252 taught by Professor Gustavorodriguez during the Fall '11 term at Purdue University-West Lafayette.

Page1 / 10

CS252 Lab 1 - CS252 Lab 1: C/C+ Programming and GDB Goal...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online