- 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.
- TypeScript Essentials
- Delphi程序設計基礎:教程、實驗、習題
- Hands-On Machine Learning with scikit:learn and Scientific Python Toolkits
- Vue.js前端開發基礎與項目實戰
- C/C++算法從菜鳥到達人
- 營銷數據科學:用R和Python進行預測分析的建模技術
- OpenNI Cookbook
- Building a Recommendation Engine with Scala
- Java深入解析:透析Java本質的36個話題
- 軟件架構:Python語言實現
- Access 2010數據庫應用技術(第2版)
- 軟件品質之完美管理:實戰經典
- JSP程序設計實例教程(第2版)
- Beginning C++ Game Programming
- C++ Application Development with Code:Blocks