Skip to content

Instantly share code, notes, and snippets.

@99702
Last active April 14, 2024 09:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 99702/f491f789019cae7c0b23f4a7c2ba6c49 to your computer and use it in GitHub Desktop.
Save 99702/f491f789019cae7c0b23f4a7c2ba6c49 to your computer and use it in GitHub Desktop.
Personal Ideavimrc for intellij
" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister
set exchange
set number relativenumber
set idearefactormode=keep
set ideajoin
set incsearch
set ideastatusicon=gray
set ideavimsupport=+singleline,dialog
set highlightedyank
" disable the timeout option
set notimeout
set hls
set NERDTree
set showmode
set clipboard^=unnamedplus,ideaput
let mapleader = " "
vmap <leader>y "+y
vmap <leader>d "+d
nmap <leader>y "+yy
nmap <leader>p "+p
nmap <leader>P "+P
vmap <leader>p "+p
vmap <leader>P "+P
# window navigation
nnoremap <leader>2 <c-w>s
nnoremap <leader>3 <c-w>v
nnoremap <leader>o <c-w><c-w>
nnoremap <leader>j <c-w>j
nnoremap <leader>k <c-w>k
nnoremap <leader>l <c-w>l
nnoremap <leader>h <c-w>h
# window close
nnoremap <leader>0 <c-w>c
nnoremap <leader>1 <c-w>o
nnoremap <leader>b :action ToggleLineBreakpoint<cr>
nnoremap e he
nnoremap <leader>; :action CommentByLineComment<cr>
vmap <leader>; :action CommentByLineComment<cr>
nnoremap <leader>n :action CloseContent<cr>
nmap gi :action GotoImplementation<CR>
# find things
nmap <leader>ff :find<cr>
nmap <leader>p <action>(PreviousTab)
nmap <leader>xr <action>(run)
nmap <leader>n <action>(NextTab)
nmap <leader>q <action>(CloseEditor)
nmap <leader>i <action>(Generate)
nmap <leader>m <action>(Git.Menu)
nmap <leader>s <action>(QuickChangeScheme)
nmap <leader>/ <action>(ShowErrorDescription)
nmap <leader>e <action>(GotoNextError)
nmap <leader>t <action>(NERDTreeToggle)
nmap <leader>. <action>(RecentFiles)
set clipboard=unnamedplus
nnoremap <Leader>wf :action ToggleZenMode<CR>
nnoremap <Leader>wp :action TogglePresentationMode<CR>
# debug
nnoremap <leader>e :action EvaluateExpression<CR>
vnoremap <leader>e :action EvaluateExpression<CR>
# vim sorround
Plug 'tpope/vim-surround'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment