Support for cword in custom function? #723
-
Hi
and defined mapping as:
Unfortunately when I run it I get the following error:
As far as I understand Is there any option to get value of current word in custom function? Even if my problem can be simplified and achieved in different way I would like to know if that's possible as I have some other ideas in my mind to reuse that very useful possibility to get current word. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello! I attempted to create the same mapping a year ago, and this is what I had in my .ideavimrc (it's a bit rough, but you can grasp the general idea). However, a lot has changed over the year, and there might now be additional functions that could facilitate a smoother implementation (e.g., utilizing dictionary-related functions instead of lists).
IdeaVim is an open-source project, and any PRs with new functions are highly appreciated. You are very welcome to create a PR with any functions you need. Currently, the IdeaVim maintainers are focused on bug fixes and Fleet IDE support, so we are unable to add the expand function or any other function at the moment. You can find the list of supported functions here: functions part 1, I also recommend writing plugins in Kotlin. That's the reason I stopped using the script I wrote a year ago. IDE integration is what makes IdeaVim so powerful. If you create your own plugin for the IDE, you can invoke its actions via the |
Beta Was this translation helpful? Give feedback.
Hello!
I attempted to create the same mapping a year ago, and this is what I had in my .ideavimrc (it's a bit rough, but you can grasp the general idea). However, a lot has changed over the year, and there might now be additional functions that could facilitate a smoother implementation (e.g., utilizing dictionary-related functions instead of lists).