1. Create or open a file
command:
vim filename
- Vi input at the back to keep up with the file name in the terminal.
- If the file already exists, it will open the file directly.
- If the file does not exist, create a new file.
2. Open the file and locate the file specified line.
command:
vim filename + line number
Example: Open hello.py file 12 and locate the line.
Note:
If only with + without specifying line numbers, it will be positioned directly to the end of the file.
command:
vim filename +
Example: Open hello.py locate the file and to the end.