I want to know is there an analog command in Sublime to Pycharms Cmd(Ctrl)+W?
This is what she does in Pycharm:
Press Ctrl+W to select the word where the caret is currently located.
Press Ctrl+W successively to extend selection to the next containing node (for example, an expression, a paired tag, an entire conditional block, a method body, a class, a group of vararg arguments, etc.)
While extending selection, keep in mind the following:
Pressing Ctrl+W successively in plain text or comments extends the selection first to the current sentence, then to the current paragraph.
Pressing Ctrl+W successively inside a list, dictionary, or a list of arguments or parameters, selects an element of the list, then the right or left comma and a neighbouring space (if any), then the contents of the list without parentheses, and finally the enclosing parentheses.
Press Ctrl+Shift+W to shrink selection in the reverse order (from the outermost container to the word where the caret currently resides).
Tip
The selection extends or shrinks according to capitalization, if the Use "CamelHumps" words is enabled on the Editor. Smart Keys settings page.
If you want to make selection according to capitalization, using double-click, make sure that the option Honor CamelHumps words... is selected on the Editor settings page.
Without using a plugin:
Expand selection to scope (Ctrl + Shift + Space / CMD + Shift + Space)
Expand selection to brackets (Ctrl + Shift + M / Ctrl + Shift + M)
Expand selection to indentation (Ctrl + Shift + J / CMD + Shift + J)
There is ExpandRegion plugin, which you can install using Package Control. I just tried it and it's pretty good. However I did not find an option to shrink the selection (only expand), but I may have overlooked it.
If you use it, you will also need to define your own keybinding for the command. Description on how to do that is in README.md file on the plugin's GitHub page.
Related
I recently try to Copy and Paste CSS code and this occurred
this a simple copy Ctrl+c
and this is a simple paste Ctrl+v
but the result looks like this:
is there any way to prevent this and have simple Ctrl+c and Ctrl+v?
use 'copy all declarations' or 'copy rule' in inspect element until they fix this issue.
copy rule: it would copy selectors + properties + values
copy all declarations: it would copy properties + values not selectors
simple copy result:
But with copy all declarations or copy rule:
result:
For chrome:-
As long as you can get focus in the Styles pane, you can use Ctrl + A to select all, then Ctrl + C to copy as usual.
I find it's easiest to click in the bottom-right corner of one of the listed styles to avoid giving focus to a rule in the style (which would prevent you from selecting more than that rule). See the red circle in the picture below to see where I normally click. Admittedly it will usually take a few attempts; just keep trying to select all and adjusting where you click until it works.
And for brave:-
Go to inspect than selete what you need than ctrl + c than past it on your editor using ctrl + p
Problem case explained:
I am coding my HTML/CSS and I apply a wrong CSS property value. What I do now is that I have to remove all the line and start typing the property name again to be able to get autocomplete suggestions to choose another value. What I want: be able to place cursor on top of wrong value and run a shortcut that shows me other values to choose from.
This behavior can be seen, for instance, in Android Studio XML properties. When you place the cursor on top of a wrong value you can press Control + Space and choose another value.
Just like you already can place the cursor on top of a color in VSC an get a color picker to choose another color, how can we do this with property values?
Thanks.
I am on Windows and Ctrl + Space works for me.
NOTE: When you have selected the incorrect value (if you have any), make sure that your cursor blinks at the start of the value and not the end of the value. Otherwise, it shows No suggestions box.i.e. to select a value,
Place cursor at the end of the value
Hold Ctrl + Shift + Left Arrow Key to select
Then, hit Ctrl + Space
This will show a list of valid values for the specific property
P.S. VS Code Installed Version: 1.42.1
I want to do multiple select and edit within a specified selection in Sublime Text 2. The following screenshot illustrates the situation:
When I select "element" and press Alt + F3 (in Windows) I can simultaneously edit all instances of element. However what I would like to do is to be able to edit all instances of element only within container-a while leaving element within container-b untouched. I tried first selecting a specific area but then as soon as I attempt to select "element" my first selection disappears.
Is this possible to achieve in Sublime Text 2?
You can simply use the Find in Selection option in the Find panel. Select the text that you want to search in:
then hit CtrlF to open the Find panel. Type in the text you want to find (such as element), then, in the group of buttons to the left of the text area, click the second button from the right - In Selection (highlighted in red):
Finally, either hit AltEnter or click Find All to select all the instances of element in the selected area:
and you're good to go.
Press Ctrl+D to select one more element and then one more again until you have selected all elements in container-a.
(Sorry my approach is very similar, but just a tiny thing to make it very slightly faster.)
Before you start, have the setting "auto_find_in_selection" to true, (This is probably only for SublimeText 3). This will have the "In Selection" button automatically done in most cases.
(if you are already under the word) use Ctrl+E (command slurp_find_string). This causes the word to be used in find box.
select the region you want (Ctrl+Shift+J should work nicely in your case)
Hit Ctrl+F, you will find all settings are right ("In Selection" on, your word in box already)
Just hit Alt+Enter and you are there.
For Mac, select what you want and then you can use --> cmd+ctrl+g
I'm trying to find out what the setting is for the way Sublime Text handles code selection with the keyboard.
Example:
Hold Command + Shift + < or > to highlight a line
Next if you then click up or down, it will select everything above or below
Ideally I'd like to just continue selecting lines up or down, line by line rather then the whole thing.
Anyone know how to edit that feature?
CMD + L selects the cursor's line.
Then SHIFT + UP / DOWN adds the previous / next line to the selection.
Is there a way I can use the middle click or maybe (Ctrl+Alt+Up) to a particular column across all lines in a long file? Currently, I am middle-clicking and then dragging this to the end of the screen and waiting for it to select all lines.
Specifically, for long files, how would I select one particular column across the entire file?
This should do it:
Ctrl+A - select all.
Ctrl+Shift+L - split selection into lines.
Then move all cursors with left/right, select with Shift+left/right. Move all cursors to start of line with Home.
OS X
You can click the following and drag to create a selection of one or more columns of characters:
Left mouse button + option
Middle mouse button
To add to an existing selection, hold command while doing the above.
To subtract from an existing selection, hold command + shift while doing the above
Windows
You can click the following and drag to create a selection of one or more columns of characters:
Right Mouse Button + shift
Middle Mouse Button
To add to an existing selection, hold Ctrl while doing the above.
To subtract from an existing selection, hold Alt while doing the above.
In Mac OS X, replace Ctrl with CMD key. So it'll be,
CMD+A - select all.
CMD+Shift+L - split selection into lines.
Then move all cursors with left/right, select with Shift+left/right. Move all cursors to start of line with Home.