Boundary sensitive Ctrl+D in Sublime Text 3(windows)

℡╲_俬逩灬. 提交于 2019-12-10 10:45:33

问题


I have same requirement with maček

I borrow maček's example here:

my code pic1:

I select the first instance of es and see this (using cursor select)

pic2:

Perfect! However, when I tap ctrl + D a couple times, it will end up selecting this

pic3:

The answer from Taylan says

If you put your cursor (caret) on the word but not select it and then press Cmd + d it is going to select like in 2nd image.

Quite confusing. In windows, there is always a input cursor(a flashing vertical line, maybe call as caret) in sublime, Without selecting any thing type ctrl + D would select the char nearby the input cursor. Can't not get the result as pic2


回答1:


The following is from Sublime Text 3 (Build 3095) on Windows 7. The behavior is exactly the same on OS X and Linux, and on other builds.

First, we enter the text and place the cursor anywhere by the first word in the string, es:

test 'es cookie set on .test' do
#    ^^^ anywhere here

It can be before the e, between the e and the s, or after the s - it doesn't matter.

Next, without double-clicking, hit CtrlD, which selects es and highlights the other instances of the word.

Now, hit CtrlD twice more, and only the individual instances of es will be selected, not those that are contained within other words, such as test:


Now, if you were to double-click or otherwise select the first instance of es and hit CtrlD several times, this would be the result:

Every instance of es will be selected, even when within another word such as test or cookies.

What I've described is the default behavior of Sublime Text on all platforms, including Windows. If you put your cursor in a word and hit CtrlD, the whole word should be selected. If that does not happen, then somehow the key binding has been changed, either by a plugin or in your user keybindings file.



来源:https://stackoverflow.com/questions/34760021/boundary-sensitive-ctrld-in-sublime-text-3windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!