Neither Ctrl+T nor Ctrl+O in IdeaVim always return to the previous location when jumping to something in any way.
Yes, after something like Ctrl+], you can jump back to where you came from using Ctrl+O. But there are all kinds of different ways to jump around.
I would like a set of shortcut keys that makes it consistently jump back to where I came from, regardless of how it jumped to something. Be it through a Vim action, or an IDE action, Ctrl+O, and Ctrl+I ought to just let me go back and forth. Right now, it seems like a horrible confusing frustrating mess.
Add nmap <C-o> :action Back<CR> to your .ideavimrc file in your home folder.
This back navigation behavior will work better than the default one.
Right now IdeaVim uses its own jump history not integrated with the jump history of IntelliJ. Feel free to vote for VIM-44.
Related
I'm using idea as my java ide. I don't know which keys I have pressed, There appeared a little square ahead of the project name.
Is there anyone help tell what's this and what impact it has.
You bookmarked the folder and you may view it in favorites. After you open favorites, you may delete it by clicking the (-) on the bottom left corner.
Also there is a bug i think. If it still shows-up after you remove from the bookmarks - switch theme to another one and go back to original one again. It disappears.
I am using IntelliJ IDEA Ultimate v 13.1, and I am fond of using key board short cuts, rarely use mouse. I am relatively new to this IDE as earlier I always worked on eclipse.
My question is about performing right click operations by pressing the right click key on key board (usually found near the right side Ctrl key on external key boards). The problem is when I press this key, nothing happens but when I click the mouse right click and things just happen. This is applicable on editor, project explorer and I guess everywhere in the IDE.
Is there a switch I should turn on and it will work or any other way to get key board right click work in IDEA? Thanks very much for your responses.
I know it is an old question, but it popped up as 1st result when I searched for my issue, and I figured it out with some of the context in Ketan#'s answer.
Fix:
Go to File -> Settings -> Keymap
Search for "Show Context Menu"
Add a new keyboard shortcut. When prompted, press the "right click" (aka "context menu") key.
For me, It simply works after just restart the IntelliJ IDE
Sometimes accidents just happen for good! This one falls in that category :)
Somehow IDEA was unable to load any of my projects, and I thought of deleting '.IntelliJIdea13' directory from my user directory. Initially I didn't change my keymap (shortcuts) to Eclipse and right click just works fine.
In any case the problem is there for IntelliJ to fix. They should allow right click from keyboard to work even when shortscuts are mapped to Eclipse style.
I tried to change the shortcuts to Eclipse and keyboard right click stopped working. When I change it to default, it starts working.
If you was installed it with jetbrains toolbox you can't made it easily.
I made a script written in php but you could adapt it to other languages:
https://gist.github.com/firegore2/0ba76d74f070b07eda5a12f3f24ba054
In Eclipse I could hit Ctrl+O and get a popup which I could use to get an overview of everything in the current class, pick an entry, and jump to it.
In idea, there is Alt+7, but I have a few issues with it. First, the keyboard doesn't seem to put its focus there. I have to take my hand off the keyboard and use the mouse to place the focus on the Structure dock.
I also don't like how it's taking up real estate. I don't want to change how things are laid out if I want to see the structure. I would like a more non-invasive popup, and handier and snappier.
Is there another feature that gives me quick access in the form of a popup preferably, like Ctrl+O provides in Eclipse?
Another nice feature would be to be able to use the J and K keys to move up and down the selection, instead of having to use the cursor keys. I'm using IdeaVim, so the normal workflow when editing files, is that both hands stay in a touch-type position. It would be nice if I can use the various navigation features also using vim keys...
Perhaps there is a way to enable this, that I haven't discovered yet?
IntelliJ equivalent of Eclipse's CTRL+O is CTRL+F12 (⌘+F12 on Mac), which will give you more or less the same pop-up as in Eclipse. But I'm not sure if it can be navigated using j and k keys.
More details can be found in the IntelliJ help.
I'm using PHPStrom v 8.0.2
While i was hit command-Z to undo thing.
The editor jump around to somewhere but not to the cursor as illustrated image.
That makes me very annoyed.
Is this a bug or have i setting something wrong?
HERE IS HOW TO REPRODUCE
Edit any line
Place the cursor far... far away from the edit line
Hit command-Z to UNDO thing <-- The editor will jump to the edited line
Hit command-shift-Z to REDO thing, the editor jump back to the line in (2) <--- NO... IT SHOULD NOT
Seem like Jetbrains does fix this in PHPStorm v9 EAP.
But that program will expired after 30 days, Any where to implement this in PHPStorm v8.0.3 please?
One more thing, I can't find any keyboard shortcut key for auto indent for the whole document, please advise.
Best Regards,
This seems to be Intellij default behavior; it treats cursor movements as edit actions and as such they are being undone and redone.
See this post
I use ctags with my Vim and I rely heavily on C-] and C-T to tag back and froth between various functions in my project.
But if the function is in a different file, I'd like Vim to automatically open it in a new tab instead of the current tab. If I pop my tag stack using the C-T, I'd like it go back to the original tab where I pressed by C-] instead of changing the file in the current tab. I don't like to have the same file opened in multiple tabs in Vim. This is the normal behavior for most IDEs and I am wondering if there is a way to do this in Vim?
nmap <C-Enter> <C-w><C-]><C-w>T
Does this help ? You could probably figure out something similar for the way back.
Well, we need to decide what would be the wanted behaviour. We can go back to the original tab (not sure how, still investigating) but then the above given mapping is gonna open a new tab next time. So you'll end up with a lot of tabs after a while.
Or we can do <C-w>C, which will close the opened tab and take us back to the original one. I, personally, prefer this way of working (that way I don't lose my position in the file)
I go to the function I want, make my corrections there then return to the original file from which I started.
Let me know, what would you like (this didn't fit in comments so I put the answer here).
This might point you in the right direction:
http://vim.wikia.com/wiki/Open_every_buffer_in_its_own_tabpage
So, this is a feature I would like to see as well.
I'm not sure if it's possible.
What I usually do is
:tabnew
:tag somepartsoffunction*
and press tab to use globbing to easily find tag.
Sure, it's not an ideal solution, but it works most of the time.
Unfortunately, with VIM tabbing isn't totally integrated since it's a new feature since 7.0. Most people I know that use VIM weren't even aware of tabs until I told them, so with that, I have a feeling there is no way to do it right now.
(I would love to be proven wrong)