Skip to content

Instantly share code, notes, and snippets.

@Gulivertx
Created November 15, 2025 15:03
Show Gist options
  • Select an option

  • Save Gulivertx/b89ee516fe6f3d8b56cffde39929c1da to your computer and use it in GitHub Desktop.

Select an option

Save Gulivertx/b89ee516fe6f3d8b56cffde39929c1da to your computer and use it in GitHub Desktop.
.ideavimrc for my phpstorm
"" Base Settings
"" ========================================================
set scrolloff=10
set relativenumber
set showmode
set showcmd
set smartcase
set incsearch
set hlsearch
set visualbell
" Use system clipboard
set clipboard+=unnamed
let mapleader = " "
" map <space> <nop>
" let mapleader="\<space>"
set ideastatusicon=gray
"" Plugin Settings
"" ========================================================
Set surround
set highlightedyank
set sneak
set nerdtree
" Easymotion settings
set easymotion
set notimeout
" Which-key settings
set which-key
let g:WhichKey_FontFamily = 15
let g:WhichKey_FontSize = "Hack Nerd Font"
let g:WhichKey_ShowVimActions = "false"
let g:WhichKey_KeyColor = "#ED553A"
let g:WhichKey_PrefixColor = "#B7BB3E"
let g:WhichKey_CommandColor = "#9577A8"
let g:WhichKey_SortOrder = "by_key_prefix_first"
let g:WhichKey_SortCaseSensitive = "false"
let g:WhichKeyDesc_leader = "<leader> Leader key"
let g:WhichKeyDesc_leader = "<leader>x Open file explorer"
let g:WhichKeyDesc_easymotion = "<leader>j Jump with Easymotion"
let g:WhichKeyDesc_easymotion_prefix = "<leader><leader>"
" let g:WhichKeyDesc_comment = "<leader>c Comment line"
let g:WhichKeyDesc_fold = "<leader>z Folding"
let g:WhichKeyDesc_fold_all = "<leader>zc Fold all regions"
let g:WhichKeyDesc_unfold_all = "<leader>zo Unfold all regions"
let g:WhichKeyDesc_window = "<leader>w Window splits"
let g:WhichKeyDesc_window_split_vertically = "<leader>wv Split vertically"
let g:WhichKeyDesc_window_split_horizontally = "<leader>wh Split horizontally"
let g:WhichKeyDesc_window_split_unsplit = "<leader>wu Unsplit"
let g:WhichKeyDesc_window_split_move_editor = "<leader>wm Move editor to opposite tab group"
let g:WhichKeyDesc_display = "<leader>d Display options"
let g:WhichKeyDesc_zen_mode = "<leader>dz Toggle Zen mode"
let g:WhichKeyDesc_df_mode = "<leader>dd Toggle Distraction-Free mode"
let g:WhichKeyDesc_fullscreen = "<leader>df Toggle full screen"
let g:WhichKeyDesc_action= "<leader>a Actions"
let g:WhichKeyDesc_action_context_menu = "<leader>am Open context menu"
let g:WhichKeyDesc_action_search = "<leader>as Open command modal"
let g:WhichKeyDesc_file_quickLook = "<leader><leader> Recent files"
let g:WhichKeyDesc_file_nav = "<leader>f File navigation"
let g:WhichKeyDesc_file_nav_goto_file = "<leader>ff Go to file"
let g:WhichKeyDesc_file_nav_goto_content = "<leader>fc Search for file content"
let g:WhichKeyDesc_file_nav_show_recent_files = "<leader>fr Show recent files"
let g:WhichKeyDesc_file_nav_show_recent_locations = "<leader>fl Show recent locations"
let g:WhichKeyDesc_file_nav_new_file = "<leader>fs New file"
let g:WhichKeyDesc_close_tab = "<leader>q Close active tab"
let g:WhichKeyDesc_refactoring = "<leader>r Refactoring menu"
let g:WhichKeyDesc_refactoring_rename = "<leader>rn Rename element"
let g:WhichKeyDesc_refactoring_method = "<leader>rm Extract method"
let g:WhichKeyDesc_refactoring_variable = "<leader>rv Introduce variable"
let g:WhichKeyDesc_refactoring_field = "<leader>rf Introduce field"
let g:WhichKeyDesc_refactoring_signature = "<leader>rs Change signature"
let g:WhichKeyDesc_refactoring_all = "<leader>rr Open refactorings list"
let g:WhichKeyDesc_goto = "<leader>g Go to X"
let g:WhichKeyDesc_goto_declaration = "<leader>gd Go to Definition"
let g:WhichKeyDesc_goto_type_declaration = "<leader>gy Go to Type Definition"
let g:WhichKeyDesc_goto_implementation = "<leader>gi Go to Implementation"
let g:WhichKeyDesc_goto_usages = "<leader>gu Go to Usages"
let g:WhichKeyDesc_goto_test = "<leader>gt Go to Test"
let g:WhichKeyDesc_goto_back = "<leader>gb Go Back"
let g:WhichKeyDesc_goto_forward = "<leader>gf Go Forward"
let g:WhichKeyDesc_git = "<leader>G Git operations"
let g:WhichKeyDesc_git_commit = "<leader>Gc Open Git commit dialog"
let g:WhichKeyDesc_git_status = "<leader>Gs Open Git status dialog"
let g:WhichKeyDesc_git_branches = "<leader>Gb Open Git branches list"
let g:WhichKeyDesc_errors = "<leader>e Error navigation"
let g:WhichKeyDesc_errors_next = "<leader>en Go to next error in solution"
let g:WhichKeyDesc_errors_prev = "<leader>ep Go to previous error in solution"
let g:WhichKeyDesc_tabs = "<leader>s Tabs"
let g:WhichKeyDesc_tabs_left = "<leader>sh Move tab left"
let g:WhichKeyDesc_tabs_down = "<leader>sj Move tab down"
let g:WhichKeyDesc_tabs_up = "<leader>sk Move tab up"
let g:WhichKeyDesc_tabs_right = "<leader>sl Move tab right"
let g:WhichKeyDesc_tabs_split_horizontally = "<leader>sH Split horizontally"
let g:WhichKeyDesc_tabs_split_vertically = "<leader>sV Split vertically"
let g:WhichKeyDesc_code = "<leader>c Code"
let g:WhichKeyDesc_code_comment_line = "<leader>cc Comment by line"
let g:WhichKeyDesc_code_comment_block = "<leader>cC Comment by block"
let g:WhichKeyDesc_code_show_intention_code = "<leader>ci Show intention code"
let g:WhichKeyDesc_code_show_error_description = "<leader>ce Show error description"
let g:WhichKeyDesc_code_override_methods = "<leader>co Override methods"
let g:WhichKeyDesc_code_implement_methods = "<leader>cm Implement methods"
let g:WhichKeyDesc_code_reformat_code = "<leader>cr Reformat code"
let g:WhichKeyDesc_code_inspect_code = "<leader>cI Inspect code"
let g:WhichKeyDesc_code_select_all_occurrences = "<leader>cs Select all occurrences"
let g:WhichKeyDesc_code_generate = "<leader>cg Generate code"
let g:WhichKeyDesc_tab_1 = "<leader>1 Go to tab 1"
let g:WhichKeyDesc_tab_2 = "<leader>2 Go to tab 2"
let g:WhichKeyDesc_tab_3 = "<leader>3 Go to tab 3"
let g:WhichKeyDesc_tab_4 = "<leader>4 Go to tab 4"
let g:WhichKeyDesc_tab_5 = "<leader>5 Go to tab 5"
let g:WhichKeyDesc_tab_6 = "<leader>6 Go to tab 6"
let g:WhichKeyDesc_tab_7 = "<leader>7 Go to tab 7"
let g:WhichKeyDesc_tab_8 = "<leader>8 Go to tab 8"
let g:WhichKeyDesc_tab_9 = "<leader>9 Go to tab 9"
let g:WhichKeyDesc_terminal = "<leader>t Terminal and tools"
let g:WhichKeyDesc_terminal_open = "<leader>tc Open terminal"
let g:WhichKeyDesc_terminal_activate = "<leader>tt Activate terminal"
let g:WhichKeyDesc_terminal_todo_widnow = "<leader>to Todo window"
let g:WhichKeyDesc_terminal_tasks = "<leader>ts Tasks"
let g:WhichKeyDesc_buffer = "<leader>b Buffer"
let g:WhichKeyDesc_terminal_open = "<leader>bx Close content"
let g:WhichKeyDesc_terminal_activate = "<leader>ba Close all editors"
let g:WhichKeyDesc_terminal_todo_widnow = "<leader>bo Close inactives editors"
let g:WhichKeyDesc_terminal_tasks = "<leader>bp Close unpinned editors"
"" Key mappings
"" ========================================================
inoremap jk <Esc>
" Tab navigation
nnoremap <A-n> :tabnext<CR>
nnoremap <A-p> :tabprev<CR>
" Pane navigation
nnoremap <A-h> <C-w>h
nnoremap <A-l> <C-w>l
nnoremap <A-k> <C-w>k
nnoremap <A-j> <C-w>j
" Jump between methods
nnoremap [[ <Action>(MethodUp)
nnoremap ]] <Action>(MethodDown)
" Easy visual indentation
vnoremap < <gv
vnoremap > >gv
" Execute macro saved in 'q' register
nnoremap qj @q
" Popup navigation
inoremap <C-j> <Action>(PopupMenu-selectNext)
inoremap <C-k> <Action>(PopupMenu-selectPrev)
"" Leader commands
"" ========================================================
" Comment lines
" map <leader>c <action>(CommentByLineComment)
" Jump around with easymotion
map <leader>j <Plug>(easymotion-s)
" Open NERDTree (use q to exit)
map <leader>x :NERDTreeToggle<CR>
" Folding
map <leader>zc :action CollapseAllRegions<CR>
map <leader>zo :action ExpandAllRegions<CR>
" Window splits
map <leader>wv <Action>(SplitVertically)
map <leader>wh <Action>(SplitHorizontally)
map <leader>wu <Action>(Unsplit)
map <leader>wm <Action>(MoveEditorToOppositeTabGroup)
" Display options
map <leader>dd <action>(ToggleDistractionFreeMode)
map <leader>dz <action>(ToggleZenMode)
map <leader>df <action>(ToggleFullScreen)
" Actions
map <leader>am <action>(ShowIntentionActions)
map <leader>as <action>(SearchEverywhere)
" File navigation
map <leader>ff <action>(GotoFile)
map <leader>fr <action>(RecentFiles)
map <leader>fc <action>(FindInPath)
map <leader><leader> <Action>(RecentFiles)
map <leader>fl <action>(RecentLocations)
map <leader>fs <action>(NewScratchFile)
" Close active tab
map <leader>q <action>(CloseContent)
" Refactoring
map <leader>rn <Action>(RenameElement)
map <leader>rm <Action>(ExtractMethod)
map <leader>rv <Action>(IntroduceVariable)
map <leader>rf <Action>(IntroduceField)
map <leader>rs <Action>(ChangeSignature)
map <leader>rr <Action>(Refactorings.QuickListPopupAction)
" Go to code
nmap <leader>gd <Action>(GotoDeclaration)
nmap <leader>gy <Action>(GotoTypeDeclaration)
nmap <leader>gi <Action>(GotoImplementation)
nmap <leader>gu <Action>(ShowUsages)
nmap <leader>gt <Action>(GotoTest)
nmap <leader>gf <Action>(Back)
nmap <leader>gb <Action>(Forward)
" Git windows
map <leader>Gc <Action>(CheckinProject)
map <leader>Gs <Action>(ActivateVersionControlToolWindow)
map <leader>Gb <Action>(Git.Branches)
" Errors
map <leader>en <Action>(ReSharperGotoNextErrorInSolution)
map <leader>ep <Action>(ReSharperGotoPrevErrorInSolution)
" buffer (buffer < window < tab)
nmap <leader>bx <Action>(CloseContent)
nmap <leader>ba <Action>(CloseAllEditors)
nmap <leader>bo <Action>(CloseAllEditorsButActive)
nmap <leader>bp <Action>(CloseAllUnpinnedEditors)
nmap <leader>1 <Action>(GoToTab1)
nmap <leader>2 <Action>(GoToTab2)
nmap <leader>3 <Action>(GoToTab3)
nmap <leader>4 <Action>(GoToTab4)
nmap <leader>5 <Action>(GoToTab5)
nmap <leader>6 <Action>(GoToTab6)
nmap <leader>7 <Action>(GoToTab7)
nmap <leader>8 <Action>(GoToTab8)
nmap <leader>9 <Action>(GoToTab9)
" tab
map <leader>sh <Action>(MoveTabLeft)
map <leader>sj <Action>(MoveTabDown)
map <leader>sk <Action>(MoveTabUp)
map <leader>sl <Action>(MoveTabRight)
map <leader>sH <Action>(SplitHorizontally)
map <leader>sV <Action>(SplitVertically)
" code
map <leader>cc <Action>(CommentByLineComment)
map <leader>cC <Action>(CommentByBlockComment)
nmap <leader>ci <Action>(ShowIntentionActions)
nmap <leader>ce <Action>(ShowErrorDescription)
nmap <leader>co <Action>(OverrideMethods)
nmap <leader>cm <Action>(ImplementMethods)
nmap <leader>cr <Action>(ReformatCode)
nmap <leader>cI <Action>(InspectCode)
nmap <leader>cs <Action>(SelectAllOccurrences)
nmap <leader>cg <Action>(Generate)
" terminal
nmap <leader>tt <Action>(ActivateTerminalToolWindow)
nmap <leader>tc <Action>(Terminal.OpenInTerminal)
" todo
nmap <leader>to <Action>(ActivateTODOToolWindow)
" task
nmap <leader>ts <Action>(tasks.goto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment