Does anyone know a keyboard shortcut to move your cursor position to highlighted "found" text?
Ex: I press Ctrl+F and type "foo", this will bring me to the first instance of foo in the document.
Now I want a keyboard command to place my cursor next to this instance of foo so I can edit the text that is next to it.
I think I don't get your problem, but that's really much the default behaviour.
Anyway, I recommend incremental find (default keybinding is ctrl+i).
It searches from the current position and the panel is closed afterwards (which is what I want all of the time).
If you press escape in the search bar, the cursor does not move. If you press enter it jumps right to the next occurence.
If you want to put a cursor at each instance of found text in Sublime Text 3
CMD + F to search for text
click the Find All button on the right side of the find bar (bottom right of window)
You should then have an active cursor at the end of each found string of text
On the mac it's command G.Windows, maybe ctrl G?
Related
In Vim, you can press fx and Fx to move to the next and previous occurrence of x on the same line:
**fx** - jump to next occurrence of character x
**Fx** - jump to previous occurence of character x
source: https://vim.rtorr.com/
I don't wish to use a vim emulator in VS Code, I instead would like to bind Ctrl+f to forward search and Ctrl+b for backwards search.
How can I do that?
I just posted an extension (I'm pretty sure you can't do it without an extension) that does what you want: Jump and Select
It does a little more than you want in case other people would like the selection option. You can bind any keybinding to the commands you want. The following demo uses Alt+f for forward and Alt+b for backward.
Note that the key you want to go to is not displayed. And you don't have to hit Enter to trigger the move - it just goes there immediately. And it works with multiple cursors.
Also, I am not familiar with vim. If you go back to some designated previous character, should the cursor end up before or after that character? Right now it goes to that character (so the cursor is after it) but it is easy for me to make to change that behaviour in the extension. Just let me know.
In VSCode, "find next" is performed by Ctrl+G (Cmd in MacOS) and "find previous" by Ctrl+Shift+G.
You can edit the keyboard shortcuts by going to Code > Preferences > Keyboard Shortcuts and looking for both "Find Next" and "Find Previous", and hovering over the keybinding to edit it to your preference.
I want to use vscode with out mouse,purely.When I press F1 to run some command or something else that can launch a drop-down suggestion list,it`s inconvenience to move up and down by arrow keys.So,my question is:Is there any way to set a key that can select one of the candidates immediately,like alt 1~9?
Not sure about selecting one of the candidates immediately, but you can rebind the up and down arrow keys to something like alt+j and alt+k that's closer to the home row.
Go to keyboard shortcuts via ctrl+,
Then search up workbench.action.quickOpenSelectNext, double click the entry and type your desired keyboard combination. Repeat for workbench.action.quickOpenSelectPrevious.
I want to change all default keyboard shortcuts starting with 'Ctrl + K' to something else (say 'Alt + K'). Is there any way in Visual Studio Code to do that at once?
I know that it can be done by selecting one Keyboard shortcut at a time, but is there a way to do this all at once, something similar to Find/Replace of keyboard shortcuts?
This might help:
f1 -> open keyboard shortcuts.
Press brackets button on top right.
Cut all of your preferences and save them in another file without the first and last square brackets.
First step again.
Search for ctrl k.
Select the first one - press and hold delete -> Delete all of them (This is easy!).
On the top right click on the brackets button. (Open keyboard shortcuts(json)).
Deleted shortcuts have been added to this file with a - behind them on the command value. Each have an opening bracket, key value, command value, and closing bracket.
Select one of the opening brackts, then press and hold ctrl+d.
Double press down arrow, then home button.
Delete the first - from all of the command values with this trick.
Then go to the key values and change them all to what you want. Please note that some of them may be in ctrl+k+... form, but some others in ctrl+alt+k+... or ctrl+shift+k+... form. You can't change them with this trick!
When navigating in Eclipse editor I use two possibilities to scroll text:
Shortcut "Ctrl + cursor down" (keyboard arrow key) -> scroll lines, but the cursor stays at same line
"Cursor down" with the keyboards arrow keys -> cursor moves to last line of visible editor, then the text starts scrolling
Is there a combination of both? I use Ctrl + cursor down extensively for good overview, but when I find the line to edit, I have to set the cursor to the line again (with the mouse).
I have created an Eclipse plug-in which adds a command for this.
It is named Laid Editor Utilities and can be installed from the plug-in update site:
https://bitbucket.org/lii/laid_language_tools/src/master/se.lidestrom.laid.update_site/
The command is named Scroll With Caret Line Up / Down. By default it has the keyboard shortcuts Ctrl + Alt + C U/D (it's best to to change this to something more convenient).
The plugin also contains some other new editor actions, see project page for more information.
IMHO there is no such short cut. In fact how editor should know which line you want to edit while scrolling, is it the first visible line or the last or in between?
Closely you can use the short cut key Ctrl + L to jump to a given line, as you aleady holding the Ctrl key while scrolling, just press L and type the line number you want to be in and press OK. Then the caret will be placed on the line you want to edit.
I have bandage due to 5th metacarpal damage. Typing is no issue at all, I do hours of it and it's fine. Using a mouse... impossible. This is not about being a productivity ninja not losing the time it takes to reach for the trackpad or the mouse... it's actual being able to do some stuff or not at all for the moment. Anyway, here's the question, put simply and clearly:
In an Eclipse editor, can I move around using the keyboard only?
Examples of actual things I would like to be able to do without using a mouse:
Move the cursor to the end of the line
Move the cursor to the beginning of the line
Move the cursor one line down
Move the cursor one line up
Move the cursor one column left
Move the cursor one column right
Move the cursor one word left
Move the cursor one work right
Move the cursor to the end of the word
Move the cursor to the beginning of the word
Delete the character to the left of the cursor
Delete the character to the right of the cursor
etc.
I realise some of this is possible already using a mixture of END, HOME, CTRL/ALT + ARROW_KEY, etc. But it's not as comprehensive as, say, E-Macs or Vim.
As simple as that.
In Vim, I use j,k,h,l... in Xcode I use Emacs bindings (CTRL-N, CTRL-P, CTRL-H)... how can I use Eclipse in a similar way? I have heard of a "vim" plug-in but I really just need the cursor movement, that's it. Nothing else.
Should I just create custom shortcuts for each movement?!
Going to the end of the line: End key
Going to the start of the line: Home key
Going one line down: down arrow key
Move the cursor one line up: up arrow key
Move the cursor one column left: don't know what you mean by column
Move the cursor one column right: idem
Move the cursor one word left: ctrl - left arrow key
Move the cursor one word right: ctrl - right arrow key
Move the cursor to the end of the word: no idea
Move the cursor to the beginning of the word: ctrl - left arrow key
Delete the character to the left of the cursor: backspace
Delete the character to the right of the cursor: delete
This is on Windows. All the shortcuts are available in Window (Alt W) - Preferences (P) - General - Keys (type "Keys" in the filter text box). Most of the shortcuts above are standard shortcuts, which are used in every windows editor.
I found it :(
Preferences > General > Keys > Emacs
You can do almost everything with your keyboard:
Take a look here for a detailed list of shortcuts:
http://www.shortcutworld.com/en/win/Eclipse.html