- 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.
- C語言程序設計案例教程
- Photoshop智能手機APP UI設計之道
- 前端跨界開發指南:JavaScript工具庫原理解析與實戰
- 垃圾回收的算法與實現
- Web交互界面設計與制作(微課版)
- Flask Web開發入門、進階與實戰
- Cassandra Design Patterns(Second Edition)
- Learning Laravel 4 Application Development
- Silverlight魔幻銀燈
- Kotlin Standard Library Cookbook
- Linux Device Drivers Development
- Learning OpenStack Networking(Neutron)(Second Edition)
- Lighttpd源碼分析
- Scala編程實戰
- 軟件測試(慕課版)