vim编辑器视图模式_Vim编辑器模式介绍

本文详细介绍了Vim编辑器的多种模式,包括正常模式、插入模式、可视模式和命令模式。在正常模式下,用户可以移动光标、处理文字;插入模式下,可以直接插入字符;可视模式用于文本选择,便于复制、删除等操作;命令模式则提供了丰富的命令以执行高级任务。了解并熟练掌握这些模式是高效使用Vim的关键。
摘要由CSDN通过智能技术生成

vim编辑器视图模式

Because Vim is focused on changing existing code just as much as writing new code, it is split into several modes that each have different purposes.

由于Vim与编写新代码一样专注于更改现有代码,因此Vim分为几种模式,每种模式都有不同的用途。

正常模式 (Normal Mode)

By default, Vim starts in “normal” mode. Normal mode can be accessed from other modes by pressing Esc or <C-[>.

默认情况下,Vim以“普通”模式启动。 通过按Esc<C-[>可以从其他模式访问普通模式。

In Normal mode key presses don’t work as one would expect. That is, they don’t insert text into the document; instead, certain key presses can:

在正常模式下,按键不像人们期望的那样工作。 也就是说,他们不会在文档中插入文本。 相反,某些按键可以:

移动光标 (Move the cursor)
  • h move one character left

    h向左移动一个字符

  • j move one row down

    j下移一排

  • k move one row up

    k向上移动一排

  • l move one character right

    向右移动一个字符

As many vim commands, row movement can be prefixed by a number to move s everal lines at a time:

与许多vim命令一样,行移动可以以数字作为前缀,以一次移动几行:

  • 4j move 4 rows down

    4j下移4行

  • 6k move 6 rows up

    6k向上移动6行

    6k move 6 rows up

    6k向上移动6行

Basic word movements:

基本的单词动作:

  • w move to beginning of next word

    w移至下一个单词的开头

  • b move to previous beginning of word

    b移至上一个单词的开头

  • e

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值