如何在 vscode 的每一行上获得一个光标 [英] How do I get a cursor on every line in vscode

查看:45
本文介绍了如何在 vscode 的每一行上获得一个光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在大型(ish)文件上使用 vscode 的多光标功能.该文件太大,无法使用 ctrl-alt-up 或 down 单独选择每一行.在 sublime-text 中,我会选择所有内容并按 ctrl-shift-l.vscode中是否有类似的东西.我尝试使用正则表达式搜索 ^,但这给了我一个错误,指出表达式匹配所有内容".

I'm trying to use the multi cursor functionality of vscode on a large(ish) file. the file is too large to select every line individually with ctrl-alt-up or down. In sublime-text I would select everything and push ctrl-shift-l. Is there a similar thing in vscode. I've tried using a regex search for ^, but that gives me an error stating "Expression matches everything".

推荐答案

The command Selection/Add Cursors to Line Ends altshifti 会将光标放在当前选择的每一行上.(Mac 使用 optshifti)

The command Selection / Add Cursors to Line Ends altshifti will put a cursor on every line in the current selection. (For mac use optshifti)

提示:您可以使用 ctrlkctrls(如在,这两个键盘组合按顺序).(Mac 使用 cmdk,cmds)

Tip: You can pull up the keyboard shortcut reference sheet with ctrlk,ctrls (as in, those two keyboard combos in sequence). (For mac use cmdk,cmds)

这篇关于如何在 vscode 的每一行上获得一个光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆