代码片段管理工具_VS代码片段:提高编码效率的最强大工具

代码片段管理工具by Sam Williams 通过山姆·威廉姆斯 VS代码片段:提高编码效率的最强大工具 (VS Code snippets: the most powerful tool to boost your coding productivity) 用更少的按键编写更多的代码 (Write more code with fewer keystrokes)Everyone wan...
摘要由CSDN通过智能技术生成

代码片段管理工具

by Sam Williams

通过山姆·威廉姆斯

VS代码片段:提高编码效率的最强大工具 (VS Code snippets: the most powerful tool to boost your coding productivity)

用更少的按键编写更多的代码 (Write more code with fewer keystrokes)

Everyone wants to be able to produce more code in fewer keystrokes. Arrow functions in JavaScript have become incredibly popular recently — and they only save you 6 characters!

每个人都希望能够用更少的按键产生更多的代码。 JavaScript中的箭头功能最近变得非常流行-它们只能为您节省6个字符!

(function(){console.log('a')})() // 32 charachters(()=>{console.log('a')})() // 26 charachters

But there is a better way to save typing — and this article will show you the tool to do it.

但是,有一种更好的保存类型的方法-本文将向您展示实现此目的的工具。

代码段 (Code Snippets)

For years, people have used code snippets to save time — whether they are common functions, file structures or even templates for whole systems. This is not a new idea.

多年以来,人们一直在使用代码段来节省时间-无论它们是通用功能,文件结构,还是整个系统的模板。 这不是一个新的想法。

The problem with a lot of existing systems is that these snippets were often stored in text files or other file systems and needed to be manually copied and pasted into wherever they were needed.

许多现有系统的问题在于,这些代码段通常存储在文本文件或其他文件系统中,需要手动复制并粘贴到所需的位置。

This was great for large snippets of code. But one-liners were often quicker to type than to search for the file, copy it and paste it in.

这对于大型代码片段非常有用。 但是,单行键入通常比搜索文件,复制并粘贴文件更快。

The next step was tools such as TextExpander or AutoHotKeys, where special key sequences could be set up to paste code snippets into wherever you were typing. These are great and can save you loads of time… but we can take it one step further.

下一步是诸如TextExpander或AutoHotKeys之类的工具,可以在其中设置特殊的键序列,以将代码段粘贴到您键入的任何位置。 这些功能很棒,可以节省您的时间...但是我们可以更进一步。

VS代码片段

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值