-
Notifications
You must be signed in to change notification settings - Fork 9
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
inserting method from autocomplete doesn't place cursor correctly #31
Comments
Yes, you can tab through variable name and parameters using tab. The cursor is not placed at the first parameter because after examining methods of a class, you are likely to change the class name to a variable name first and only then fill the parameters. e.g
becomes
But on my editor cursor does not stay where enter was pressed. The class name (here CoreEntity) becomes selected automatically so that I can replace it, and after that I can cycle through all parameters using tab replacing them also. |
ah, yeah upon further inspection i can tab through the fields. however the first field selected in that example is it would be neat if variable names could get resolved to classes, however. should be possible with a clever regex routine. if i were to try to implement this where would i find the hook that generates autocomplete possibilities for a given variable? |
Check issue #8. It already resolves a variable name to a class in some cases. You can see this in action in the preview animation shown on readme,md. But it's still a really quick hack so by all means improve it, if you like. You can see these TODO comments there:
|
Currently it seeks variable declaration from previous 10 rows:
Just remove that and include some bracket matching to the regex and it should work much better already. |
And also scopeDescriptor mentioned in issue #8 might provide some useful information about current scope. |
when an autocomplete option is chosen, the cursor becomes invisible and the parameter class names are inserted (eg; java.lang.String). the cursor position stays where it was when enter was pressed. the expected behavior, imo, would be to place the cursor in the parameter field and be able to tab between them as if it were a snippet
The text was updated successfully, but these errors were encountered: