" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
"" -- 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.
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
" 显示当前模式
set showmode
" 打开行号
set number
" 设置命令历史记录条数
set history=2000
" 关闭兼容vi
set nocompatible
" 开启语法高亮功能
syntax enable
" 允许用指定语法高亮配色方案替换默认方案
syntax on
" 模式搜索实时预览,增量搜索
set incsearch
" 设置搜索高亮
set hlsearch
" 忽略大小写 (该命令配合smartcase使用较好,否则不要开启)
set ignorecase
" 模式查找时智能忽略大小写
set smartcase
" vim自身命令行模式智能补全
set wildmenu
" 总是显示状态栏
set laststatus=2
" 显示光标当前位置
set ruler
" 高亮显示当前行/列
set cursorline
"set cursorcolumn
" 禁止折行
set nowrap
" 将制表符扩展为空格
set expandtab
" 设置编辑时制表符占用空格数
set tabstop=8
" 设置格式化时制表符占用空格数
set shiftwidth=4
" 让 vim 把连续数量的空格视为一个制表符
set softtabstop=4
" 基于缩进或语法进行代码折叠
set foldmethod=syntax
" 启动 vim 时关闭折叠代码
set nofoldenable
" 开启surround
set surround
" 留五行空白
set so 20
" 中文输入法问题
set keep-english-in-normal-and-restore-in-insert
inoremap jk <esc>
" 设置leader键
let mapleader=","
" show in project view
map ;s <Action>(SelectInProjectView)
" run current test
map ;t <Action>(ContextRun)
close test result
map ;c <Action>(DSM.Close)
map <enter> <Action>(SelectFirstItem)
" 打开最近的项目
nnoremap <Leader>o :<C-u>action RecentProjectListGroup<CR>
" esc
map <leader>q <esc>
map <leader>v <Action>(IntroduceVariable)
" open terminal
map <leader>t <Action>(ActivateTerminalToolWindow)
" show full screen
map <leader>z <Action>(ToggleDistractionFreeMode)
" rename element
map <leader>r <Action>(RenameElement)
" reformat code
map <leader>c <Action>(ReformatCode)
" show structure
map <leader>ss <Action>(FileStructurePopup)
" close editors but active
map <leader>ea <Action>(CloseAllEditorsButActive)
map <leader>f <Action>(AceDeclarationAction)
" 跳转
map ga <Action>(GotoAction)
map gb <Action>(JumpToLastChange)
map go <Action>(GotoClass)
map gd <Action>(GotoDeclaration)
map gs <Action>(GotoSuperMethod)
map gi <Action>(GotoImplementation)
map gf <Action>(GotoFile)
map gm <Action>(GotoSymbol)
map gu <Action>(ShowUsages)
map gt <Action>(GotoTest)
map gp <Action>(FindInPath)
map gr <Action>(RecentFiles)
map gh <Action>(Back)
map gl <Action>(Forward)
" 触发
nnoremap ta :action Annotate<cr>
nnoremap tb :action ToggleLineBreakpoint<cr>
nnoremap tm :action ToggleBookmarkWithMnemonic<cr>
nnoremap tp :action SelectInProjectView<CR>
" 标签页切换
nnoremap <space>h gT
nnoremap <space>l gt
" 内容搜索
map f <Action>(AceAction)
" go to declaration
map F <Action>(AceDeclarationAction)
" 代码编辑
nnoremap cc :<C-u>action CommentByLineComment<CR>
vnoremap cc :<C-u>action CommentByLineComment<CR>
"" -- 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)
2024-02-28 ideavim配置
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- app/layout写了上面的app/dashboard/layout写了下面的事实上嵌套可以的但是还是得看别人大...