1. First enter the shell command interface, enter: "VI hello.c"
entered the vi editing interface, type I into the editing state. The following procedures can be entered:
#include <stdio.h>
int main (void)
{
printf ("Hello, world\n");
return 0;
}
Press ESC to exit the edit state, and then enter ": Wq" to save and fallback to the shell command interface.
2. Then enter "Gcc-wall hello.c" to compile the program.
3. Enter "./a.out", which represents the program you just compiled.
##########################################################
# "I": Start editing
# "U": Undo Yes
# "DD": delete when moving forward
# "yy": Copy the current line to the Clipboard
# "Ctrl+r": Redo the last command
# ": N" "Jumps to n rows, n indicates line number
# G Cursor is positioned on the last line
# GG Cursor is positioned on the first line
# 50% Cursor positioned in the middle of the file
# H cursor positioned on the first line of the display
# M Cursor positioned in the middle of the display
# L cursor positioned on the last line of the display
# # # more frequently used commands in: http://blog.csdn.net/it1988888/article/details/8040568
C language Use VI writing C language