preface

Since gogoCode has been open source, we have heard the appeal of vsCode plug-in from the community, so we reused the ability of Playground, combined with the local file and directory structure, to develop VSCode plug-in!

Use the feeling is: should listen to dig friend’s words early, really sweet!

Now that the plugin is ready, let’s see how you can use the GoGoCode plugin to easily convert and change code in batches.

Download and install

The VSCode plugin store searches for Gogocode

Try converting a single file

  1. Right-click the file and “Convert with GoGoCode” to open the plug-in window

  1. Write conversion code: I want to rewrite the way component is introduced so that(resolve) => require([xxx], resolve)Form the code to change() => import(xxx)

If you have more complex processing scenarios, you can write conversion logic based on GogoCode, refer to documentation, currently supports js, HTML, VUE conversion

  1. Replace the source file: The conversion is instantaneous. Click replace and the file is changed

Batch file conversion

The GogoCode plug-in also supports substitution throughout the project or in multiple files selected

  1. Select folder: File directory right click and “Convert with GogoCode”

If you want to block selected files or folders, you can CTRL + select multiple files and remove them in batches

  1. Write conversion code
  2. Replace replaces the original file: Replace replaces only the currently displayed file, and replaceAll replaces all files in the directory tree

In replaceAll, only the files that are successfully converted will be replaced, but the files that fail to be converted will not be replaced

In response to this requirement, the partners in the communication group contributed a regular:Simple substitutions with re’s are convenient, but there are many boundary cases to consider, such as Spaces, newlines, special characters, and so on. For more complex cases where it is difficult to use the re, use Gogocode.

In addition, VSCode + GogoCode is also a match made in heaven for code analysis. If you have similar scenes, welcome to join the group. QQ group: 735216094

Complimentary one-click vuE2 upgrade

In addition to the very convenient batch replacement, install gogoCode plug-in friends, can enjoy the one-click vuE2 code upgrade to vue3 rights!

Just right-click the folder, select “vue2 upgrade to vue3”, do not need to type command, do not need to copy and paste the path, you can one key conversion code, more vUE upgrade related can be stamped here

The open source project continues to be polished, and we hope to get feedback from community partners. Please leave a comment or issue on the problems of GogoCode tool and vue2 upgrade tool. If you successfully convert, we are also looking forward to hearing your voice ~

Github:github.com/thx/gogocod… Ask star for support o(////, ////)q

Liverpoolfc.tv: gogocode. IO

QQ group: 735216094 Nail group: 34266233

Playground: play. Gogocode. IO /