IdeaVim: Append output of an external command in Rubymine


In Vim, running `:0read !date` inserts the current date on the current line.

Is there anyway we can make this work in idea vim ?


Permanently deleted user
Official comment

In IdeaVim `:read` is not supported yet. You can achieve the same results by selecting the current line in the visual mode and then invoking `!date`:


Say your caret is on the second line before `bar`:





You press `V` followed by `:!date` followed by <Enter>.

I want to create a keymap that inserts the current date.

Based on Andrey's reply, I added this line to my .ideavimrc:

> nmap _s V=:!date<CR>

But when I execute the mapping by typing "_s", IdeaVim does not insert the date as expected, instead it displays the date at the bottom of the editor window. I tried many different variations of the nmap command, but I did not find one that would insert the date.

Is defining a key mapping that inserts the current date/time possible?


Hi, you can achieve this by removing `=` from your keymap: `nmap _s V:!date<CR>`.


Please sign in to leave a comment.