" .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'
" 顯示當(dāng)前模式
set showmode
" 打開行號
set number
" 設(shè)置命令歷史記錄條數(shù)
set history=2000
" 關(guān)閉兼容vi
set nocompatible
" 開啟語法高亮功能
syntax enable
" 允許用指定語法高亮配色方案替換默認(rèn)方案
syntax on
" 模式搜索實時預(yù)覽,增量搜索
set incsearch
" 設(shè)置搜索高亮
set hlsearch
" 忽略大小寫 (該命令配合smartcase使用較好掖蛤,否則不要開啟)
set ignorecase
" 模式查找時智能忽略大小寫
set smartcase
" vim自身命令行模式智能補(bǔ)全
set wildmenu
" 總是顯示狀態(tài)欄
set laststatus=2
" 顯示光標(biāo)當(dāng)前位置
set ruler
" 高亮顯示當(dāng)前行/列
set cursorline
"set cursorcolumn
" 禁止折行
set nowrap
" 將制表符擴(kuò)展為空格
set expandtab
" 設(shè)置編輯時制表符占用空格數(shù)
set tabstop=8
" 設(shè)置格式化時制表符占用空格數(shù)
set shiftwidth=4
" 讓 vim 把連續(xù)數(shù)量的空格視為一個制表符
set softtabstop=4
" 基于縮進(jìn)或語法進(jìn)行代碼折疊
set foldmethod=syntax
" 啟動 vim 時關(guān)閉折疊代碼
set nofoldenable
" 開啟surround
set surround
" 留五行空白
set so 20
" 中文輸入法問題
set keep-english-in-normal-and-restore-in-insert
inoremap jk <esc>
" 設(shè)置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)
" 跳轉(zhuǎn)
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)
" 觸發(fā)
nnoremap ta :action Annotate<cr>
nnoremap tb :action ToggleLineBreakpoint<cr>
nnoremap tm :action ToggleBookmarkWithMnemonic<cr>
nnoremap tp :action SelectInProjectView<CR>
" 標(biāo)簽頁切換
nnoremap <space>h gT
nnoremap <space>l gt
" 內(nèi)容搜索
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配置
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
- 文/潘曉璐 我一進(jìn)店門笋敞,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人荠瘪,你說我怎么就攤上這事夯巷。” “怎么了哀墓?”我有些...
- 文/不壞的土叔 我叫張陵趁餐,是天一觀的道長。 經(jīng)常有香客問我篮绰,道長后雷,這世上最難降的妖魔是什么? 我笑而不...
- 正文 為了忘掉前任,我火速辦了婚禮喷面,結(jié)果婚禮上星瘾,老公的妹妹穿的比我還像新娘走孽。我一直安慰自己惧辈,他們只是感情好,可當(dāng)我...
- 文/花漫 我一把揭開白布磕瓷。 她就那樣靜靜地躺著盒齿,像睡著了一般。 火紅的嫁衣襯著肌膚如雪困食。 梳的紋絲不亂的頭發(fā)上边翁,一...
- 文/蒼蘭香墨 我猛地睜開眼垛贤,長吁一口氣:“原來是場噩夢啊……” “哼焰坪!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起聘惦,我...
- 正文 年R本政府宣布,位于F島的核電站衣洁,受9級特大地震影響墓捻,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
- 文/蒙蒙 一砖第、第九天 我趴在偏房一處隱蔽的房頂上張望撤卢。 院中可真熱鬧,春花似錦梧兼、人聲如沸放吩。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽渡紫。三九已至,卻和暖如春考赛,著一層夾襖步出監(jiān)牢的瞬間惕澎,已是汗流浹背。 一陣腳步聲響...
推薦閱讀更多精彩內(nèi)容
- #遇見幸福 02.28 早課 活在當(dāng)下唆阿,不延展。一件事情發(fā)生了锈锤,如果沒有過去的記憶就只如實的觀察這件事驯鳖,不會激發(fā)我...
- app/layout寫了上面的app/dashboard/layout寫了下面的事實上嵌套可以的但是還是得看別人大...
- 為什么我現(xiàn)在又打開簡書了呢浅辙?因為最近經(jīng)歷太多事情,我需要找人對話了阎姥。 看到我爸發(fā)的抖音內(nèi)容记舆,他的經(jīng)歷和感受,孤獨和...
- 子謂南容:“邦有道呼巴,不廢泽腮;邦無道,免于邢戮衣赶≌锷蓿”以其兄之子妻之。 ----孔子《論語·公冶長》 孔子談到南容:“國家...