vs code也有类似sublime text的多行同时编辑的功能,通常按住鼠标中键即可进行多行选择,还可以结合home和end键进行更加灵活的调整。(键盘命令ctrl+alt,再按上下方向键,或者shift+alt结合鼠标选择)
此外,sublime text有一个非常好用的功能就是在查找时,同时选中(find all)所有匹配的字符串对象,然后可以对这个字符串本身,或者是它们所在的行的其它对象进行同时编辑。vs code的查找默认看不到这个选项,ctrl+f时一次只能选中一个对象,即使replace all也不会同时把光标添加到每个对象位置。但实际上vs code具有这样的能力,有两种方式:选中需要查找的对象,1,ctrl+shift+L;2,ctrl+f,然后按alt+enter。
参考:
https://github.com/Microsoft/vscode/issues/14030
sublime代码行统计
Menu > Find > Find in files…
Then turn on regular expression search (regex) and use the following values:
Find: ^(.*)$
Where: /Your/Project/Directory,*.less,*.js,*.php
Remember to NOT click on the Replace button, as it removes all lines.
Then press search. If you scroll to the bottom, you get something like “30036 matches across 282 files” That means, 30036 lines in 282 code files.
https://forum.sublimetext.com/t/count-lines-in-a-project/6554
sublime ubuntu鼠标中键多行选择,类似windows:
https://superuser.com/questions/923857/change-middle-mouse-button-in-sublime-text
You need to create a custom mouse map in Linux and add the relevant bindings that define the Windows behavior. In Sublime, create a new file with JSON syntax and the following contents:
[
// Mouse 3 column select
{
"button": "button3",
"press_command": "drag_select",
"press_args": {"by": "columns"}
},
]
Then, save the file as ~/.config/sublime-text-3/Packages/User/Default (Linux).sublime-mousemap,
You should now be able to mimic the Windows middle mouse functionality in Linux.