Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

翻译用法章节 #13

Merged
merged 7 commits into from
Apr 6, 2017
Merged

翻译用法章节 #13

merged 7 commits into from
Apr 6, 2017

Conversation

hotleave
Copy link
Contributor

对于用法章节的翻译,发现了原文中的一些错误,也可能是版本的不同导致的,也可能是原文作者的笔误,已在文中标出。

@S1ngS1ng S1ngS1ng mentioned this pull request Mar 28, 2017
chapter/Usage.md Outdated

### 获取离线帮助

Vim自带了一个非常棒的用特殊格式排版的单文本文件的文档。Vim采用基于标签的系统来访问这些帮助文件的特定部分。
Copy link
Owner

Choose a reason for hiding this comment

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

Vim 后面需要留有空格,中英文之间要有空格

chapter/Usage.md Outdated

Vim自带了一个非常棒的用特殊格式排版的单文本文件的文档。Vim采用基于标签的系统来访问这些帮助文件的特定部分。

首先,读一下这个章节: `:help :help`。执行这个命令以后会在新窗口打开 `$VIMRUNTIME/doc/helphelp.txt` 文件并跳转到这个文件中 `:help` 标签的位置。
Copy link
Owner

Choose a reason for hiding this comment

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

章节后面这个冒号使用中文冒号

chapter/Usage.md Outdated
* 以小括号结尾表示VimL函数,如:`:h reverse()`
* 以冒号开头表示命令,如: `:h :echo`

可以使用 `<c-d>` (这是<kbd>ctrl</kbd>+<kbd>d</kbd>) 来列出所有匹配你当前输入的内容的帮助标签。如:`:h tab<c-d>` 会显示所有与 `tab` 相关的标签,从 `softtabstop` 到 `setting-guitablabel` 。
Copy link
Owner

Choose a reason for hiding this comment

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

括号要使用中文的, "这是" 和后面的标签要有空格

chapter/Usage.md Outdated

可以使用 `<c-d>` (这是<kbd>ctrl</kbd>+<kbd>d</kbd>) 来列出所有匹配你当前输入的内容的帮助标签。如:`:h tab<c-d>` 会显示所有与 `tab` 相关的标签,从 `softtabstop` 到 `setting-guitablabel` 。

你想查看所有的VimL方法吗?很简单,只要输入:`:h ()<c-d>`。你想查看所有与窗口相关的VimL函数?输入 `:h win*()<c-d>`。
Copy link
Owner

Choose a reason for hiding this comment

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

的VimL方法吗? -> 的 viml 方法吗?

VimL函数?输入 -> vimL 函数?输入

chapter/Usage.md Outdated

### 获取离线帮助(另一种方式)

这个列表是由@chrisbra编辑的,他是Vim开发人员中最活跃的一个,最初发表在[vim_dev](https://groups.google.com/forum/#!forum/vim_dev)。
Copy link
Owner

Choose a reason for hiding this comment

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

这个列表是由 @chrisbra 编辑的,他是 Vim 开发人员中最活跃的一个,最初发表在 [vim_dev](https://groups.google.com/forum/#!forum/vim_dev)

chapter/Usage.md Outdated

### 获取离线帮助

Vim 自带了一个非常棒的用特殊格式排版的单文本文件的文档。Vim 采用基于标签的系统来访问这些帮助文件的特定部分。
Copy link
Owner

Choose a reason for hiding this comment

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

Vim 自带了一个非常棒的、特殊格式排版的单文本文件的文档。采用基于标签的系统来访问这些帮助文件的特定部分。

这个不知道这样防疫会不会好点, 两句开头没必要都说vim,感觉有点重复,另外第一句读得有点不大自然,我暂时还想不出更好的。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Vim自带了一套很完善的帮助文档,它们是一个个有固定排版格式的文本文件,通过标签可以访问这些文档的特定部分。

这么翻译是不是通顺一些,把意思也表达清楚了

Copy link
Owner

Choose a reason for hiding this comment

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

对,很好

chapter/Usage.md Outdated
一些简化的技巧:

* 用单引号把文本包起来表示选项,如 `:h 'textwidth'`
* 以小括号结尾表示VimL函数,如:`:h reverse()`
Copy link
Owner

Choose a reason for hiding this comment

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

以小括号结尾表示VimL函数 》》以小括号结尾表示 VimL 函数

chapter/Usage.md Outdated

* 用单引号把文本包起来表示选项,如 `:h 'textwidth'`
* 以小括号结尾表示VimL函数,如:`:h reverse()`
* 以冒号开头表示命令,如: `:h :echo`
Copy link
Owner

Choose a reason for hiding this comment

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

以冒号开头表示命令,如: 中文冒好后面不需要空格

chapter/Usage.md Outdated

可以使用 `<c-d>` (这是 <kbd>ctrl</kbd>+<kbd>d</kbd>)来列出所有匹配你当前输入的内容的帮助标签。如:`:h tab<c-d>` 会显示所有与 `tab` 相关的标签,从 `softtabstop` 到 `setting-guitablabel` 。

你想查看所有的 VimL 方法吗?很简单,只要输入:`:h ()<c-d>`。你想查看所有与窗口相关的 VimL 函数?输入 `:h win*()<c-d>`。
Copy link
Owner

Choose a reason for hiding this comment

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

你想查看所有与窗口相关的 VimL 函数? 》》 你想查看所有与窗口相关的 VimL 函数吗?

chapter/Usage.md Outdated

你想查看所有的 VimL 方法吗?很简单,只要输入:`:h ()<c-d>`。你想查看所有与窗口相关的 VimL 函数?输入 `:h win*()<c-d>`。

这很快就能成功你的第二天性,但是在刚开始的时候,你可能对于要查找的标签一点线索都没有。这时你可以想象一些相关的关键字,再用 `:helpgrep` 来救场。
Copy link
Owner

Choose a reason for hiding this comment

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

这很快就能成功你的第二天性 》》 这很快就能成为你的第二天性

chapter/Usage.md Outdated

### 获取离线帮助(另一种方式)

这个列表是由@chrisbra编辑的,他是 Vim 开发人员中最活跃的一个,最初发表在[vim_dev](https://groups.google.com/forum/#!forum/vim_dev)。
Copy link
Owner

Choose a reason for hiding this comment

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

这里 由@chrisbra编辑 中英文之间要有空格,最后 发表在 后面也要有空格

chapter/Usage.md Outdated

如果你知道你想要找什么,通常使用帮助系统搜索更简单一些,因为搜索的主题都带有固定的格式。

并且帮助系统中的主题包含了你当前使用的 Vim 版本所特有的功能,而那些已经过时的帖子或者是后来发布的帖子是不会包含这些的。
Copy link
Owner

Choose a reason for hiding this comment

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

帖子 可以改为 标签

Copy link
Contributor Author

Choose a reason for hiding this comment

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

并且帮助系统中的主题包含了你当前使用的 Vim 版本的所特有特性,而那些已经过时或者是早期发布的话题是不会包含这些的。

原文为topic, 感觉翻译成标签不太合适,并且文中说这是发表在google group中的,所以提及的topic跟帖子差不多 🤒

Copy link
Owner

Choose a reason for hiding this comment

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

话题也不错,标签确实不合适。

chapter/Usage.md Outdated

6. Vim 脚本(VimL)的帮助都在 `:h eval.txt` 里。而某些方面的语言可以使用 `:h expr-X` 获取帮助,其中的 'X' 是一个特定的字符,如: `:h expr-!` 会跳转到描述 VimL 中'!'(非)的章节。另外一个重要提示,可以使用 `:h function-list` 来查看所有函数的简要描述,列表中包括函数名和一句话描述。

7. 关于映射都可以在 `:h map.txt` 中找到。通过 `:h mapmode-i` 来查找 `:imap` 命令;通过 `:h map-topic` 来查找关于映射的topic(译者注:topic为一个占位符,正如上面的字符 'X' 一样,在实际使用中需要替换成相应的单词)(如:`:h :map-local` 查询本地buffer的映射,`:h map-bar` 查询如何在映射中处理'|')。
Copy link
Owner

Choose a reason for hiding this comment

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

topic为一个占位 之间空格

chapter/Usage.md Outdated

如果你遇到了无法解决的问题,或者需要指引的话,可以参考 [Vim 使用](https://groups.google.com/forum/#!forum/vim_use)邮件列表。 [IRC](https://de.wikipedia.org/wiki/Internet_Relay_Chat) 也是一个很不错的资源。 [Freenode](https://freenode.net/) 上的 `#vim` 频道很庞大,并且里面有许多乐于助人的人。

如果你想给 Vim 提交Bug的话,可以使用 [vim_dev](https://groups.google.com/forum/#!forum/vim_dev)邮件列表。
Copy link
Owner

Choose a reason for hiding this comment

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

Bug 前后空格

Copy link
Contributor

@S1ngS1ng S1ngS1ng left a comment

Choose a reason for hiding this comment

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

有一些小问题,整体上不错👍

chapter/Usage.md Outdated
:helpgrep backwards
```

上面的命令会在所有的帮助文件中搜索“backwards”,然后跳转到第一个匹配的位置。所有的匹配位置都会被添加到快速修复列表当中,用 `:cp / :cn` 可以在匹配位置之间进行切换。或者用 `:copen` 命令来打开快速修复窗口,将光标定位到你想要的位置,再按 回车就可以跳转到该匹配项。详细说明请参考 `:h quickfix`。
Copy link
Contributor

Choose a reason for hiding this comment

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

https://github.com/wsdjeg/vim-galore-zh_cn#全局位置信息表局部位置信息表

为了一致,这里的 "quickfix" 也应该翻译成"全局位置信息表"

chapter/Usage.md Outdated

如果你知道你想要找什么,使用帮助系统的搜索会更简单一些,因为搜索出的主题都带有固定的格式。

并且帮助系统中的主题包含了你当前使用的 Vim 版本的所特有特性,而网上那些已经过时或者是早期发布的话题是不会包含这些的。
Copy link
Contributor

Choose a reason for hiding this comment

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

并且 -> 而且,


10. 执行类的命令以":"开头,即:`:h :s` 讲的是 ":s" 命令。

11. 在输入某个话题时按 CTRL-D,让 Vim 列出所有的近似项辅助你输入。
Copy link
Contributor

Choose a reason for hiding this comment

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

不知道这里,是不是应该翻译成 “自动补全” 呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个不是自动补全,它只是会用模糊查询列出所有选项,并不会补全你输入的内容

Copy link
Owner

Choose a reason for hiding this comment

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

恩,这个相当于输出所有匹配项目。

chapter/Usage.md Outdated

11. 在输入某个话题时按 CTRL-D,让 Vim 列出所有的近似项辅助你输入。

12. 用 `:helpgrep` 在所有的帮助页面(通常还包括了已安装的插件的帮助页面)中进行搜索。参考 `:h :helpgrep` 来了解如何使用。当你搜索了一个话题之后,所有的匹配结果都被保存到了快速修复窗口(或位置窗口)当中,可以通过 `:copen` 或 `:lopen` 打开。在打开的窗口中可能通过 `/` 对搜索结果进行进一步的过滤。
Copy link
Contributor

Choose a reason for hiding this comment

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

关于“快速修复窗口”,命名应统一

chapter/Usage.md Outdated

17. 快速修复命令以 `:c` 开头,而位置列表命令以 `:l` 开头。

18. `:h BufWinLeave` 讲的是 BufWinLeave 自动命令。还有, `:h autocommand-events` (译者注:原文是 `:h autocommands-events`,但是没有该帮助)讲的是所有可用的事件。
Copy link
Contributor

Choose a reason for hiding this comment

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

还有, :h autocmooand-events

逗号之后多了一个空格

chapter/Usage.md Outdated

### 剪贴板

如果你想在没有GUI支持的Unix系统中使用 Vim 的 `'clipboard` 选项,则需要 `+clipboard` 以及可选的 `+xterm_clipboard` 两个[特性](#what-kind-of-vim-am-i-running)支持。
Copy link
Contributor

Choose a reason for hiding this comment

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

第一个 clipboard,应为:

`'clipboard'`

chapter/Usage.md Outdated
:h gui-selections
```

另外请参考:[持续粘贴(为什么我每次都要设置 'paste' 模式](#bracketed-paste-or-why-do-i-have-to-set-paste-all-the-time)
Copy link
Contributor

Choose a reason for hiding this comment

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

这里应该连接到文档的另一个位置,需要修复一下这里的 hash 链接

chapter/Usage.md Outdated

你可以让 Vim 在将修改写入到文件之前先备份原文件。默认情况下, Vim 会保存一个备份文件但是当修改成功写入后会立即删除它(`:set writebackup`)。如果你想一直保留这个备份文件的话,可以使用 `:set backup`。而如果你想禁用备份功能的话,可以使用 `:set nobackup nowritebackup`。

咱们们来看一下上次我在 vimrc 中改了什么:
Copy link
Contributor

Choose a reason for hiding this comment

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

多了一个 “们”

chapter/Usage.md Outdated

**撤销文件**:

[撤销树](#undo-tree)是保存在内存中的,并且会在 Vim 退出时清空。如果你想让它持久化到磁盘中,可以设置 `:set undofile`。这会把文件 `~/foo.c` 的撤销文件保存在 `~/foo.c.un~`。
Copy link
Contributor

Choose a reason for hiding this comment

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

需要修复这里的链接

chapter/Usage.md Outdated

[Pathogen](https://github.com/tpope/vim-pathogen)是第一个比较流行的插件管理工具。实际上它只是修改了 _runtimepath_ (`:h 'rtp'`) 来引入所有放到该目录下的文件。你需要自己克隆插件的代码仓库到那个目录。

真正的插件管理工具会在 Vim 中提供帮助你安装或更新插件的命令。在下文中是一些常用的插件管理工具:
Copy link
Contributor

Choose a reason for hiding this comment

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

在下文中是一些常用的插件管理工具: -> 以下是一些常用的插件管理工具

S1ngS1ng added a commit to S1ngS1ng/vim-galore-zh_cn that referenced this pull request Apr 1, 2017
@S1ngS1ng S1ngS1ng mentioned this pull request Apr 1, 2017
@wsdjeg
Copy link
Owner

wsdjeg commented Apr 5, 2017

@hotleave is this PR ready to be merged?

@wsdjeg wsdjeg merged commit 6299b6b into wsdjeg:master Apr 6, 2017
@wsdjeg
Copy link
Owner

wsdjeg commented Apr 6, 2017

I just merge it into readme, I need to fix some links.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants