ideavimrc 示例

我自己的idea vim配置,用熟悉了以后还真的挺方便的
比较常用的有
ManageRecentProjects,快速切换多个project,经常会遇到同时打开多个project,来回切换方便多了
HideAllWindows,隐藏所有窗口,即放大当前窗口,快速专注,更进一步,进入专注模式ToggleDistractionFreeMode,连菜单栏都隐藏
其他还有GotoFile, FindInPath, GotoImplementation, GotoDeclaration, RenameElement, SelectInProjectView 都是很常用的功能

""" Map leader to space ---------------------
let mapleader=" "

""" set english in normal
let keep_input_source_in_normal="com.apple.keylayout.ABC"
set keep-english-in-normal


""" Plugins  --------------------------------
set easymotion
set NERDTree
""" Plugin settings -------------------------

""" Common settings -------------------------
set clipboard+=unnamed

""" Idea specific settings ------------------
set ideajoin
set ideastatusicon=gray
set idearefactormode=keep

""" Mappings --------------------------------
xnoremap p pgvy

""" Action is not suitable for noremap, only map
map <leader>i <Action>(GotoImplementation)
map <leader>h <Action>(FindInPath)
map <leader>d <Action>(GotoDeclaration)
map <leader>g <Action>(Generate)
map <leader>r <Action>(RenameElement)
map <leader>a <Action>(ShowIntentionActions)
map <leader>o <Action>(FileStructurePopup)
map <leader>s <Action>(Switcher)
map <leader>c <Action>(GotoFile)
map <leader>m <Action>(HideAllWindows)
map <leader>M <Action>(ToggleDistractionFreeMode)
map <leader>u <Action>(ShowUmlDiagram)
map <leader>e <Action>(GotoNextError)
map <leader>p <Action>(SelectInProjectView)
map <leader>t <Action>(ActivateTerminalToolWindow)
map <leader>w <Action>(CopyReference)
map <leader>j <Action>(CloseAllEditorsButActive)
map <leader>l <Action>(SplitVertically)
""" map <leader>j <Action>(CloseAllEditors)
map <leader>n <Action>(ManageRecentProjects)
map <leader>b <Action>(EditorCompleteStatement)
map <leader>v <Action>(ExtractMethod)

posted on 2022-11-09 15:49  mindSucker  阅读(56)  评论(0编辑  收藏  举报