Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Conversation

@Chengtian0730
Copy link
Contributor

@Chengtian0730 Chengtian0730 commented Aug 2, 2020

Description

update introduction, installation, basic instructions and notes of vim

Types of changes

  • Documentation

Checklist:

  • Code follows the code style of this project.
  • Changes follow the CONTRIBUTING guidelines.
  • Update necessary documentation accordingly.
  • Lint and tests pass locally with the changes.
  • Check issues and pull requests first.
- update introduction, installation, basic instructions and notes of vim
- modified a type error
@boring-cyborg boring-cyborg bot added the LinuxTool Works related to linux tool label Aug 2, 2020
@mergify
Copy link
Contributor

mergify bot commented Aug 2, 2020

Thanks for opening this pull request!
Please check out the Contributing Guidelines.

@mergify mergify bot requested a review from BobAnkh August 2, 2020 09:52
@mergify mergify bot added the documentation Improvements or additions to documentation label Aug 2, 2020
@mergify
Copy link
Contributor

mergify bot commented Aug 2, 2020

@Chengtian0730
Markdown Files Check failed with markdownlint.
Please check details or Contributing Guidelines for more information.

Copy link
Owner

@BobAnkh BobAnkh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作为第一次自己独立完成文档内容,内容上还算充足,要点比较到位,但是整体架构上可能还是经验有所欠缺,有些地方有重复累赘,或者有不够清楚明确,以及有些细节仍然需要修改。

第四部分的常见使用方式中的各模式的操作,完全可以合并到上一部分中,对于第四部分,更应该着重于常用的一些情况,比如保存,退出,强制退出,其他的一些常用例子,比如一下子删除当前行,删除当前光标所在后方的一个单词。这一部分应该更多的以实例为主,着重于具体使用上的一些技巧方法,而第三部分则着重于一些vim工具的参数说明和整体说明,可以参考我给你的vim基础教程,做一些调整。

另外的注意事项:

  1. 修改description
  2. 完成后rebase或squash合并commit记录保持洁净
  3. 修改进展中请在完成对应修改后在review评论处reply并resolve conversation,如果有不同意见需要讨论也可直接reply,对于review总体的comment中提出的建议,可以评论中采用checklist的形式予以完成说明或直接说明亦可
  4. 注意,相邻行,没有空行,��渲染的时候会自动合并成一行的,务必在你需要分行的地方进行修改,这也是引用报错的原因。你可以在这里看到效果:view
  5. 注意,基本上在行末是不添加句号的
  6. 写好之后可以自行preview一下,以及提交pr之后或push了之后也可以自行看一下渲染效果
  7. 可以自己拿服务器来多体验实验一些,甚至可以拿它来写并多次修改一份markdown,你就大概清楚常用的操作和你需要的一些操作了
## 1. 基本功用

Vim是Visual Interface Improved的简称,是Linux系统中最常用的文本编辑器之一,相比Vi增添了代码高亮等功能。
Vim有命令模式、输入模式和底线命令模式三种模式。
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个模式分类和名称参考一下https://github.com/missing-semester/missing-semester/blob/master/_2020/editors.md进行修改

另注意,普通情况下的相邻行,没有空行,在渲染的时候会自动合并成一行的。

你可以在这里看到效果:view

Comment on lines +7 to +8
命令模式即一般模式,是Vim打开后默认进入的模式,支持一些简单命令;如要进行文本编辑,需要从命令模式进入输入模式,即编辑模式;如要使用更为复杂的指令,需要进入底线命令模式,即命令行模式。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是采用Normal mode,command-line mode这样的说法为默认说法进行修改~

## 2. 安装方法

首先打开命令窗口,输入命令`lsb_release -a`,查看当前的Linux系统版本:CentOS或Ubuntu。
如果是CentOS系统,输入命令`yum -y install vim*`;Ubuntu系统,输入命令`udo apt-get install vim-gtk`.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处两个问题,一是:ubuntu安装命令应该写sudo,并且为啥yum不用sudo而apt用sudo了呢,yum用了-y·参数而apt没有用呢?不知道你有没有理解sudo的意义和-y`参数的意义

二是:ubuntu下安装也应该安装vim,不知道你写下vim-gtk的时候是否有了解过这个版本与vim的区别?


首先打开命令窗口,输入命令`lsb_release -a`,查看当前的Linux系统版本:CentOS或Ubuntu。
如果是CentOS系统,输入命令`yum -y install vim*`;Ubuntu系统,输入命令`udo apt-get install vim-gtk`.
按照操作结果中的要求输入系统密码、输入y或n来确认或取消,直至安装完成。
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方就和上面矛盾了,上方使用了-y参数,但是这里还是这样说明,应当修改


Vim的打开方式:输入命令`vim filename`
Vim在打开后自动进入命令模式。
Vim命令模式下的的关闭方式:输入命令`:wq`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不能叫普通模式下的关闭方式,这个本质上是进入命令行模式来执行操作

底线命令模式下退出:输入命令`q`
底线命令模式下保存:输入命令`w`

在Vim的命令模式下,键入的字符不会被识别为代码,而是命令。
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的说法需要稍稍修正,我认为普通模式下,还是应当认为是操作比较好,被识别为的也不应该称作代码,而是文本


## 4. 常见使用方式和注意事项

***命令模式***
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我个人感觉没有不要又粗体又斜体,一般来说粗体足够了,如果这个方面你有不同意见请说明,这个可以斟酌

Comment on lines +38 to +43
>`i` 为从目前光标所在处插入
`I` 为在目前所在行的第一个非空格符处开始插入
`a` 为从目前光标所在的下一个字符处开始插入
`A` 为从光标所在行的最后一个字符处开始插入
`o` 为在目前光标所在的下一行处插入新的一行
`O` 为在目前光标所在处的上一行插入新的一行
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

引用格式有问题导致报错,这样的事实结果是全部合并在一行,导致摘取测试的mdl寻行时发现引用部分不合规范,如果你是要达成引用中多行的形式,应当这样书写:

> balabala
>
> test

注意,第二行的>之后并没有任何字符(包括空格)

你可以参考我写的各个markdown文本中的相关写法

另外,在这几个模式中,还有更多的操作需要添加,比如粘贴,替换,撤销等等

Comment on lines +79 to +83
在使用底线命令模式的命令前,需输入`:`从一般模式进入底线命令模式。如想要“保存后退出”:

```console
:wq
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处说法应当和之前的说明合并掉,不应该在这里才说明这一使用方法

Comment on lines +76 to +77
`!`常具有“强制”含义;
Vim中的数字常具有次数等含义。
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里说明了应当给出具体例子来解释,!可以直接合并到上方或也可以两处都说明,但侧重点不同

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation LinuxTool Works related to linux tool

2 participants