Skip to content

Instantly share code, notes, and snippets.

@yonglam
Created December 21, 2017 12:40
Show Gist options
  • Save yonglam/39ff0395d0f815ef86a5e200b08a8c3b to your computer and use it in GitHub Desktop.
Save yonglam/39ff0395d0f815ef86a5e200b08a8c3b to your computer and use it in GitHub Desktop.
set hlsearch
set incsearch
set ignorecase
set smartcase
set scrolloff=3
imap jj <Esc>
" Window operation
nnoremap <Space>ww <C-W>w
nnoremap <Space>wd <C-W>c
nnoremap <Space>wj <C-W>j
nnoremap <Space>wk <C-W>k
nnoremap <Space>wh <C-W>h
nnoremap <Space>wl <C-W>l
nnoremap <Space>ws <C-W>s
nnoremap <Space>w- <C-W>s
nnoremap <Space>wv <C-W>v
nnoremap <Space>w\| <C-W>v
"
" Tab operation
nnoremap tn gt
nnoremap tp gT
" ==================================================
" " Show all the provided actions via `:actionlist`
" " ==================================================
"
" built in search looks better
" nnoremap / :action Find<CR>
" but preserve ideavim search
nnoremap <Space>/ /
nnoremap <Space>;; :action CommentByLineComment<CR>
nnoremap <Space>bp :action ToggleLineBreakpoint<CR>
nnoremap <Space>vb :action ViewBreakpoints<CR>
nnoremap <Space>cv :action ChangeView<CR>
nnoremap <Space>cd :action ChooseDebugConfiguration<CR>
nnoremap <Space>ga :action GotoAction<CR>
nnoremap <Space>gc :action GotoClass<CR>
nnoremap <Space>gd :action GotoDeclaration<CR>
nnoremap <Space>gf :action GotoFile<CR>
nnoremap <Space>gi :action GotoImplementation<CR>
nnoremap <Space>gs :action GotoSymbol<CR>
nnoremap <Space>gt :action GotoTest<CR>
nnoremap <Space>sf :action FindInPath<CR>
nnoremap <Space>fp :action ShowFilePath<CR>
nnoremap <Space>fu :action FindUsages<CR>
nnoremap <Space>ic :action InspectCode<CR>
nnoremap <Space>mv :action ActivateMavenProjectsToolWindow<CR>
nnoremap <Space>oi :action OptimizeImports<CR>
nnoremap <Space>pm :action ShowPopupMenu<CR>
nnoremap <Space>rc :action ChooseRunConfiguration<CR>
nnoremap <Space>re :action RenameElement<CR>
"nnoremap <Space>rf :action RenameFile<CR>
nnoremap <Space>se :action SearchEverywhere<CR>
nnoremap <Space>su :action ShowUsages<CR>
nnoremap <Space>fs :action FileStructurePopup<CR>
nnoremap <Space>rf :action RecentFiles<CR>
nnoremap <Space>ff :action Forward<CR>
nnoremap <Space>bb :action Back<CR>
nnoremap <Space>ch :action CallHierarchy<CR>
nnoremap <Space>th :action TypeHierarchy<CR>
nnoremap <Space>tc :action CloseActiveTab<CR>
nnoremap <Space>tl Vy<CR>:action ActivateTerminalToolWindow<CR>
vnoremap <Space>tl y<CR>:action ActivateTerminalToolWindow<CR>
nnoremap <Space>cs :action Compare.SameVersion<CR>
nnoremap <Space>cl :action Compare.LastVersion<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment