Add basic config edit and relaod commands to nvim and ideavim
parent
5ad0f13c57
commit
c6ff26368d
|
@ -40,10 +40,15 @@ vim.cmd("set path+=**")
|
|||
-- automatically rebalance windows on vim resize
|
||||
vim.cmd("autocmd VimResized * :wincmd =")
|
||||
|
||||
vim.api.nvim_create_user_command("EditConfigInitLua", function()
|
||||
vim.api.nvim_create_user_command("EditVimConfig", function()
|
||||
vim.cmd("edit $VIMHOME/init.lua")
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("EditConfigPlugins", function()
|
||||
vim.api.nvim_create_user_command("EditVimPlugins", function()
|
||||
vim.cmd("edit $VIMPLUGINS")
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("ReloadVimConfig", function()
|
||||
require("plenary.reload").reload_module("esensar", true)
|
||||
vim.cmd("source $MYVIMRC")
|
||||
end, {})
|
||||
|
|
|
@ -13,6 +13,8 @@ set idearefactormode=keep
|
|||
" IdeaVIM mappings
|
||||
nmap [c <Action>(VcsShowPrevChangeMarker)
|
||||
nmap ]c <Action>(VcsShowNextChangeMarker)
|
||||
nmap ]w <Action>(GotoNextError)
|
||||
nmap [w <Action>(GotoPreviousError)
|
||||
|
||||
nmap <C-P> <Action>(SearchEverywhere)
|
||||
nmap gd <Action>(GotoDeclaration)
|
||||
|
@ -22,16 +24,16 @@ nmap <leader>rn <Action>(RenameElement)
|
|||
nmap <C-A-F> <Action>(FindInPath)
|
||||
nmap <leader>tn <Action>(RunAnything)
|
||||
nmap <leader>tf <Action>(RunClass)
|
||||
imap <C-K> <Action>(ParameterInfo)
|
||||
nmap <C-K> <Action>(ParameterInfo)
|
||||
nmap ]w <Action>(GotoNextError)
|
||||
nmap [w <Action>(GotoPreviousError)
|
||||
xmap <C-K> <Action>(ParameterInfo)
|
||||
nmap <leader>c <Action>(HideSideWindows)
|
||||
|
||||
nmap <leader>db <Action>(ToggleLineBreakpoint)
|
||||
nmap <leader>dc <Action>(ChooseDebugConfiguration)
|
||||
|
||||
nmap <leader>ac <Action>(ShowIntentionActions)
|
||||
|
||||
nmap <leader>tb <Action>(Annotate)
|
||||
|
||||
command! Start action Run
|
||||
if &ide =~? 'rider'
|
||||
command! A action SwitchHeaderSource
|
||||
|
@ -51,5 +53,5 @@ command! TODO action ActivateTODOToolWindow
|
|||
command! Term action ActivateTerminalToolWindow
|
||||
command! Sync action Android.SyncProject
|
||||
command! Format action ReformatCode
|
||||
|
||||
nmap <leader>tb <Action>(Annotate)
|
||||
command! EditVimConfig e ~/.ideavimrc
|
||||
command! ReloadVimConfig action IdeaVim.ReloadVimRc.reload
|
||||
|
|
Loading…
Reference in New Issue