How to select every N line in vscode?

Press Ctrl+F or command+F. If not already enabled, press Alt+R or option+command+R to toggle RegEx searching (or press the .* button). Enter (.*\n){N} into the search field, replacing N with the number of lines to select (such as (.*\n){2} for every second line). Press Alt+Enter or option+return or Select All Occurrences of find Match from … Read more

Why is .disableSelection() deprecated?

You can use CSS to accomplish this in most browsers: http://jsfiddle.net/fQthQ/ * { -ms-user-select: none; /* IE 10+ */ -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; user-select: none; } .selectable { -ms-user-select: auto; -moz-user-select: auto; -khtml-user-select: auto; -webkit-user-select: auto; user-select: auto; } Opera does not currently support this feature. See the MDN page for more info: … Read more

How to get selected text from a textbox control with JavaScript

OK, here is the code I have: function ShowSelection() { var textComponent = document.getElementById(‘Editor’); var selectedText; if (textComponent.selectionStart !== undefined) { // Standards-compliant version var startPos = textComponent.selectionStart; var endPos = textComponent.selectionEnd; selectedText = textComponent.value.substring(startPos, endPos); } else if (document.selection !== undefined) { // Internet Explorer version textComponent.focus(); var sel = document.selection.createRange(); selectedText = sel.text; … Read more

How do you select text in vim?

In vim, text is selected by entering Visual mode. This can be done in multiple ways. v (lower case v) begins regular Visual mode, and works similar to selecting text with a mouse. Use h and l to expand the selection left and right to include more words, and use j and k to expand … Read more