When you open brackets, parenthesis, and so on, IPython Notebook automatically closes it, leaving the cursor inside, ready to type the arguments. After typing, is there any shortcut out of the brackets other than the arrow key? (It would be nice to use TAB or some other key closer than the right arrow).
Related
I created a keyboard shortcut for Matchit: Jump Items to run on shift+5 (%) when editorTextFocus.
I diid this so that I could easily jump from opening to closing tag in HTML. I use VSCode in Vim mode where that key binding will jump from opening to closing brackets/braces/quotes/whatever by default.
My problem is that now I cannot get a percent sign to appear in my code as when I type it, the cursor jumps to the closest closing element (tag, brace, bracket, etc). When I removed that shortcut, not only does it not jump from opening to closing tag, it no longer works for braces/brackets/quotes/whatever. Not sure why that is since it is built into Vim and does not require Matchit.
Is there a way to specify that the key binding should not apply when my cursor is in insert mode? or is there a better way to configure things so that I get that functionality (jumping to closing tag, quotes, paren, brace, etc), but can also actually type the % character?
If I select something using any of the various methods Atom (and other packages provide) and want to leave the cursor where it's at, but undo the selection itself, is there a way to do that with a keyboard shortcut?
I tried Esc, but to no avail. I can easily use the arrow keys, or click with the mouse, but I'd rather hit a shortcut without having to move my hands off home row. Lazy me. :)
If you really want that home row, no mouse efficiency, consider installing Vim-Mode-Plus on atom. I'm using it, and when I press escape, it removes the highlighting.
Example: when you want to type single left quote, doublequote, bracket, curly bracket etc... at once right element is inserted by IDE automatically.
It was expected that simple ctrl+z combination would remove autocompletion but it wouldn't.
Because of that I have to press right arrow plus backspace and it slows down type performance significantly.
Is there related hotkey?
I'm using IDEA 14.
Using delete instead of -> and backspace you have single press of a key.
Alternatively, you can turn automatic insertion in settings:
In IdeaVIM, if I extract a variable and want to name it, it seems like I'm in visual mode (the name of the variable is highlighted), yet I can't figure out a way to change what's highlighted. Here's an image:
If I type c, it doesn't do anything. If I type cc, it changes the whole line. Basically, it acts like I'm in command mode yet the name is highlighted as if it's in visual mode. What I want to do 99% of the time is change this word. Yet, the cursor is annoyingly one character after the word so ciw doesn't change it.
What's a convenient way to rename this variable? I've normally done hciw. I'd prefer that "extract variable" put me directly into insert mode, though.
It's a little counterintuitive, but the easiest thing to do is just immediately hit i to enter insert mode, then start typing the new name, and it will replace the highlighted text.
The problem, as I see it, is that vim is modal and vanilla IntelliJ is also modal, and what you have here is the interaction of two sets of modes. To understand the IntelliJ modes, try turning off IdeaVIM with ^Z and use the extract variable refactoring. Notice how if you start typing right away, what you type replaces the selected text, but if you move the cursor first and then start typing, what you type is inserted at the cursor. Now add IdeaVIM to the mix: once you are in insert mode, IntelliJ's behavior kicks in.
See VIM-274 for a request to change this behavior and some discussion of alternatives.
For "Extract Variable" once you've got to the point where it's suggesting names:
What always works is pressing Escape, b, cw and then typing the new name.
Sometimes you can press b right away, but often that puts me into visual mode for some reason, so pressing Escape is guaranteed.
I want to move the cursor from here:
To here:
in a single step. Is there any such keyboard shortcut?
Right now I first have to enter the right arrow, then comma and then space which is a task quite cumbersome on my keyboard.
No there isn't but you could create a live template to get something simpler. So you can create a live template live this:
$PARAMONE$, $PARAMTWO$, $PARAMTHREE$, $PARAMFOUR$ $END$
And you can call this param4, and once you type that in, and press tab, it will load up areas that you can type into and just press tab to get from one param to the other.
Other than that, there's no way I know of to do this.