
| Program | nano | emacs | vi |
| Save and exit | ∧x | ∧x∧s | esc :wq! |
| Delete line | ∧ k | ∧k | dd |
| Delete char | ∧d | ∧d | x |
| Prev line | ∧p | ∧p | k |
| Next line | ∧n | ∧n | j |
| Next char | → | ∧f | l |
| Prev char | ← | ∧b | h |
| Next screen | ∧v | control-F | |
| Prev screen | esc v | control-B |
| C | FORTRAN |
| Modern | Archaic |
| Structured | Spaghetti |
| System programming | Scientific programming |
| Moderate library | Huge legacy library |
| Function call by values | Function call by reference |
| C-a | Top of line | "a" for first alphabet |
| C-e | End of line | "e" for end |
| C-f | Forward by one character | "f" for forward |
| C-b | Backward by one character | "b" for backward |
| C-d | Delete character on cursor | "d" for delete |
| C-k | Delete to end of line | "k" for kill |
| C-p | Previous line | "p" for previous |
| C-n | Next line | "n" for next |
type name(type argument)
{
statement1;
statement2;
.........;
.........;
/*
comment1
comment2
*/
some_function(some_argument);
return value;
}
|
int main()
{
float a;
if (a>0) printf("Hello\n");
return 0;
}
|
int main()
{
return 0;
}
|
#include <stdio.h>
int main()
{
printf("Hello world\n");
return 0;
}
|
$ nano hello.c |
$ gcc hello.c |
$ fg |
$ a.out Hello world |