"" 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)
let mapleader=','
" Find more examples here: https://jb.gg/share-ideavimrc
""" Plugins -------------------------------- " ys, cs, ds, S set surround " gcc, gc + motion, v_gc set commentary " argument text objects: aa, ia set argtextobj " cx{motion} to select, again to exchange set exchange " entire buffer text object: ae set textobj-entire " easymotion <Leader> s / f set easymotion " 寄存器替换 set ReplaceWithRegister " 文件树展示 set NERDTree " 复制时高亮内容 set highlightedyank " 空格行也能够跳转 set vim-paragraph-motion
""" Common settings ------------------------- " 显示当前mode set showmode " 光标移动时保留5行 set so=5 " 实时查找 set incsearch " 显示行号 set nu " 忽略大小写 set ignorecase " 允许光标到行末 set virtualedit=onemore " 搜索内容高亮显示 set hlsearch
""" Idea specific settings ------------------ " 多行合并 J set ideajoin " icon展示 set ideastatusicon=gray " 在normal mode默认eng set keep-english-in-normal-and-restore-in-insert
""" Plugin settings ------------------------- let g:argtextobj_pairs="[:],(:),<:>" let g:highlightedyank_highlight_duration = "1000"
""" My Mappings ----------------------------- map <leader>f <Plug>(easymotion-s) map <leader>e <Plug>(easymotion-f)
map <leader>d <Action>(Debug) map <leader>r <Action>(RenameElement) map <leader>c <Action>(Stop) map <leader>z <Action>(ToggleDistractionFreeMode)
map <leader>s <Action>(SelectInProjectView) map <leader>a <Action>(Annotate) map <leader>h <Action>(Vcs.ShowTabbedFileHistory) map <S-Space> <Action>(GotoNextError)
map <leader>= <Action>(ReformatCode)
nnoremap <Tab> >>_ nnoremap <S-Tab> <<_ inoremap <S-Tab> <C-D> vnoremap <Tab> >gv vnoremap <S-Tab> <gv
set ideastrictmode
|