diff --git a/.ideavimrc b/.ideavimrc index dc152aa..f4aa32a 100644 --- a/.ideavimrc +++ b/.ideavimrc @@ -64,6 +64,10 @@ set matchit " Key maps +" Variables for custom keymaps based on the current IDE flavor (:echo &ide). +" https://github.com/JetBrains/ideavim/discussions/375 +let is_ide_rider = &ide == 'JetBrains Rider' + " https://www.lazyvim.org/configuration/keymaps " To track Action-IDs @@ -255,6 +259,7 @@ nmap cc :echo 'There is no equivalent mapping for Run Codelens.' nmap cC :echo 'There is no equivalent mapping for Refresh & Display Codelens.' " Rename File nmap cR (RenameFile) +if is_ide_rider | nmap cR (RiderRenameFile) | endif " Rename nmap cr (RenameElement) " Source Action @@ -445,26 +450,33 @@ nmap du (ActivateDebugToolWindow) " Run Last nmap tl (Run) +if is_ide_rider | nmap tl (RiderUnitTestRunCurrentSessionAction) | endif " Show Output nmap to (ActivateRunToolWindow) +if is_ide_rider | nmap to (ActivateUnitTestsToolWindow) | endif " Toggle Output Panel nmap tO (ActivateRunToolWindow) +if is_ide_rider | nmap tO (ActivateUnitTestsToolWindow) | endif " Run Nearest nmap tr (RunClass) +if is_ide_rider | nmap tr (RiderUnitTestRunContextAction) | endif " Toggle Summary nmap ts :echo 'Not yet implmented.' " Stop nmap tS (Stop) " Run File nmap tt (RunClass) +if is_ide_rider | nmap tt (RiderUnitTestRunContextAction) | endif " Run All Test Files nmap tT :echo 'Not yet implmented.' +if is_ide_rider | nmap tT (RiderUnitTestRunSolutionAction) | endif " Toggle Watch nmap tw :echo 'Not yet implmented.' " nvim-dap " Debug Nearest nmap td (ChooseDebugConfiguration) +if is_ide_rider | nmap td (RiderUnitTestDebugContextAction) | endif " Neovim mappings " https://neovim.io/doc/user/vim_diff.html#_default-mappings