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
|
-- automatically rebalance windows on vim resize
|
||||||
vim.cmd("autocmd VimResized * :wincmd =")
|
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")
|
vim.cmd("edit $VIMHOME/init.lua")
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("EditConfigPlugins", function()
|
vim.api.nvim_create_user_command("EditVimPlugins", function()
|
||||||
vim.cmd("edit $VIMPLUGINS")
|
vim.cmd("edit $VIMPLUGINS")
|
||||||
end, {})
|
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
|
" IdeaVIM mappings
|
||||||
nmap [c <Action>(VcsShowPrevChangeMarker)
|
nmap [c <Action>(VcsShowPrevChangeMarker)
|
||||||
nmap ]c <Action>(VcsShowNextChangeMarker)
|
nmap ]c <Action>(VcsShowNextChangeMarker)
|
||||||
|
nmap ]w <Action>(GotoNextError)
|
||||||
|
nmap [w <Action>(GotoPreviousError)
|
||||||
|
|
||||||
nmap <C-P> <Action>(SearchEverywhere)
|
nmap <C-P> <Action>(SearchEverywhere)
|
||||||
nmap gd <Action>(GotoDeclaration)
|
nmap gd <Action>(GotoDeclaration)
|
||||||
|
@ -22,16 +24,16 @@ nmap <leader>rn <Action>(RenameElement)
|
||||||
nmap <C-A-F> <Action>(FindInPath)
|
nmap <C-A-F> <Action>(FindInPath)
|
||||||
nmap <leader>tn <Action>(RunAnything)
|
nmap <leader>tn <Action>(RunAnything)
|
||||||
nmap <leader>tf <Action>(RunClass)
|
nmap <leader>tf <Action>(RunClass)
|
||||||
imap <C-K> <Action>(ParameterInfo)
|
xmap <C-K> <Action>(ParameterInfo)
|
||||||
nmap <C-K> <Action>(ParameterInfo)
|
nmap <leader>c <Action>(HideSideWindows)
|
||||||
nmap ]w <Action>(GotoNextError)
|
|
||||||
nmap [w <Action>(GotoPreviousError)
|
|
||||||
|
|
||||||
nmap <leader>db <Action>(ToggleLineBreakpoint)
|
nmap <leader>db <Action>(ToggleLineBreakpoint)
|
||||||
nmap <leader>dc <Action>(ChooseDebugConfiguration)
|
nmap <leader>dc <Action>(ChooseDebugConfiguration)
|
||||||
|
|
||||||
nmap <leader>ac <Action>(ShowIntentionActions)
|
nmap <leader>ac <Action>(ShowIntentionActions)
|
||||||
|
|
||||||
|
nmap <leader>tb <Action>(Annotate)
|
||||||
|
|
||||||
command! Start action Run
|
command! Start action Run
|
||||||
if &ide =~? 'rider'
|
if &ide =~? 'rider'
|
||||||
command! A action SwitchHeaderSource
|
command! A action SwitchHeaderSource
|
||||||
|
@ -51,5 +53,5 @@ command! TODO action ActivateTODOToolWindow
|
||||||
command! Term action ActivateTerminalToolWindow
|
command! Term action ActivateTerminalToolWindow
|
||||||
command! Sync action Android.SyncProject
|
command! Sync action Android.SyncProject
|
||||||
command! Format action ReformatCode
|
command! Format action ReformatCode
|
||||||
|
command! EditVimConfig e ~/.ideavimrc
|
||||||
nmap <leader>tb <Action>(Annotate)
|
command! ReloadVimConfig action IdeaVim.ReloadVimRc.reload
|
||||||
|
|
Loading…
Reference in New Issue