dotfiles/.ideavimrc

213 lines
7.4 KiB
Text
Raw Normal View History

2024-07-14 11:53:45 -05:00
set number relativenumber
set ideajoin
set linenumber
set showmode
set showcmd
set incsearch
set hlsearch
set scrolloff=10
set visualbell
set ignorecase
set smartcase
2024-09-04 23:25:07 +00:00
set incsearch
set hlsearch
2024-07-14 11:53:45 -05:00
set notimeout
2025-01-21 20:17:38 -06:00
" set clipboard+=unnamedplus
set clipboard^=ideaput
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" 3rd party
set which-key
set surround
set highlightedyank
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Which Key
let g:WhichKey_FontSize = 16
let g:WhichKey_CommandColor = "#41ead4"
let g:WhichKey_PrefixColor = "#f335b2"
let g:WhichKey_SortOrder = "by_key_prefix_first"
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" NerdTree
2024-07-14 17:38:22 -05:00
Plug 'preservim/nerdtree'
2024-09-04 23:25:07 +00:00
nnoremap <C-n> :NERDTree<CR>
2024-07-14 11:53:45 -05:00
2024-07-14 17:38:22 -05:00
let g:NERDTreeWinSize=30
let g:NERDTreeMapPreview=0
let g:NERDTreeMapActivateNode='l'
let g:NERDTreeMapJumpParent='h'
2024-07-14 11:53:45 -05:00
2024-09-04 23:25:07 +00:00
let mapleader=" "
2024-07-14 11:53:45 -05:00
" Manage Projects
noremap <C-Space>s :action ManageRecentProjects<CR>
" Tab Navigation
2024-07-29 05:04:34 -05:00
noremap <S-l> :action NextTab<CR>
noremap <S-h> :action PreviousTab<CR>
2024-07-14 11:53:45 -05:00
" Pane Navigation
2024-07-17 05:06:35 -05:00
sethandler <c-j> a:vim
sethandler <c-k> a:vim
2024-07-14 11:53:45 -05:00
noremap <C-h> <C-w>h
noremap <C-l> <C-w>l
noremap <C-k> <C-w>k
noremap <C-j> <C-w>j
2024-09-04 23:25:07 +00:00
" Center Screen with Page up and down
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
2024-09-04 15:56:35 -05:00
2024-07-20 17:01:22 -05:00
" Navigation
let g:WhichKeyDesc_GoToFile = "<leader>ff Go to file"
let g:WhichKeyDesc_RecentFiles = "<leader><leader> Recent files"
let g:WhichKeyDesc_RecentLocations = "<leader>fl Recent locations"
let g:WhichKeyDesc_NewScratchFile = "<leader>fs New scratch file"
2024-07-14 11:53:45 -05:00
map <leader>ff <action>(GoToFile)
map <leader><leader> <action>(RecentFiles)
map <leader>fl <action>(RecentLocations)
" Window Management
2024-07-20 17:01:22 -05:00
let g:WhichKeyDesc_WindowManagement = "<leader>% Window management"
let g:WhichKeyDesc_SplitVertically = "<leader>% Split vertically"
let g:WhichKeyDesc_SplitHorizontally = "<leader>\" Split horizontally"
let g:WhichKeyDesc_CloseContent = "<leader>x Close content"
2024-07-14 11:53:45 -05:00
map <leader>% <action>(SplitVertically)
map <leader>" <action>(SplitHorizontally)
2024-09-04 23:25:07 +00:00
map <leader>x <action>(CloseContent)
2024-07-14 11:53:45 -05:00
" Popup Navigation
inoremap <C-j> <Action>(PopupMenu-selectNext)
inoremap <C-k> <Action>(PopupMenu-selectPrev)
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Debug options
2024-09-04 23:25:07 +00:00
let g:WhichKeyDesc_debug = "<leader>d Dubug"
let g:WhichKeyDesc_debug_menu = "<leader>dd Dubug menu"
let g:WhichKeyDesc_debug_run = "<leader>dr Dubug Run"
let g:WhichKeyDesc_debug_stop = "<leader>ds Dubug Stop"
let g:WhichKeyDesc_debug_breakpoint = "<leader>db Toggle Line Breakpoint"
map <leader>dd <Action>(Debug)
map <leader>dr <Action>(Run)
map <leader>ds <Action>(Stop)
map <leader>db <Action>(ToggleLineBreakpoint)
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Actions
2024-07-20 17:01:22 -05:00
let g:WhichKeyDesc_Actions = "<leader>a Actions"
let g:WhichKeyDesc_ShowIntentionActions = "<leader>am Show intention actions"
let g:WhichKeyDesc_SearchEverywhere = "<leader>as Search everywhere"
2024-07-14 11:53:45 -05:00
map <leader>am <action>(ShowIntentionActions)
map <leader>as <action>(SearchEverywhere)
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Refactoring
2024-07-20 17:01:22 -05:00
let g:WhichKeyDesc_Refactoring = "<leader>r Refactoring"
let g:WhichKeyDesc_RenameElement = "<leader>rn Rename element"
let g:WhichKeyDesc_ExtractMethod = "<leader>re Extract method"
let g:WhichKeyDesc_IntroduceVariable = "<leader>rv Introduce variable"
let g:WhichKeyDesc_IntroduceField = "<leader>rf Introduce field"
let g:WhichKeyDesc_ChangeSignature = "<leader>rs Change signature"
let g:WhichKeyDesc_QuickListPopupAction = "<leader>rr Quick list popup action"
2024-07-14 11:53:45 -05:00
map <leader>rn <action>(RenameElement)
map <leader>re <action>(ExtractMethod)
map <leader>rv <action>(IntroduceVariable)
map <leader>rf <action>(IntroduceField)
map <leader>rs <action>(ChangeSignature)
map <leader>rr <action>(Refactorings.QuickListPopupAction)
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Go To Code
2024-07-20 17:01:22 -05:00
let g:WhichKeyDesc_GoToCode = "<leader>g Go to code"
let g:WhichKeyDesc_GoToDeclaration = "<leader>gd Go to declaration"
let g:WhichKeyDesc_GotoTypeDeclaration = "<leader>gy Goto type declaration"
let g:WhichKeyDesc_GotoImplementation = "<leader>gi Goto implementation"
let g:WhichKeyDesc_ShowUsages = "<leader>gu Show usages"
let g:WhichKeyDesc_GotoTest = "<leader>gt Goto test"
let g:WhichKeyDesc_Back = "<leader>gb Back"
2024-09-04 23:25:07 +00:00
let g:WhichKeyDesc_Forward = "<leader>gf Forward"
2024-07-14 11:53:45 -05:00
map <leader>gd <action>(GoToDeclaration)
map <leader>gy <action>(GotoTypeDeclaraton)
map <leader>gi <action>(GotoImplementation)
map <leader>gu <action>(ShowUsages)
map <leader>gt <action>(GotoTest)
2024-07-20 17:01:22 -05:00
map <leader>gb <action>(Back)
map <leader>gf <action>(Forward)
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Go Tag
2024-07-20 17:01:22 -05:00
let g:WhichKeyDesc_GoTag_AddKey = "<leader>gt Add Tag"
2024-07-14 11:53:45 -05:00
map <leader>gt :action IntentionActionAsAction_com.goide.inspections.tag.GoTagAddKeyIntention<CR>
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Errors
2024-09-15 08:55:49 -05:00
let g:WhichKeyDesc_Errors = "<leader>e Errors"
let g:WhichKeyDesc_NextError = "<leader>en Next error in solution"
let g:WhichKeyDesc_PrevError = "<leader>ep Previous error in solution"
map <leader>en <action>(ReSharperGotoNextErrorInSolution)
map <leader>ep <action>(ReSharperGotoPrevErrorInSolution)
2024-07-14 07:03:21 -05:00
2024-07-14 11:53:45 -05:00
" Menu
2024-07-20 17:01:22 -05:00
let g:WhichKeyDesc_Menu = "<leader>m Menu"
let g:WhichKeyDesc_Menu_Main = "<leader>mm Main menu"
let g:WhichKeyDesc_AnalyzeMenu = "<leader>ma Analyze Menu"
let g:WhichKeyDesc_BuildMenu = "<leader>mb Build Menu"
let g:WhichKeyDesc_CodeMenu = "<leader>mc Code menu"
let g:WhichKeyDesc_FindMenuGroup = "<leader>mf Find menu group"
let g:WhichKeyDesc_GoToMenu = "<leader>mg Go to menu"
let g:WhichKeyDesc_ScopeViewPopupMenu = "<leader>ms Scope view popup menu"
let g:WhichKeyDesc_EditorTabPopupMenu = "<leader>mt Editor tab popup menu"
let g:WhichKeyDesc_ToolWindowsGroup = "<leader>mw Tool windows group"
2024-07-14 11:53:45 -05:00
map <leader>mm <action>(MainMenu)
2024-07-14 17:38:22 -05:00
map <leader>ma <action>(AnalyzeMenu)
map <leader>mb <action>(BuildMenu)
map <leader>mc <action>(CodeMenu)
map <leader>mf <action>(FindMenuGroup)
map <leader>mg <action>(GoToMenu)
map <leader>ms <action>(ScopeViewPopupMenu)
map <leader>mt <action>(EditorTabPopupMenu)
map <leader>mw <action>(ToolWindowsGroup)
2024-07-17 05:06:35 -05:00
2024-09-04 23:25:07 +00:00
" New files
let g:WhichKeyDesc_new_file = "<leader>n New Files"
let g:WhichKeyDesc_new_gofile = "<leader>ng New Go File"
let g:WhichKeyDesc_new_dir = "<leader>nD New Directory"
let g:WhichKeyDesc_new_html = "<leader>nh New HTML File"
let g:WhichKeyDesc_new_docker = "<leader>nd New Docker File"
let g:WhichKeyDesc_new_powershell = "<leader>np New Powershell File"
let g:WhichKeyDesc_new_file = "<leader>nf New File"
2024-09-15 08:55:49 -05:00
let g:WhichKeyDesc_new_scratch = "<leader>nf Scratch File"
2024-09-04 23:25:07 +00:00
map <leader>ng <Action>(Go.NewGoFile)
map <leader>nD <Action>(NewDir)
map <leader>nh <Action>(NewHtmlFile)
map <leader>nd <Action>(NewDockerfile)
map <leader>np <Action>(NewPowerShellFile)
map <leader>nf <Action>(NewFile)
2024-09-15 08:55:49 -05:00
map <leader>ns <action>(NewScratchFile)
2024-09-04 23:25:07 +00:00
" Git windows
let g:WhichKeyDesc_git = "<leader>G Git/Go Operations"
let g:WhichKeyDesc_git_commit = "<leader>Gc Open Git commit dialog"
let g:WhichKeyDesc_git_branches = "<leader>Gb Open Git branches list"
let g:WhichKeyDesc_git_pull = "<leader>Gp Open Git Pull"
map <leader>Gc <Action>(CheckinProject)
map <leader>Gb <Action>(Git.Branches)
map <leader>Gp <Action>(Git.Pull)
map <leader>GP <Action>(Vcs.Push)
" Tools
let g:WhichKeyDesc_Tools = "<leader>t Tools"
2024-09-15 08:55:49 -05:00
let g:WhichKeyDesc_git_Tools_Copilot = "<leader>tc Continue"
2024-09-04 23:25:07 +00:00
let g:WhichKeyDesc_git_Tools_Debug = "<leader>td Debug"
let g:WhichKeyDesc_git_Tools_Terminal = "<leader>tt Terminal"
let g:WhichKeyDesc_tools_mergerequest = "<leader>tm Merge Request"
let g:WhichKeyDesc_tools_services = "<leader>ts Services"
let g:WhichKeyDesc_tools_run = "<leader>tr Run"
2024-09-15 08:55:49 -05:00
map <leader>tc <Action>(continue.focusContinueInputWithoutClear)
2024-09-04 23:25:07 +00:00
map <leader>td <Action>(ActivateDebugToolWindow)
map <leader>tt <Action>(ActivateTerminalToolWindow)
map <leader>tm <Action>(ActivateMergeRequestsToolWindow)
map <leader>tr <Action>(ActivateRunToolWindow)
map <leader>ts <Action>(ActivateServicesToolWindow)
" Easy visual indentation
vnoremap < <gv
vnoremap > >gv
2024-07-20 17:01:22 -05:00
" Run
2024-09-04 18:28:40 -05:00
map <leader>rc <action>(RunClass)