V2EX LoNeZ
 LoNeZ 最近的时间轴更新
LoNeZ

LoNeZ

V2EX 第 380414 号会员,加入于 2019-01-27 10:53:36 +08:00
LoNeZ 最近回复了
vim mode... 分享一个 idea 的配置

```
" ref: .ideavimrc https://github.com/JetBrains/ideavim/discussions/303
" ref: https://github.com/JetBrains/ideavim/wiki/set-commands
" base configuration
" :actionlist
set showmode
set incsearch
set hlsearch
set nu
set relativenumber
set ignorecase
set smartcase
set clipboard+=unnamed

" keymaps
" the leader key
let mapleader=" "
" redo
nnoremap U <C-r>

" zen-mode
nnoremap <C-z> :action ToggleDistractionFreeMode<CR>

" find
nnoremap <C-f> :action GotoFile<CR>
nnoremap <C-r> :action RecentFiles<CR>

" navigation
nnoremap J }
nnoremap K {

nnoremap sv :action SplitVertically<CR>
nnoremap ss :action SplitHorizontally<CR>
nnoremap sm :action MoveEditorToOppositeTabGroup<CR>

nnoremap sh <c-w>h
nnoremap sl <c-w>l
nnoremap sj <c-w>
nnoremap sk <c-w>k

nnoremap jp :action PreviousTab<CR>
" S => right shift
nnoremap jn :action NextTab<CR>

nnoremap ;q :action CloseContent<CR>
nnoremap ;a :action CloseAllEditors<CR>

" code interactions
nnoremap <leader>c :action CommentByLineComment<CR>
nnoremap <leader>C :action CommentByBlockComment<CR>
nnoremap <leader>r :action RenameElement<CR>
nnoremap <leader>f :action ReformatCode<CR>
nnoremap <leader>re :action Refactorings.QuickListPopupAction<CR>
nnoremap <leader>su :action ShowUsages<CR>
nnoremap <leader>sU :action FindUsages<CR>
nnoremap <leader>m :action CollapseRegion<CR>
nnoremap <leader>M :action ExpandRegion<CR>
nnoremap <leader>am :action CollapseAllRegions<CR>
nnoremap <leader>aM :action ExpandAllRegions<CR>

" goto start with g
" goto LSP start with s
nnoremap ge :action GotoNextError<CR>
nnoremap gE :action GotoNextError<CR>
nnoremap ga :action GotoAction<CR>
nnoremap gc :action GotoClass<CR>
nnoremap gi :action GotoImplementation<CR>
nnoremap si :action LSP.GotoImplementation<CR>

nnoremap go :action GotoSuperMethod<CR>
nnoremap gd :action GotoDeclaration<CR>
nnoremap sd :action LSP.GotoDeclaration<CR>
nnoremap sr :action LSP.GotoReference<CR>
nnoremap st :action LSP.GotoTypeDefinition<CR>
nnoremap gf :action GotoSymbol<CR>
nnoremap gt :action GotoTest<CR>
nnoremap gT :action TextSearchAction<CR>
nnoremap gs :action copilot.chat.show<CR>


" code selection
nnoremap <S-j> :action MoveLineDown<CR>
nnoremap <S-k> :action MoveLineUp<CR>

" debugging
nnoremap <leader>d :action Debug<CR>
nnoremap <leader>dc :action DebugClass
nnoremap <leader>ds :action Stop<CR>
nnoremap <leader>db :action ToggleLineBreakpoint<CR>

" run
nnoremap <leader>rc :action ContextRun<CR>
nnoremap <leader>rx :action ChooseRunConfiguration<CR>
nnoremap <leader>rr :action Rerun<CR>
nnoremap <leader>rt :action RunTests<CR>
nnoremap <leader>rs :action Stop<CR>

" search
nnoremap <leader><leader> :action SearchEverywhere<CR>

"---------- plugins ----------
" easy motion
set easymotion
map f <Plug>(easymotion-s)
" commentary
" gcc | gcm
Plugin 'tpope/vim-commentary'
set commentary

```
3 天前
回复了 fc077 创建的主题 生活 三十而已
30 岁 11 月生日 我记得现在去上海野生动物园免门票
8 天前
回复了 sampeng 创建的主题 Cloudflare cloudflare 全球挂了??
19 天前
回复了 bladeRunner2049 创建的主题 Windows 电脑中英文切换的问题
@kzfile 我现在的方案是 搜狗只保留中文 系统 ABC 这样切换就是单一的了, 然后 vim mode 下 按 esc 自动切换到 ABC
fila hoka...
19 天前
回复了 infyni 创建的主题 生活 怎么应付给老婆拍照这种历史难题?
用这个镜头 85mm-f1.8.
21 天前
回复了 midsolo 创建的主题 程序员 code review 把国外的同事气到吐血
看场景..和重要程度...
22 天前
回复了 Lowlife 创建的主题 问与答 兄弟们,这是不是另类的 PUA?
其实... 如果模特好看, 怎么拍都很好看...
八方旅人
关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3631 人在线   最高记录 6679       Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 12ms UTC 00:04 PVG 08:04 LAX 16:04 JFK 19:04
Do have faith in what you're doing.
ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86