Useful customizations in .ideavimrc

后端 未结 4 1867
借酒劲吻你
借酒劲吻你 2021-02-07 10:03

I\'m interested in hearing how some of you have customized your .ideavimrc file to improve your workflows within your Jetbrains IDE. I\'m unsure of its capabilities and would lo

相关标签:
4条回答
  • 2021-02-07 10:14

    You can check out this or this configuration.
    Also, bear in mind, that you can record a macro (Edit > Macros > Start Macro Recording), and reference it later in your .ideavimrc file like so:
    nmap csw' :action Macro.surround_with_single_quote<CR> To find out action commands, use :actionlist

    0 讨论(0)
  • 2021-02-07 10:18

    Running :actionlist gives the list of possible actions

    $Copy                                              <M-C>
    $Cut                                               <M-X> <S-Del>
    $Delete                                            <Del> <BS> <M-BS>
    Actions.ActionsPlugin.GenerateToString
    ActivateAntToolWindow
    ActivateCommitToolWindow                           <M-0>
    ActivateDatabaseChangesToolWindow
    ActivateDatabaseToolWindow
    ...
    ...
    
    0 讨论(0)
  • 2021-02-07 10:19

    Basically you can safely source your ~/.vimrc, but be aware that some tricky :map commands may break IntelliJ shortcuts (that was the reason why IdeaVim switched to its own configuration file instead of ~/.vimrc). The only non-Vim command supported by now (v 0.39) is :action. You can define multi-key bindings for IntelliJ actions instead of crazy shortcuts for 3 or more fingers. For example:

    nnoremap ,c :action GotoClass<CR>
    
    0 讨论(0)
  • 2021-02-07 10:25

    Here are some useful materials that helped me write my .ideavimrc:

    set commands that work in IdeaVim.

    Jetbrains specific actions (You can also see this list with :actionlist)

    You map these actions in .ideavimrc like:

    nnoremap gd :action GotoDeclaration<CR>

    0 讨论(0)
提交回复
热议问题