The solutions for exercise 03&04 of MIT.Missing-semester(2020)

Complete vimtutor. Note: it looks best in a 80x24 (80 columns by 24 lines) terminal window.

It is a tutorial for beginners of vim. I will just put some notes which are not mentioned in course here.

  • U command: When we press u in normal mode, we can undo the last command. What U does is fixing a whole line.

  • Ctrl + G: show your location in the file and the file status. Type the linenumber you want to go, then press G, then you are there.

    • To search for a phrase in the backward direction, use ? instead of / .
  • Type :! followed by an external command to execute that command.

  • Select text to write

    • Use visual mode to select text
    • type :w <type_filename_here
    • You can also type :!ls to verify this
  • To insert the contents of a file, type :r FILENAME

    • Furthermore, You can also read the output of an external command. For example, :r !ls reads the output of the ls command
  • Type a capital R to replace more than one character.

How to draw a simple relation graph in Python


The process of drawing a simple relation graph in python can be broken down into 2 steps.

  1. Define a graph.
  2. Draw a graph.

In this step, we will use the networkx package.

If you are using conda, you can just type conda install networkx

If you are using pip, you can just type pip install networkx

First of all, you need to create a graph.