-
Notifications
You must be signed in to change notification settings - Fork 801
FEAT[VIM-268]: Completion for :e command #1341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # doc/IdeaVim Plugins.md # src/main/java/com/maddyhome/idea/vim/ui/ex/ExTextField.java
Maintenance: ExPanelBorder - Update copyright and remove redundant mo…
|
By the way, the code as it is can not be executed because an missing class in other part of the codebase: Locally, I had commented this errors in order to be able to launch IdeaVIM into the IDE and make sure the new feature works as I expected. I did not include this commented part in this pull request as it is responsablity of other maintainer. |
|
Hi, thanks for the feedback, I have made some improvements in order to behave better on input directory paths:
It is significant to notice that we can find to similar situations with different behaviors:
This is the same behavior as in Vim editor. Thanks a lot |

Hi, this is my implementation for the requested feature of TAB completion on :edit and :write commands [VIM-268].
My solution modifies the handler for VIM command line
com/maddyhome/idea/vim/ui/ex/ExTextField.kt. The handler updates the content in the command line when a character is input by the user, if not valid character it delegates the keystroke action.What I did was to intercept when TAB is input and try to add a completion if the command is supported. If the command is not supported (only works for :e, :edit, :w, :write) the execution follows the previous flow. If it is supported, the current argument is used to match potential file paths according the following logic:
This is the same behavior implemented in VIM or Neovim.
I have test it locally by running on the IDE but I have not developed unit test because I frankly don't know how I unit test this case. It is my first contribution to IdeaVim and I am not fully used to the codebase. I will be happy to receive your guidance and feedback.
Thanks!
Ricardo