Replies: 2 comments
-
I'd also like to know this. I'm trying to write a small vimscript function that runs different types of Rider formatting actions based on the filetype, along with some custom cleanup once it's finished. But I can't find any way to get the filetype or filename -- |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm using a workaround by abusing the clipboard like: function! FilePath()
let l:original_clipboard = @+
exec 'action CopyPathFromRepositoryRootProvider'
let l:file_path = @+
let @+ = original_clipboard
return file_path
endfunction For other path action types:
Side effect: status bar displays "... has been copied". |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to write a short utility function which allows to jump quickly between files differing only in their file extension.
I.e. between
.h
and.c
, or between.ts
, and.html
.Maybe even something more general like jumping between between
MyClass.java
andMyClassDto.java
or something.I noticed however, that the
%
and#
registers are not supported. I opened an issue for this, because I didn't not find one that addressed this.#
is however supported as a special-case argument to:e
.Likewise, VimScript lacks functions like
expand
, or:h filename-modifiers
like:t
or:p
.So, is this (barely) possible in "IdeaVimScript", or is there some workaround, like using a different language or invoking Intellij commands something else?
Beta Was this translation helpful? Give feedback.
All reactions