gpt4 book ai didi

netbeans - 在 Netbeans 中编辑多行代码

转载 作者:行者123 更新时间:2023-12-03 05:35:12 25 4
gpt4 key购买 nike

有没有办法在netbeans中选择和编辑多行代码?
Visual Studio 允许类似的操作,您可以按 alt 并使用鼠标的拖动 Action (左键单击)选择多行?

最佳答案

这称为矩形选择
可以通过 Crtl+Shift+R 启用它

Screenshots for steps :

Rectangular Selection

By Petr on Oct 20, 2011

If you use development build, you probably noticed that NetBeans editor added Rectangular Selection action. I don't need this functionality every day, but it can be helpful in some case. One of such case is when you need to delete line numbers in a text or code copied from a tutorial. Like on the picture below.

sample code

You can select the rectangle after pressing Rectangular Selection toggle button in the editor toolbar or pressing CTRL+SHIFT+R shortcut.

Rectangular Selection toggle button

The selection can be easily done with mouse or keyboard. When you use keyboard, just place the caret on a corner, keep down SHIFT and with the arrows keys you select what you need.

keep down SHIFT and with the arrows keys you select what you need

When the selection is done, you can easily delete all the line numbers with pressing DELETE key. Then you have to exit from the rectangle selection mode (CTRL+SHIFT+R or toggle button in the editor toolbar).

If you write a text , then the text is placed on every line in the selected area. This can be useful for example for changing access modifiers of more fields in a class at once.

If you write a text , then the text is placed on every line in the selected area

关于netbeans - 在 Netbeans 中编辑多行代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13549692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com