vim writes C and C++ program procedures (taking hello world as an example):
1、vim /。
create/File and enter the vim interface;
2、Type i to enter input mode。
3. Write/program.
4、Press the Esc key first to exit the input mode;Then, press Shift+: to enter command mode。Enter wq, save and exit。
5. Compilation/。
5.1. For C program:gcc Then compile;
5.2. For C++ programs:g++ Compilable. After compilation, all generated executable files;
6. Type the command"./", run the program.
7. Displaying "hello world" on Terminal is successful.