ideavim插件配置文件
ideavim插件配置
set scrolloff=3 " 3 lines above/below cursor when scrolling
" 突出显示当前行
set cursorline
" 在状态栏显示正在输入的命令
set showcmd
" Emulated Plugins
set surround
" Use Idea to join lines smartly
set ideajoin
" Multiple cursors support
set multiple-cursors
" Vim 的默认寄存器和系统剪贴板共享
set clipboard+=unnamed
set history=100000
" select模式下复制
if has("clipboard")
vnoremap "+y
endif
" 修改leader键
let mapleader = ‘ ‘
imap ,.
vmap ,.
" 设置文内智能搜索提示
" 高亮search命中的文本
set hlsearch
" 打开增量搜索模式,随着键入即时搜索
set incsearch
" 搜索时忽略大小写
set ignorecase
" 有一个或以上大写字母时仍大小写敏感
set smartcase
" 去掉搜索高亮
nnoremap / :nohls
" clear the highlighted search result
nnoremap sc :nohlsearch
" These create newlines like o and O but stay in normal mode
nmap zj ok
nmap zk Oj
" key bindings for quickly movign between windows
" h left, l right, k up, j down
nmap h h
nmap l l
nmap k k
nmap j j
" Move half page faster
nnoremap d
nnoremap u
" Tab operation
nnoremap tn gt
nnoremap tp gT
" Closing tabs
nmap tx :action CloseContent
nmap tX :action ReopenClosedTab
" Move to the start of line
nnoremap H ^
" Move to the end of line
nnoremap L $
" Redo
nnoremap U
" Yank to the end of line
nnoremap Y y$
nmap b :action Back
nmap f :action Forward
nmap c :action GotoClass
nmap sp :action FileStructurePopup
nmap ed :action ShowErrorDescription
nmap == :action ReformatCode
" Switches between .cc and .h file!
nmap s :action GotoRelated
" Won‘t work in visual mode (with vmap) for some reason.
" Use default map of for that.
nmap gcc :action CommentByLineComment
nmap ;; :action CommentByLineComment
nmap gzz :action CommentByBlockComment
" Terminal
nmap T :action ActivateTerminalToolWindow
" Errors
nmap q :action GotoNextError
nmap Q :action GotoPreviousError
" 映射到idea快捷键
" 弹出输入框,可以跳到指定类
nnoremap gc :action GotoClass
" 弹出输入框,跳转到指定操作
nnoremap ga :action GotoAction
" 跳转到定义
nnoremap gd :action GotoDeclaration
" 跳转到实现
nnoremap gi :action GotoImplementation
" 跳转到指定的文件
nnoremap gf :action GotoFile
" 跳转到方法的声明
nnoremap gs :action GotoSuperMethod
" 跳转到测试
nnoremap gt :action GotoTest
" 跳转到变量的声明
nnoremap gS :action GotoSymbol
nnoremap oi :action OptimizeImports
" 查找使用
nnoremap fu :action FindUsages
" 显示使用
nnoremap su :action ShowUsages
nnoremap fsp :action FileStructurePopup
nnoremap fp :action ShowFilePath
nnoremap re :action RenameElement
nnoremap rf :action RenameFile
nnoremap se :action SearchEverywhere
nnoremap su :action ShowUsages
nnoremap pm :action ShowPopupMenu
nnoremap tc :action CloseActiveTab
nnoremap th :action TypeHierarchy
nnoremap wt :action ActiveToolwindowGroup
nnoremap wj :action ActivateStructureToolWindow
nnoremap fip :action FindInPath
nnoremap nc :action NewClass
nnoremap np :action NewProject
nnoremap nm :action NewModule
nnoremap nf :action NewFile
" 前进,相当似于eclipse中的alt+方向右键
nnoremap gf :action Forward
" 后退,相当于eclipse中的alt+方向左键
nnoremap gb :action Back
" gh=go head, 映射vim中的^
nnoremap gh ^
" gl=go last,映射vim中的$
nnoremap gl $
" Window operation
nnoremap ww w
nnoremap wc c
nnoremap wj j
nnoremap wk k
nnoremap wh h
nnoremap wl l
nnoremap ws s
nnoremap w- -
nnoremap w+ +
nnoremap w= =
nnoremap wv vf
原文:https://www.cnblogs.com/skystarry/p/14949681.html