| ||||||||||||||||||||||||||||||||||||||
^ = Ctrl key | ||||||||||||||||||||||||||||||||||||||
See FAQ for more Emacs hints |
|
Emacs / g++ IDEIt is important to develop some good habits and efficiencies now, so that when the work starts piling up you are not still struggling with the peripheral/superficial issues that slow down progress. One I recommend is developing a work flow screen setup that is your own "IDE". Here's the basics for that: Log in using the ssh facility to linprog. Immediately pop a new window by clicking on the appropriate icon in the first one. Change both these windows into the directory where you need to work. Note that you can resize these wndows. If you have the screen real estate, make one larger one beside or above the other smaller one. Or, simply make them both large (but not full screen) and "tile" them one partially over the other. In the larger window, open an emacs session with one of the files you are working on. KEEP THIS SESSION OPEN while working. Whever you want to test compile, save the buffer [^X^S] but don't exit. Then click to the other window and issue the appropriate compile command. Note that compile errors have line numbers, so you can use the "go to line number" command in the Emacs window to go directly to that line in the buffer. Make a change, save, and then compile again. Also note that the command history in the compile window is accessed with the up arrow key, so a complicated command can be re-issued (or even edited and re-issued) without a complete re-typeing of the command. In a multi-file project, it is often convenient to have multiple edit windows open, one for each of several files, along with the command/compile window. |
Command AliasesIn your home directory, issue this command: ea Look carefully at what is on your screen. You are in an emacs session, editing a file named ".alias". This is a file that is read and sourced whenever you log in. ["source" means the file is run as a set of Unix commands. The effect is to customize your Unix interface.] In that file notice a line that aliases "alias" to "a". Then below that "a" is used to alias other things. In particular, look at "ea", which is aliased to a sequence of three Unix commands (separated by ';'). The first is a call to emacs (this is where you are now). The second is a "source" command that will refresh your aliases. This will be issued after you save and exit emacs. The third command sends a message to screen letting you know that your aliases have been refreshed. Please add a line in the file as follows: a e emacs -nw which will make the single letter "e" associated with the command "emacs -nw", opening an emacs session in the same window as the command is issued ("-nw" means "no window"). Then save [^X^S], exit [^X^C], and you have a new shorter way to invoke emacs: e (filename) Note that you can use "ea" to add other custome features, such as streamlined compile commands. |