Skip to content

Instantly share code, notes, and snippets.

@marcelox
Last active November 11, 2022 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelox/1b8ebbcb41fd0efb6b74d4111804d76e to your computer and use it in GitHub Desktop.
Save marcelox/1b8ebbcb41fd0efb6b74d4111804d76e to your computer and use it in GitHub Desktop.
"" Source your .vimrc
"source ~/.vimrc
"" -- 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
"" -- 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 nornu
" Find more examples here: https://jb.gg/share-ideavimrc
" Sets hjkl as pane movement keys
nnoremap <Space>j <c-w>h
nnoremap <Space>k <c-w>l
nnoremap <Space>h <c-w>j
nnoremap <Space>l <c-w>k
nnoremap <Space>d <c-d>
nnoremap <Space>u <c-u>
set noerrorbells
set visualbell
set showmode
set showcmd " show partial command in statusbar
"^$ The symbol is too hard to press
map gh ^
map gl $
map <Space>t gt
nnoremap <Space>o :action MoveEditorToOppositeTabGroup<CR>
nnoremap <Space>n :action VcsShowNextChangeMarker<CR>
nnoremap <Space>r :action Run<CR>
nnoremap <Space>e :action ShowErrorDescription<CR>
nnoremap <Space>] :action EditorIncreaseFontSizeGlobal<CR>
nnoremap <Space>[ :action EditorDecreaseFontSizeGlobal<CR>
" Git diff
nnoremap <Space>g :action Compare.SameVersion<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment