Is it possible to express the escape key from from a mapping such as:
nnoremap <leader>1 iprintln("======")(...escape here...)
In actual Vim I would do this by typing ctrl-v then the escape key, but this does not seem to work in IdeaVim. Is there another way to do this?
External filters do not seem to work for me in Idea
In vim we can filter text through external script like this:
Having a cursor on a line like this:
something
I execute command:
:.! echo __$(cat)__
And get a line:
__something__
In Idea this doesn't seem to work.
:.! echo __$(cat)__
just returns the string __$(cat)__
as is.
:.! echo foo
or :.! cat
or :.! ls
work like expected though - they insert the results of these commands
But for example:
This works in vim:
:.! ruby -e 'puts 777'
(it will insert 777 at current line)
But in Idea it just deletes current line for some reason.
%g/pattern/normal @q
Hello everyone,
I assigned a new macro in ~/.ideavimrc file but for some reason, it does not work. The macro works when I source the ~/.ideavimrc file in separate VIM but does not work in PyCharm. What could be the cause of this? Maybe it's a bug?
Macro: let @z = ':%s/"""_.{-}"""_s*//'
Thanks!
Hello everyone,
I assigned a new macro in ~/.ideavimrc file but for some reason, it does not work. The macro works when I source the ~/.ideavimrc file in separate VIM but does not work in PyCharm. What could be the cause of this? Maybe it's a bug?Macro: let @z = ':%s/"""_.{-}"""_s*//'
Thanks!
Ok, its solved! I had a mistake in the regex pattern. It should have been: let @z = ':%s/"""_.{-}"""_s*//'
source ~/.vimrc
at the top of my .ideavimrc
but this no longer seems to work. This must have been one of the resent upgrades but I just didn't notice it. Do I now need to specify this in my .ideavimrc
?
command! MyCommand <action>(Whatever.Action)
) support ranges? I'm trying to make my "actual-vim" and IdeaVim setups as similar as possible to one another, and I use the '<,'>GBrowse
command provided by fugitive.vim a lot in actual vim, so I'd like to define a similar range-accepting command in my .ideavimrc
to map it to the Github.Open.In.Browser
IDE action, but whenever I try command! -range GBrowse <action>(Github.Open.In.Browser)
, IdeaVim complains that "custom commands must begin with an uppercase letter" (which leads me to believe that it's not accepting the -range
option)
nnoremap <c-j> <Esc>
and inoremap <c-j> <Esc>
in IdeaVim in Rider. The mapping works in principle, but it doesn't close the autocomplete window. If I also bind "Escape" in the IDE settings to Ctrl+J, it does work to close the completion popup, but I have to press it twice to then also leave insert mode.Hello, I would like to create a custom command in my .ideavimrc. How can I find the list of menu commands that are supported. In Vim I have a :Tidy
command that reformats files. In my .ideavimrc I have
command! Tidy action ReformatFile
When I enter :Tidy
, the status bar indicates
VIM - Action not found: ReformatFile
Hi, buddies~ I want to remap the multiple-cursor plugin and tried this config.
But this won't work. I don't know how to toggle on this multiple-cursor function.
set vim-multiple-cursors
" Remap multiple-cursors shortcuts for Mac
nmap <C-n> <Plug>NextWholeOccurrence
xmap <C-n> <Plug>NextWholeOccurrence
nmap g<C-n> <Plug>NextOccurrence
xmap g<C-n> <Plug>NextOccurrence
nmap <C-x> <Plug>SkipOccurrence
xmap <C-x> <Plug>SkipOccurrence
nmap <C-p> <Plug>RemoveOccurrence
xmap <C-p> <Plug>RemoveOccurrence