PHP Storm Ideavim File

October 9, 2024 note-to-self

Note: Need to restart PHP Storm after any change to take effect.

let mapleader = " "

set ignorecase smartcase
set hlsearch
set is hlsearch
set clipboard+=unnamed

" toggle comments
vnoremap gc :action CommentByLineComment<CR>

" In/Out dent
vnoremap < <gv
vnoremap > >gv

" Jump between methods
nnoremap [[ :action MethodUp<CR>
nnoremap ]] :action MethodDown<CR>

"" Plugin Settings
set highlightedyank
set nerdtree

" Easymotion settings
set easymotion

map <C-7> :NERDTreeToggle<CR>

" Window splits
map <leader>\\ :action SplitVertically<CR>
map <leader>\\\\ :action Unsplit<CR>
map <leader>- :action SplitHorizontally<CR>
map <leader>-- :action MoveEditorToOppositeTabGroup<CR>

map zc :action CollapseAllRegions<CR>
map zo :action ExpandAllRegions<CR>

nmap <leader>gd :action GotoDeclaration<CR>
nmap <leader>gy :action GotoTypeDeclaration<CR>
nmap <leader>gi :action GotoImplementation<CR>
nmap <leader>gu :action ShowUsages<CR>
nmap <leader>gt :action GotoTest<CR>
nmap <leader>gb :action Back<CR>
nmap <leader>gf :action Forward<CR>

nmap <leader>ann :action ShowIntentionActions<CR>
nmap <leader>s :action SearchEverywhere<CR>

" File navigation
map <leader>ff :action GotoFile<CR>
map <leader>fr :action RecentFiles<CR>
map <leader>fc :action FindInPath<CR>
map <leader>fr :action RecentFiles<CR>
map <leader>fl :action RecentLocations<CR>
map <leader>fs :action NewScratchFile<CR>

" Refactoring
map <leader>rn :action RenameElement<CR>
map <leader>rm :action ExtractMethod<CR>
map <leader>rv :action IntroduceVariable<CR>
map <leader>rf :action IntroduceField<CR>
map <leader>rs :action ChangeSignature<CR>
map <leader>rr :action Refactorings.QuickListPopupAction<CR>

map <leader>bs :action ShowBookmarks<CR>
map <leader>bb :action ToggleBookmark<CR>
map <leader>bm :action ToggleBookmarkWithMnemonic<CR>
map <leader>bg :action GoToBookmarkG<CR>

I couldn't get the Action(<action>) syntax working but the :action <action> works fine.

Links: Ideas, Actions