Skip to content

Instantly share code, notes, and snippets.

@DreamAndDead
Last active May 31, 2024 05:04
Show Gist options
  • Save DreamAndDead/998bffeff84ffb9020d4bc4f031d9a15 to your computer and use it in GitHub Desktop.
Save DreamAndDead/998bffeff84ffb9020d4bc4f031d9a15 to your computer and use it in GitHub Desktop.
Rider IDE Ideavim plugin config
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Setting
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" show mode in status bar
set showmode
set showcmd
" Show a few lines of context around the cursor.
set scrolloff=8
set sidescrolloff=5
" show line number
set number
" use system clipboard
set clipboard+=unnamed
" default flag g in :s///
set gdefault
" max history command
set history=1000
" highlight last search word even not in search context
"set hlsearch
" ignore case in searching
set ignorecase
" move cursor to the first matching when typing searching word
set incsearch
" only for ideavim
set ideamarks
set ideajoin
set ideastatusicon=gray
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader=" "
" jump motion
Plug 'easymotion/vim-easymotion'
" operate file tree
Plug 'preservim/nerdtree'
" surround
Plug 'tpope/vim-surround'
" multi-cursor
Plug 'terryma/vim-multiple-cursors'
" Highlight yank text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
packadd matchit " Extended matching. Supports % (matching motion) and g% (reverse motion)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Mappings & Actions
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" :set trackactionids
" :set tai
map <leader>a <Action>(GotoAction)
map <leader>B <Action>(GotoSuperMethod)
map <leader>c <Action>(GotoClass)
map <leader>C <Action>(ShowIntentionActions)
map <leader>d <Action>(GotoDeclaration)
map <leader>D <Action>(GotoImplementation)
map <leader>f <Action>(GotoFile)
map <leader>F <Action>(ReformatCode)
map <leader>g <Plug>(easymotion-sn)
map <leader>G <Action>(Generate)
map <leader>h <Action>(SwitchHeaderSource)
map <leader>H <Action>(TypeHierarchy)
map <leader>I <Action>(ImplementMethods)
map <leader>l <Action>(Find)
map <leader>L <Action>(RecentLocations)
map <leader>m <Action>(FileStructurePopup)
map <leader>O <Action>(OverrideMethods)
map <leader>r <Action>(RecentFiles)
map <leader>R <Action>(RenameElement)
map <leader>s <Action>(GotoSymbol)
map <leader>S <Action>(ChangeSignature)
map <leader>t <Action>(TextSearchAction)
map <leader>T <Action>(ActivateProjectToolWindow)
map <leader>u <Action>(HighlightUsagesInFile)
map <leader>U <Action>(FindUsages)
map <leader>/ <Action>(CommentByLineComment)
nnoremap <a-o> <c-w>w
map <c-j> <Action>(PreviousTab)
map <c-k> <Action>(NextTab)
map <c-h> <Action>(Back)
map <c-l> <Action>(Forward)
imap <c-n> <Action>(EditorDown)
imap <c-p> <Action>(EditorUp)
imap <a-p> <Action>(MoveLineUp)
imap <a-n> <Action>(MoveLineDown)
imap <c-b> <Action>(EditorLeft)
imap <c-f> <Action>(EditorRight)
imap <a-b> <Action>(EditorPreviousWord)
imap <a-f> <Action>(EditorNextWord)
imap <c-h> <Action>(EditorBackSpace)
imap <c-d> <Action>(EditorDelete)
imap <c-e> <Action>(EditorLineEnd)
imap <c-a> <Action>(EditorLineStart)
imap <c-j> <Action>(EditorEnter)
imap <c-l> <Action>(EditorScrollToCenter)
imap <c-y> <Action>($Paste)
imap <c-w> <Action>($Cut)
imap <a-w> <Action>($Copy)
imap <c-k> <Action>(EditorDeleteToLineEnd)
imap <a-h> <Action>(EditorDeleteToWordStart)
imap <a-d> <Action>(EditorDeleteToWordEnd)
imap <a-/> <Action>(CodeCompletion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment