Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vim Editor and Unix Command gcc compiler Computer Networks.

Similar presentations


Presentation on theme: "Vim Editor and Unix Command gcc compiler Computer Networks."— Presentation transcript:

1 Vim Editor and Unix Command gcc compiler Computer Networks

2 Vim Vim is a Editor installed in almost every version of the unix-like OS. There are three mode in Vim: Normal, Edit, Command. This overview will cover the simple use of Vim like open file, editing, saving, abort the editing. If you want to know more, you can reference: http://linux.vbird.org/linux_basic/0310vi.p hp http://linux.vbird.org/linux_basic/0310vi.p hp

3 Vim – environment setting Vim can mark the syntax in different colors, which can enhance the efficiency of developing programs dramatically. You can set the custom color scheme or cursor line in.vimrc file. cd ~ vim.vimrc

4 Vim – environment setting After typing vim.vimrc, you’ll be able to edit the.vimrc file (if you don’t have one before, the system will create one for you). If you want the default color scheme, just type “syntax on” in the file and then save the file. If you want more custom setting, you can reference here : http://linux.vbird.org/linux_basic/0310vi.php#vi m_set http://linux.vbird.org/linux_basic/0310vi.php#vi m_set

5 Vim – file open and save If you want to save or abort the editing, you have to enter the command mode of the Vim. If you’re in edit mode, press ESC and then “shift+:” If you want to save the file, enter wq If you don’t want to save the file, enter q!

6 gcc compiler gcc is a c compiler to compile the code you develop. There are a few flags need to take care when you compile code. If you use the pthread in your server, remermber to add –lpthread after your gcc command. Ex: gcc –lpthread server.c

7 gcc compiler You can also assign the name of executable file by –o flags Ex. gcc –o server server.c

8 UNIX Command pwd : show the location you're ls: list all the file in the current directory mv [filename] [path] : move the file to the given path cp [filename] [path] : copy the file to the given path. mkdir [path] : create a sub directory at the current directory.

9 UNIX Command cd path : change the current location to given path Ex: cd testDir, Note: 1.cd.. means go back to the parent directory 2. cd ~ means go to home directory


Download ppt "Vim Editor and Unix Command gcc compiler Computer Networks."

Similar presentations


Ads by Google