- Mastering Vim
- Ruslan Osipov
- 274字
- 2021-06-10 18:51:24
Opening files
First, start your favorite Command Prompt (Terminal in Linux and macOS, Cygwin in Windows). We'll be working on a very basic Python application. For simplicity's sake, let's make a simple square root calculator. Run the following command:
$ vim animal_farm.py
This opens a file named animal_farm.py. If the file existed, you'd see its contents here, but since it doesn't, we're greeted by an empty screen, as shown in the following example:

You can tell that the file doesn't exist by the [New File] text next to a file name in the status line at the bottom of the screen. Woohoo! You've just opened your first file with Vim!
If you already have Vim open—you can load a file by typing the following, and hitting Enter:
:e animal_farm.py
You have just executed your first Vim command! Pressing colon character : enters a command-line mode, which lets you enter a line of text which Vim will interpret as a command. Commands are terminated by hitting the Enter key, which allows you to perform various complex operations, as well as accessing your system's Command line. Command :e stands for edit.
- 多媒體CAI課件設計與制作導論(第二版)
- DBA攻堅指南:左手Oracle,右手MySQL
- Spring Boot開發與測試實戰
- PHP程序設計(慕課版)
- Java編程指南:基礎知識、類庫應用及案例設計
- Java深入解析:透析Java本質的36個話題
- Full-Stack React Projects
- C程序設計案例教程
- RESTful Java Web Services(Second Edition)
- App Inventor創意趣味編程進階
- Frank Kane's Taming Big Data with Apache Spark and Python
- Spring Boot實戰
- Visual C++開發寶典
- 軟件測試(慕課版)
- Java程序設計及應用開發