[英]VS Code cursor in wrong position after tab
When I write some code, and then click Tab to autofill from context menu the cursor is now in the wrong position.当我编写一些代码,然后单击 Tab 从上下文菜单中自动填充时,cursor 现在位于错误的 position 中。 It should be before ";"
它应该在“;”之前but for some reason it is after ";".
但由于某种原因,它在“;”之后。 Worked fine for about a year, and now suddenly something like this, any ideas?
工作了大约一年,现在突然出现这样的情况,有什么想法吗?
This problem is related to snippets in vscode.此问题与 vscode 中的代码片段有关。
The easiest way to solve this is to use the snippet extension.解决这个问题的最简单方法是使用代码片段扩展。
Install " HTML CSS Support " extension made by " ecmel " to visual studio code.将“ ecmel ”制作的“ HTML CSS Support ”扩展安装到visual studio代码。 Close the program and open it again and you are ready.
关闭程序并再次打开它,你就准备好了。 Problem fixed.
问题已解决。
Extension URL: https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css扩展网址: https ://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css
Long way: You can write your own or update snippets, to solve this.很长的路要走:您可以编写自己的或更新片段来解决这个问题。
Documentation to make your own snippets: https://code.visualstudio.com/docs/editor/userdefinedsnippets制作您自己的片段的文档: https ://code.visualstudio.com/docs/editor/userdefinedsnippets
I had same issue.我有同样的问题。 I tried all of the solution proposals and searched snippets for it but can't found anything.
我尝试了所有解决方案建议并搜索了它的片段,但找不到任何东西。 I was already using the html css support extension by ecmel.
我已经在使用 ecmel 的html css 支持扩展。 I deleted and reinstalled it, Closed the vscode program and open it again but I couldn't get any results.
我删除并重新安装它,关闭vscode程序并再次打开它,但我无法得到任何结果。 Finally downgraded vscode to 1.64 version from here and now cursor works like a charm.
最后将 vscode 从这里降级到1.64版本,现在 cursor 就像一个魅力。 I wanted to write this answer for friends like me who did not get any results.
我想为像我这样没有得到任何结果的朋友写下这个答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.