Skip to content

Instantly share code, notes, and snippets.

@JamsMendez
Last active April 11, 2024 00:00
Show Gist options
  • Save JamsMendez/360abd332cc27d50cb55e9c346df6d93 to your computer and use it in GitHub Desktop.
Save JamsMendez/360abd332cc27d50cb55e9c346df6d93 to your computer and use it in GitHub Desktop.
Configuration to Intellij IDE Vim
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
=== List Actions ===
Google Sheet
https://docs.google.com/spreadsheets/d/17GvVbsLc48iM-vpKgBTwz5ByvsMmmw0dqIenzemDcXM/edit?usp=sharing
Gist
https://gist.github.com/zchee/9c78f91cc5ad771c1f5d
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching.
set incsearch
" Don't use Ex mode, use Q for formatting.
map Q gq
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
Plug 'preservim/nerdtree'
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
set clipboard+=unnamed
let mapleader = " "
" Shift + F6 in idea.
" Alt + R, then R (through the menu bar) also seems to work fine.
nmap <Leader>lr :action RenameElement<CR>
"nmap <Leader>la :action Refactorings.QuickListPopupAction<cr>
"nmap <Leader>lq <Action>(QuickActions)
nmap <Leader>ls <Action>(FileStructurePopup)
nmap <Leader>lD <Action>(ShowErrorDescription)
nmap <Leader>lf <Action>(ReformatCode)
map <Leader>o :NERDTreeFocus<CR>
map <Leader>e :NERDTreeToggle<CR>
map <Leader>ff :NERDTreeFind<CR>
map <Leader>c :close<CR>
map <Leader>C :action CloseEditorsGroup<CR>
nmap H :tabprev<CR>
nmap L :tabnext<CR>
nmap <Leader>so :action OpenEditorInOppositeTabGroup<CR>
nmap <Leader>sh :action SplitHorizontally<CR>
nmap <Leader>sv :action SplitVertically<CR>
nmap <Leader>ff :action GotoFile<CR>
nmap <Leader>fb :action RecentFiles<CR>
nmap <Leader>ls :action GotoSymbol<CR>
nmap za <Action>(ToggleFolding)
nmap zz <Action>(ToggleFolding)
" key bindings for quickly moving between windows
nmap <c-h> <c-w>h
nmap <c-l> <c-w>l
nmap <c-k> <c-w>k
nmap <c-j> <c-w>j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment