使用vscode开发ue4_像高级开发人员一样使用vscode

使用vscode开发ue4

重点 (Top highlight)

VSCode is one of the most popular code editors, skilled use of VSCode can greatly improve our programming efficiency. Here I will introduce some advanced tips for using VSCode, which I hope will help you.

VSCode是最受欢迎的代码编辑器之一,熟练使用VSCode可以大大提高我们的编程效率。 在这里,我将介绍一些使用VSCode的高级技巧,希望对您有所帮助。

Here are the features I’m going to talk about:

以下是我要谈论的功能:

  • Multiple Cursors

    多个游标
  • Rename Symbol

    重命名符号
  • Move line up and down

    上下移动线
  • User Snippets

    用户片段

多个游标 (Multiple Cursors)

We might want to type the same thing in different places at the same time.

我们可能希望同时在不同的地方键入相同的内容。

For example, in the following code, we want to add a class=“odd” attribute to the first, third, and fifth <li>; Add a class="even” attribute to the second, fourth, and sixth <li>.

例如,在下面的代码中,我们要向第一个,第三个和第五个<li>添加class=“odd”属性; 将class="even”属性添加到第二,第四和第六个<li>

<ul>
<li>Lorem, ipsum dolor.</li>
<li>Lorem, ipsum dolor.</li>
<li>Lorem, ipsum dolor.</li>
<li>Lorem, ipsum dolor.</li>
<li>Lorem, ipsum dolor.</li>
<li>Lorem, ipsum dolor.</li>
</ul>

How would you achieve the following?

您将如何实现以下目标?

Image for post

I used to type class="old” on one label and then copy-paste it somewhere else. It was not until later that I learned the skill of multi-cursor input, which greatly improved my work efficiency.

我曾经在一个标签上键入class="old” ,然后将其复制粘贴到其他地方,直到后来我才学会了多光标输入的技巧,从而大大提高了我的工作效率。

Specifically, when you hold down Alt on the keyboard (in macOS, the Option key), clicking on other areas will create an extra cursor. Then whatever you type on the keyboard appears in each cursor area at the same time.

具体来说,当您按住键盘上的Alt键(在macOS中为Option键)时,单击其他区域将创建一个额外的光标。 然后,您在键盘上键入的内容将同时显示在每个光标区域中。

Image for post

Note:

注意:

  • Windows: Alt+Click

    Windows:Alt +点击
  • macOS: Option+Click

    macOS:Option +单击

重命名符号 (Rename Symbol)

Let’s do an easy trick now.

现在让我们做一个简单的技巧。

When we write code or document, we may find a spelling error, or we may want to change the naming conventions, so we often need to modify a word in batch.

在编写代码或文档时,我们可能会发现拼写错误,或者我们可能想更改命名约定,因此我们经常需要批量修改一个单词。

Suppose you had a piece of code like this, and we wanted to change all of foo to bar, what would you do?

假设您有一段这样的代码,并且我们想将所有foo更改为bar ,您会怎么做?


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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值