" To get a list of Actions, run `:actionlist ` " Set the leader key to let mapleader = "\" set ignorecase smartcase set NERDTree set hlsearch set showmode set scrolloff=5 set history=1000 set surround set incsearch set relativenumber set number set smartcase set noerrorbells set easymotion set commentary set ideajoin set exchange set multiplecursor set sneak set which-key set timeoutlen=8000 " clear the search buffer nnoremap h :nohlsearch " To copy text to the end-of-line, press Y. " This mapping sets up Y to be consistent with " the C and D operators, which act from the cursor " to the end of the line. The default behavior of Y " is to yank the whole line. nnoremap Y y$ " Shortcut for escape imap jj imap jk " When in normal mode and I hit Enter, " format and save the file, please nmap :action ReformatCode :write "The same thing but using the pneumonic of F(ormat) nnoremap F :action ReformatCode :write " Quick window navigation map j map k map l map h " Shortcut for copying to/from System Clipboard vmap y "+y vmap d "+d nmap P "+P " Greatest remap EVER!! " Let me explain: this remap while in visual mode " will delete what is currently highlighted and replace it " with what is in the register, BUT it will YANK (delete) it " to a VOID register. Meaning I still have what I originally had " when I pasted. I don't lose the previous thing I YANKED! vnoremap p "_dP " Ctrl-P simulation nnoremap :action GotoFile " Splitting Windows nmap V :vsplit nmap H :split nmap \ :vsplit nmap - :split " Close the split you are in nmap X :action Unsplit nmap cs :action Unsplit " Some search and replace shortcuts nnoremap r :%s//g " Visual Mode xnoremap r :s//g " Open Terminal nmap t :action ActivateTerminalToolWindow " Open recent project dialog box nmap m :action ManageRecentProjects " Mapping to mimic BufferExplorer nmap bf :action RecentFiles nmap bb :action RecentFiles " Misc nmap f :action GotoFile nmap :action GotoFile nmap u :action FindUsages nmap st :action FindInPath " Nerdtree - File Explorer nmap e :NERDTreeToggle " Toggle ToggleDistractionFreeMode nmap df :action ToggleDistractionFreeMode " Create a new file or directory nnoremap nf :action NewFile nnoremap nF :action NewDir nnoremap ns :action NewScratchFile nnoremap np :action PhpNewFile nnoremap nc :action PhpNewClass " XDebug Shortcuts nmap xl :action PhpListenDebugAction nmap bp :action ToggleLineBreakpoint " Jump to Source nmap ] :action XDebugger.JumpToSource " View my customized Quicklist nmap l :action QuickList.MyQuickList " AceJump Plugin - Jump to Character nmap w :action AceAction " Refactoring nmap rt :action Refactorings.QuickListPopupAction " Put search results in the middle of the screen nnoremap n nzz nnoremap N Nzz " Files I open a lot in a project nmap lc :e composer.json nmap le :e .env " Open AI Assist " map alt+shift+a to :action AIAssistant.ToolsDropdown nmap :action AIAssistant.ToolsDropdown " which-key Settings " I really don't use WhichKey, so this is not in sync with my " configuration, but I thought it was worth leaving here " so you can set it up. If you are learning Vim, this is a great " plugin to enable as it will pop up a hud if you can't " remember a key binding. let g:WhichKeyDesc_windows = "w Windows" let g:WhichKeyDesc_windows_delete = "wd delete" let g:WhichKeyDesc_windows_split = "ws split verticle" let g:WhichKeyDesc_windows_split = "wh split below" let g:WhichKeyDesc_windows_split = "wv split verticle" let g:WhichKeyDesc_b_stuff = "b B Stuff" let g:WhichKeyDesc_recent_files_changed = "bf Recent Files Changed" let g:WhichKeyDesc_breakpoint_toggle = "bp Breakpoint Toggle" let g:WhichKeyDesc_git_branches = "br Git Braches" let g:WhichKeyDesc_split_verticle = "V split verticle" let g:WhichKeyDesc_split_horizontal = "H split horizontal" let g:WhichKeyDesc_git = "g Git" let g:WhichKeyDesc_git_add = "ga Git Add" let g:WhichKeyDesc_git_branches = "gb Git Branches" let g:WhichKeyDesc_git_checkin = "gc Git Checkin Project" let g:WhichKeyDesc_git_log = "gl Git Log" let g:WhichKeyDesc_git_annotate = "gn Git Annotate" let g:WhichKeyDesc_git_open_browser = "go Open in Github" let g:WhichKeyDesc_git_pull = "gp Git Pull" let g:WhichKeyDesc_file_explorer = "e File Explorer" let g:WhichKeyDesc_format_code = "F Format Code" let g:WhichKeyDesc_find_file = "f Get File" let g:WhichKeyDesc_find_usage = "u Find Usages" let g:WhichKeyDesc_terminal = "t Terminal Window" let g:WhichKeyDesc_comment = "\ Comment (single line)" let g:WhichKeyDesc_highlight_off = "h Highlight Off" let g:WhichKeyDesc_safe_paste = "P Safe Paste (Don't lose buffer)"