Skip to content

Instantly share code, notes, and snippets.

@katyukha
Created December 13, 2021 23:20
Show Gist options
  • Save katyukha/822cdc3120efdadab38d133ea542c96f to your computer and use it in GitHub Desktop.
Save katyukha/822cdc3120efdadab38d133ea542c96f to your computer and use it in GitHub Desktop.
Idea Vim RC
"" 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)
" Find more examples here: https://jb.gg/share-ideavimrc
set NERDTree
imap <F2> <Esc>:w<CR>
map <F2> <Esc>:w<CR>
imap <F3> <Esc>:sh<CR>
map <F3> <Esc>:sh<CR>
imap <F4> <Esc>:tabnew .<CR>
map <F4> <Esc>:tabnew .<CR>
imap <F5> <Esc> :tabprev <CR>
map <F5> :tabprev <CR>
imap <F6> <Esc> :tabnext <CR>
map <F6> :tabnext <CR>
imap <F7> <Esc> :set invnumber<CR>i
map <F7> <Esc> :set invnumber<CR>
imap <F8> <Esc> :set invhlsearch<CR>i
map <F8> <Esc> :set invhlsearch<CR>
nmap <F11> :NERDTreeFocus<CR>
imap <F11> <ESC>:NERDTreeFocus<CR>
vmap <F11> <ESC>:NERDTreeFocus<CR>
nmap J <C-f>
nmap K <C-b>
nnoremap <silent> Q :q
nmap \cc :action CommentByLineComment<CR>
vmap \cc :action CommentByLineComment<CR>
imap \cc <ESC>:action CommentByLineComment<CR>
nmap \c<space> :action CommentByLineComment<CR>
vmap \c<space> :action CommentByLineComment<CR>
imap \c<space> <ESC>:action CommentByLineComment<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment