Skip to content
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

How to make it work? #77

Closed
SelaOZ opened this issue Oct 13, 2024 · 3 comments
Closed

How to make it work? #77

SelaOZ opened this issue Oct 13, 2024 · 3 comments

Comments

@SelaOZ
Copy link

SelaOZ commented Oct 13, 2024

I did this: Activate the plugin in your .ideavimrc file with set which-key

But nothing happens no matter what key I press, how can I view the window with all the commands like shown in the image of the plugin?

Is there a specific key or shortcut to view that screen?
I don't see anything specific in the docs.

@TheBlob42
Copy link
Owner

Just to be sure have you read this part of the README file? (right at the start underneath the GIF)

Which-Key only displays available keybindings, it will not set them for you (#44, #46)
For a "complete" setup you might have a look at intellimacs (which was used for the GIF above)

If this is not the problem here, please share your .ideavimrc file here for further investigation

@SelaOZ
Copy link
Author

SelaOZ commented Oct 13, 2024

It's the default:

" .ideavimrc is a configuration file for IdeaVim plugin. It uses
"   the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc


"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5

" Do incremental searching.
set incsearch

" Don't use Ex mode, use Q for formatting.
map Q gq

" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins

" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'


"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)

"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)

"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)

set which-key
set timeoutlen=5000

I don't want to set keybindings, I want to view the available vim commands and I use the default, I want to view the screen in the plugin's image with all of the available commands:
image

but only in very few occasions such as pressing g I see a window with a few commands:
image

@TheBlob42
Copy link
Owner

The commands in the screenshot are NOT the defaults. These are all manually set keybindings (in this case using the intellimacs project). Have a read here or check this issue here.

The popup you are seeing is for the tpope/vim-commentary plugin which you have activated. This plugin sets new keybindings (e.g. gcc) which are then shown by which-key. The keybindings from the screenshot (e.g. <Space>w-) are not set by default. But if you create a keybinding for it, it will be shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants