Skip to content

Instantly share code, notes, and snippets.

@ericvanjohnson
Last active September 23, 2025 05:29
Show Gist options
  • Save ericvanjohnson/079ae871e156054d3779e8f1efd8375d to your computer and use it in GitHub Desktop.
Save ericvanjohnson/079ae871e156054d3779e8f1efd8375d to your computer and use it in GitHub Desktop.

Revisions

  1. ericvanjohnson revised this gist Apr 22, 2021. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions ideavimrc
    Original file line number Diff line number Diff line change
    @@ -41,6 +41,7 @@ imap jk <Esc>
    " When in normal mode and I hit Enter,
    " then save file please
    nmap <CR> :action ReformatCode<CR> :write<CR>
    nnoremap <Leader>F :action ReformatCode<CR> :write<CR>

    " Quick window navigation
    map <C-J> <C-W>j
    @@ -146,7 +147,7 @@ nmap <Leader>gb :action Git.Branches<CR>
    nmap <Leader><leader>l :action QuickList.MyList<CR>

    " AceJump Plugin - Jump to Character
    nmap <Leader><Leader>w :action AceJumpAction<CR>
    nmap <Leader><Leader>w :action AceAction<CR>

    " Commenting
    nmap <Leader>cc :action CommentByLineComment<CR>
    @@ -179,4 +180,4 @@ vmap <Leader>y "+y
    "" Cute
    vmap <Leader>d "+d
    "" Paste
    nmap <Leader>P "+P
    nmap <Leader>P "+p
  2. ericvanjohnson revised this gist Apr 5, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion ideavimrc
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@
    let mapleader = "\<SPACE>"

    set ignorecase smartcase
    set NERDTree
    set hlsearch
    set showmode
    set scrolloff=5
    @@ -108,7 +109,8 @@ nmap <Leader><Leader>b :action RecentFiles<CR>
    nmap <Leader>m :action CodeGlance.toggle<CR>

    " Nerdtree want to be
    nmap <Leader>nt :action ActivateProjectToolWindow<CR>
    " nmap <Leader>nt :action ActivateProjectToolWindow<CR>
    nmap <Leader>nt :NERDTreeToggle<CR>

    " Toggle ToggleDistractionFreeMode
    nmap <Leader>df :action ToggleDistractionFreeMode<CR>
  3. ericvanjohnson revised this gist Feb 17, 2021. 1 changed file with 38 additions and 9 deletions.
    47 changes: 38 additions & 9 deletions ideavimrc
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    let mapleader = ','
    " To get a list of Actions run `:actionlist `
    " let mapleader = ','
    " let mapleader = " "
    let mapleader = "\<SPACE>"

    set ignorecase smartcase
    set hlsearch
    @@ -8,13 +11,17 @@ set history=1000
    set surround
    set incsearch
    set relativenumber
    set number
    set smartcase
    set hlsearch
    set visualbell
    set noerrorbells
    set easymotion
    set commentary
    set ideajoin
    set exchange
    set multiple-cursors
    set sneak

    " clear the search buffer when hitting return
    nnoremap <Leader>/ :nohlsearch<cr>
    @@ -43,9 +50,16 @@ map <C-H> <C-W>h
    " Shortcut for copying to/from System Clipboard
    vmap <Leader>y "+y
    vmap <Leader>d "+d
    nmap <Leader>p "+p
    nmap <Leader>P "+P

    " Greatest remap EVER!!
    " Let me explain, this remap while in visiual 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 loose the previous thing I YANKED!
    vnoremap <leader>p "_dP

    " Splitting Windows
    nmap <Leader>\ :vsplit<CR>
    nmap <Leader>v :vsplit<CR>
    @@ -72,18 +86,23 @@ xnoremap <Leader><Leader>r :s//g<Left><Left>
    " For a list of :action try :actionlist
    " ===========================================
    " Hide open panels
    nmap <Leader>f :action HideAllWindows<CR>
    nmap <Leader>w :action HideAllWindows<CR>

    " Open Global Find Dialog box
    nmap <Leader>fp :action FindInPath<CR>

    " Open Terminal
    nmap <Leader>t :action ActivateTerminalToolWindow<CR>

    " Open recent project dialog box
    nmap <Leader><Leader>m :action ManageRecentProjects<CR>

    " Mapping to mimic BufferExplorer
    " nmap <Leader>be :action Switcher<CR>
    nmap <Leader>be :action RecentFiles<CR>
    nmap <Leader>fb :action RecentFiles<CR>
    nmap <Leader>ff :action GotoFile<CR>
    nmap <Leader>fg :action SearchEverywhere<CR>
    nmap <Leader><Leader>b :action RecentFiles<CR>

    " Toggle code minimap
    nmap <Leader>m :action CodeGlance.toggle<CR>
    @@ -94,6 +113,9 @@ nmap <Leader>nt :action ActivateProjectToolWindow<CR>
    " Toggle ToggleDistractionFreeMode
    nmap <Leader>df :action ToggleDistractionFreeMode<CR>

    " Quick Quite
    nnoremap <leader>q :q <CR>

    "Coding Formating
    " ===============
    nnoremap <leader>cf :action ReformatCode<CR>
    @@ -119,25 +141,25 @@ nmap <Leader>br :action Git.Branches<CR>
    nmap <Leader>gb :action Git.Branches<CR>

    " View my customize Quicklist
    nmap <Leader><leader>l :action QuickList.MyQuickList<CR>
    nmap <Leader><leader>l :action QuickList.MyList<CR>

    " AceJump Plugin - Jump to Character
    nmap <Leader><Leader>w :action AceJumpAction<CR>

    " Commenting
    nmap <Leader>cc :action CommentByLineComment<CR>
    nmap <Leader>cs :action CommentByBlockComment<CR>
    nmap <Leader>cb :action CommentByBlockComment<CR>
    nmap <Leader>c<Space> :action CommentByLineComment<CR>
    nmap <Leader>cs<Space> :action CommentByBlockComment<CR>
    nmap <Leader>cb<Space> :action CommentByBlockComment<CR>

    " Refactoring
    nmap <Leader>rt :action Refactorings.QuickListPopupAction<CR>
    "nmap csw' :action Macro.surround_with_single_quote<CR>

    " Move visual block
    vnoremap J :m '>+1<CR>
    xnoremap K :m '<-2<CR>
    " vnoremap K :m '<-2<CR>gv=gv
    " xnoremap K :m '<-2<CR>
    vnoremap K :m '<-2<CR>

    " Put search results in the middle of the screen
    nnoremap n nzz
    @@ -149,3 +171,10 @@ nnoremap N Nzz
    nmap <Leader>lc :e composer.json<cr>
    nmap <Leader>le :e .env<cr>

    " Shortcut for copying to/from System Clipboard
    "" Copy (Yank)
    vmap <Leader>y "+y
    "" Cute
    vmap <Leader>d "+d
    "" Paste
    nmap <Leader>P "+P
  4. ericvanjohnson revised this gist Jul 7, 2020. 1 changed file with 53 additions and 21 deletions.
    74 changes: 53 additions & 21 deletions ideavimrc
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    let mapleader = ','

    set ignorecase smartcase
    "set hlsearch
    set hlsearch
    set showmode
    set scrolloff=5
    set history=1000
    @@ -10,23 +10,29 @@ set incsearch
    set relativenumber
    set smartcase
    set hlsearch
    set visualbell
    set noerrorbells
    set easymotion
    set commentary
    set ideajoin

    " clear the search buffer when hitting return
    nnoremap <Leader>/ :nohlsearch<cr>

    " To copy text to the end-of-line, press Y.
    " 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
    " 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 <Esc>
    imap jk <Esc>

    " When in normal mode and I hit Enter,
    " When in normal mode and I hit Enter,
    " then save file please
    nmap <CR> :write<CR>
    nmap <CR> :action ReformatCode<CR> :write<CR>

    " Quick window navigation
    map <C-J> <C-W>j
    @@ -46,30 +52,52 @@ nmap <Leader>v :vsplit<CR>
    nmap <Leader>- :split<CR>
    nmap <Leader>h :split<CR>

    " nmap <leader>fs :action FileStructurePopup<CR>


    " Some search and replace shortcuts
    " nnoremap <Leader><Leader>r :%s///g<Left><Left>
    " nnoremap <Leader><Leader>rc :%s///g<Left><Left><Left>
    nnoremap <Leader><Leader>r :%s//g<Left><Left>
    "" Visual Mode
    " xnoremap <Leader><Leader>r :s///g<Left><Left>
    " xnoremap <Leader><Leader>rc :s///g<Left><Left><Left>
    xnoremap <Leader><Leader>r :s//g<Left><Left>

    " Project Shortcuts
    " =================
    " Close Project
    nmap <Leader>q :action CloseProject<CR>

    " Some Action commands to memic my native vim
    " Some Action commands to memic my native vim
    " For a list of :action try :actionlist
    " ===========================================
    " Hide open panels
    nmap <Leader>f :action HideAllWindows<CR>
    nmap <Leader>f :action HideAllWindows<CR>

    " Open Global Find Dialog box
    nmap <Leader><Leader>f :action FindInPath<CR>
    nmap <Leader>fp :action FindInPath<CR>


    " Open recent project dialog box
    nmap <Leader><Leader>p :action ManageRecentProjects<CR>
    nmap <Leader><Leader>m :action ManageRecentProjects<CR>

    " Mapping to mimic BufferExplorer
    nmap <Leader>be :action Switcher<CR>
    " nmap <Leader>be :action Switcher<CR>
    nmap <Leader>be :action RecentFiles<CR>

    " Toggle code minimap
    nmap <Leader>m :action CodeGlance.toggle<CR>

    " Nerdtree want to be
    nmap <Leader>nt :action ActivateProjectToolWindow<CR>

    " Toggle ToggleDistractionFreeMode
    nmap <Leader>df :action ToggleDistractionFreeMode<CR>

    "Coding Formating
    " ===============
    nnoremap <leader>cf :action ReformatCode<CR>
    nnoremap <leader>pcf :action Tool_External Tools_PHP CS Fixer<CR>


    " XDebug Shortcuts
    @@ -80,30 +108,36 @@ nmap <C>] :action XDebugger.JumpToSource

    " Some Git Shortcuts for view status, pull, and branches
    " Mapping mimic Fugitive in my native vim
    nmap <Leader>gs :action ChangesView.Commit<CR>
    nmap <Leader>gc :action ChangesView.Commit<CR>
    nmap <Leader>gs :action CheckinProject<CR>
    nmap <Leader>gc :action CheckinProject<CR>
    nmap <Leader>ga :action Git.Add<CR>
    nmap <Leader>gp :action Git.Pull<CR>
    nmap <Leader>gb :action Annotate<CR>
    nmap <Leader>gn :action Annotate<CR>
    nmap <Leader>gl :action Git.Log<CR>
    nmap <Leader>go :action Github.Open.In.Browser<CR>
    nmap <Leader>br :action Git.Branches<CR>
    nmap <Leader>gb :action Git.Branches<CR>

    " View my customize Quicklist
    nmap <Leader>l :action QuickList.MyQuickList<CR>
    nmap <Leader><leader>l :action QuickList.MyQuickList<CR>

    " AceJump Plugin - Jump to Character
    nmap <Leader><Leader>w :action AceJumpAction<CR>

    " Commenting
    nmap <Leader>cc :action CommentByLineComment<CR>
    nmap <Leader>cs :action CommentByBlockComment<CR>
    nmap <Leader>c<Space> :action CommentByLineComment<CR>
    nmap <Leader>cs<Space> :action CommentByBlockComment<CR>

    " Refactoring
    nmap <Leader>rt :action Refactorings.QuickListPopupAction<CR>
    "nmap csw' :action Macro.surround_with_single_quote<CR>

    " Move visual block
    vnoremap J :m '>+1<CR>gv=gv
    vnoremap K :m '<-2<CR>gv=gv
    vnoremap J :m '>+1<CR>
    xnoremap K :m '<-2<CR>
    " vnoremap K :m '<-2<CR>gv=gv

    " Put search results in the middle of the screen
    nnoremap n nzz
    @@ -112,8 +146,6 @@ nnoremap N Nzz
    " Laravel Mappings
    " ================
    " Open and edit routes file
    nmap <Leader>lr :e app/Http/routes.php<CR>
    nmap <Leader>lca :e config/app.php<cr>
    nmap <Leader>lcd :e config/database.php<cr>
    nmap <Leader>lc :e composer.json<cr>
    nmap <Leader>le :e .env<cr>

  5. ericvanjohnson created this gist Jan 28, 2017.
    119 changes: 119 additions & 0 deletions ideavimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,119 @@
    let mapleader = ','

    set ignorecase smartcase
    "set hlsearch
    set showmode
    set scrolloff=5
    set history=1000
    set surround
    set incsearch
    set relativenumber
    set smartcase
    set hlsearch

    " clear the search buffer when hitting return
    nnoremap <Leader>/ :nohlsearch<cr>

    " 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 <Esc>

    " When in normal mode and I hit Enter,
    " then save file please
    nmap <CR> :write<CR>

    " Quick window navigation
    map <C-J> <C-W>j
    map <C-K> <C-W>k
    map <C-L> <C-W>l
    map <C-H> <C-W>h

    " Shortcut for copying to/from System Clipboard
    vmap <Leader>y "+y
    vmap <Leader>d "+d
    nmap <Leader>p "+p
    nmap <Leader>P "+P

    " Splitting Windows
    nmap <Leader>\ :vsplit<CR>
    nmap <Leader>v :vsplit<CR>
    nmap <Leader>- :split<CR>
    nmap <Leader>h :split<CR>

    " Project Shortcuts
    " =================
    " Close Project
    nmap <Leader>q :action CloseProject<CR>

    " Some Action commands to memic my native vim
    " For a list of :action try :actionlist
    " ===========================================
    " Hide open panels
    nmap <Leader>f :action HideAllWindows<CR>
    " Open Global Find Dialog box
    nmap <Leader><Leader>f :action FindInPath<CR>
    " Open recent project dialog box
    nmap <Leader><Leader>p :action ManageRecentProjects<CR>
    " Mapping to mimic BufferExplorer
    nmap <Leader>be :action Switcher<CR>
    " Toggle code minimap
    nmap <Leader>m :action CodeGlance.toggle<CR>
    " Nerdtree want to be
    nmap <Leader>nt :action ActivateProjectToolWindow<CR>

    "Coding Formating
    " ===============
    nnoremap <leader>cf :action ReformatCode<CR>


    " XDebug Shortcuts
    nmap <Leader>xl :action PhpListenDebugAction<CR>
    nmap <Leader>bp :action ToggleLineBreakpoint<CR>
    " Jump to Source
    nmap <C>] :action XDebugger.JumpToSource

    " Some Git Shortcuts for view status, pull, and branches
    " Mapping mimic Fugitive in my native vim
    nmap <Leader>gs :action ChangesView.Commit<CR>
    nmap <Leader>gc :action ChangesView.Commit<CR>
    nmap <Leader>ga :action Git.Add<CR>
    nmap <Leader>gp :action Git.Pull<CR>
    nmap <Leader>gb :action Annotate<CR>
    nmap <Leader>gl :action Git.Log<CR>
    nmap <Leader>go :action Github.Open.In.Browser<CR>
    nmap <Leader>br :action Git.Branches<CR>

    " View my customize Quicklist
    nmap <Leader>l :action QuickList.MyQuickList<CR>

    " AceJump Plugin - Jump to Character
    nmap <Leader><Leader>w :action AceJumpAction<CR>

    " Commenting
    nmap <Leader>c<Space> :action CommentByLineComment<CR>
    nmap <Leader>cs<Space> :action CommentByBlockComment<CR>
    nmap <Leader>rt :action Refactorings.QuickListPopupAction<CR>
    "nmap csw' :action Macro.surround_with_single_quote<CR>

    " Move visual block
    vnoremap J :m '>+1<CR>gv=gv
    vnoremap K :m '<-2<CR>gv=gv

    " Put search results in the middle of the screen
    nnoremap n nzz
    nnoremap N Nzz

    " Laravel Mappings
    " ================
    " Open and edit routes file
    nmap <Leader>lr :e app/Http/routes.php<CR>
    nmap <Leader>lca :e config/app.php<cr>
    nmap <Leader>lcd :e config/database.php<cr>
    nmap <Leader>lc :e composer.json<cr>
    nmap <Leader>le :e .env<cr>