# 跟评论区新学的1个非常好用的快捷键，后面举了一个js里面的应用

{% embed url="<https://v.douyin.com/r8yW1fP/>" %}

{% embed url="<https://www.bilibili.com/video/BV1pG4y1s7FW/>" %}

上回这期视频发布以后

有的小伙伴说

让我说说这个 command + D 快捷键

在windows里应该是ctrl + D

那说实话

这个快捷键之前我还真不知道

试了以后我发现他是真香啊

什么意思呢就是

比如说我们现在想把这个css转成一行

我们就可以先选中这么一个换行

然后呢按 command + D

每按一次他就会替我查找下一个

然后呢替我们选中大家看

好到这以后呢按一下删除

加空格这样就可以了

反过来也一样

我们可以选中这个分号

这样把中间的所有的分号都给它选中

然后呢我们再按一个分号回撤

这样就行了

再比如呢大概我这有几个js变量声明

我现在想把它转成1行

然后用逗号隔开也一样

选中Command + D

然后逗号

这样就行了


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sunzsh.gitbook.io/xiaoshan.bug/gen-ping-lun-qu-xin-xue-de-1-ge-fei-chang-hao-yong-de-kuai-jie-jian-hou-mian-ju-le-yi-ge-js-li-mian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
