官术网_书友最值得收藏!

  • Mastering Vim
  • Ruslan Osipov
  • 203字
  • 2021-06-10 18:51:25

Changing text

By default you're in Vim's normal mode, meaning that every key press corresponds to a particular command. Hit i on your keyboard to enter an insert mode. This will display -- INSERT -- in a status line (at the bottom), (and, if you're using gVim, it will change the cursor from a block to a vertical line), as can be seen in the following example:

The insert mode behaves just like any other modeless editor. Normally, we wouldn't spend a lot of time in insert mode except for adding new text.

You've already encountered three of Vim's modes: command-line mode, normal mode, and insert mode. This book will cover more modes, see Chapter 3,  Follow the Leader – Plugin Management  for details and explanation.

Let's create our Python application by typing in the following code. We'll be navigating this little snippet throughout this chapter:

To get back to normal mode in Vim, hit Esc on your keyboard. You'll see that -- INSERT -- has disappeared from the status line. Now, Vim is ready to take commands from you again!

The preceding code is not showing Python  best  practices and is provided to illustrate some of Vim's capabilities.
主站蜘蛛池模板: 安新县| 渭源县| 长治县| 延安市| 温州市| 营口市| 天祝| 夹江县| 章丘市| 房产| 溆浦县| 海林市| 台江县| 吉首市| 青铜峡市| 永泰县| 东丰县| 龙陵县| 东山县| 海南省| 海宁市| 确山县| 久治县| 普洱| 客服| 旬阳县| 刚察县| 太谷县| 固安县| 连云港市| 砀山县| 泾源县| 思茅市| 上蔡县| 睢宁县| 梅河口市| 建平县| 通州区| 资源县| 黄梅县| 扎兰屯市|