简体   繁体   English

崇高文本2中的多行选择

[英]multi-line selection in sublime text 2

I want to select the text in all the alt tag and type in some identical text. 我想在所有alt tag选择文本,然后输入一些相同的文本。 I could be using the wrong key combinations. 我可能使用了错误的组合键。 I've tried several combinations: 我尝试了几种组合:

  • alt+left-click hold and drag the mouse, alt+left-click并按住并拖动鼠标,
  • ctrl+left-click hold and drag the mouse, ctrl+left-click并按住并拖动鼠标,
  • ctrl+alt+left-click hold and drag the mouse, ctrl+alt+left-click并按住并拖动鼠标,
  • ctrl+alt+shift+left-click hold and drag the mouse, 按住ctrl+alt+shift+left-click并按住ctrl+alt+shift+left-click并按住ctrl+alt+shift+left-clickctrl+alt+shift+left-click鼠标左键,
  • ctrl+shift+L+left-click drag the mouse, ctrl+shift+L+left-click鼠标,

as well as swapping to " right-click+ " with those combinations and here is the result: 以及使用这些组合切换到“ right-click+ ”,结果如下:

在此处输入图片说明

That is not what I want. 不是我想要的。

The following is what I want to select: 以下是我要选择的内容:

在此处输入图片说明

In Sublime Text 2 using the MAC, you can hold down the option key and drag to make the selection. 在使用MAC的Sublime Text 2中,您可以按住option键并拖动以进行选择。 So usually in Windows, that means holding down the alt key. 因此,通常在Windows中,这意味着按住alt键。 Holding down the alt key does not work. 按住alt键不起作用。 I checked out the key bindings in Sublime Text 2: 我检查了Sublime Text 2中的按键绑定:

{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
    { "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },

If the up key is the arrow up key, this doesn't work either. 如果向上键是箭头up键,这也不行。 I've also tried ctrl+shift+L without success. 我也尝试了ctrl+shift+L失败。

Thanks. 谢谢。

尝试中键 +拖动或Shift + 右键单击 +拖动

Ok, I just kept trying and I stumbled upon the answer. 好的,我一直努力尝试,但偶然发现了答案。 I was going to delete the question since it was soon after I posted that I got it, but thought I would post for anyone who may have the same issue and have tried everything else others have posted. 我打算删除该问题,因为我在发布该问题后不久就将其删除,但我想我会为可能有相同问题并尝试了其他所有问题的人发布。

Answer :

  1. Left-click to place your cursor in the area you want to make a multi-line selection, release left-click 左键单击以将光标置于要进行多行选择的区域,然后释放左键单击
  2. After that selection, hold down the ctrl key 选择之后, 按住 ctrl
  3. Left-click in the area you want to select in the line below (in my case it was the alt tag text) 左键单击您要在下面的行中选择的区域(在我的情况下是alt tag文本)
  4. Keep holding down the ctrl key, left-click each area individually -- do not drag the mouse while holding ctrl key . 请按住ctrl键, left-click每个单独的区域- 按住不要拖动鼠标ctrl Dragging selects everything from the starting point, not the individual area you want 拖动会从起点选择所有内容,而不是您想要的单个区域

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM