Last active
July 10, 2025 10:42
-
-
Save RomjanHossain/db0763b34db4acdd4896340adcea2a31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ~/.ideavimrc — Cleaned & Enhanced for Android Studio with IdeaVim | |
" https://jb.gg/ideavimrc - Official doc | |
" ======================[ General Settings ]======================= | |
let mapleader=" " | |
" Show line numbers & scroll padding | |
set number | |
set scrolloff=5 | |
" Search | |
set incsearch | |
set hlsearch | |
set ignorecase | |
set smartcase | |
" Clipboard & UX | |
set clipboard=unnamed | |
set visualbell | |
set showmode | |
set NERDTree | |
set easymotion | |
set notimeout | |
set which-key | |
" ======================[ Plugins via Plug ]======================= | |
" Plugins (only those supported by IdeaVim) | |
Plug 'machakann/vim-highlightedyank' " Highlight yank | |
Plug 'tpope/vim-commentary' " Commenting | |
Plug 'tpope/vim-surround' " Surround objects | |
Plug 'terryma/vim-multiple-cursors' " <C-n>, etc. | |
Plug 'karb94/neoscroll.nvim' " Smooth scroll (limited support) | |
" Optional plugins (partial support in IdeaVim, test before use) | |
Plug 'kana/vim-textobj-user' | |
Plug 'kana/vim-textobj-entire' | |
Plug 'vim-scripts/argtextobj.vim' | |
Plug 'tommcdo/vim-exchange' | |
Plug 'inkarkat/vim-ReplaceWithRegister' | |
" ======================[ Insert Mode Enhancements ]======================= | |
" Exit insert mode with jk or kj | |
imap jk <ESC> | |
imap kj <ESC> | |
" ======================[ Window Navigation (Vim Style) ]================== | |
nmap <C-h> <Action>(SelectPreviousWindow) | |
nmap <C-l> <Action>(SelectNextWindow) | |
nmap <C-w>v <Action>(SplitVertically) | |
nmap <C-w>s <Action>(SplitHorizontally) | |
" ======================[ Buffer/Tab Navigation ]========================== | |
nmap H :action PreviousTab<CR> | |
nmap L :action NextTab<CR> | |
nnoremap <s-TAB> :action PreviousTab<CR> | |
nnoremap <TAB> :action NextTab<CR> | |
" Pane navigation | |
nnoremap <A-h> <C-w>h | |
nnoremap <A-l> <C-w>l | |
nnoremap <A-k> <C-w>k | |
nnoremap <A-j> <C-w>j | |
" ======================[ Terminal ] ====================================== | |
nmap <leader>t <Action>(ActivateTerminalToolWindow) | |
" ======================[ Diagnostics & Errors ]=========================== | |
nmap [d <Action>(PreviousErrorOrWarning) | |
nmap ]d <Action>(NextErrorOrWarning) | |
nmap <leader>gs <Action>(ViewRecentProblems) | |
nmap <leader>k <Action>(ShowErrorDescription) | |
nmap <S-Space> <Action>(GotoNextError) | |
" ======================[ LSP-like Mappings ]============================== | |
nmap <leader>r <Action>(RenameElement) | |
nmap <leader>ca <Action>(ShowIntentionActions) | |
nmap <leader>gf <Action>(FindUsages) | |
nmap <leader>fr <Action>(GotoImplementation) | |
nmap <leader>o <Action>(FileStructurePopup) | |
nmap <leader>si <Action>(ImplementMethods) | |
nmap <leader>sr <Action>(Refactorings.QuickListPopup) | |
" ======================[ File Navigation ]================================ | |
"map <leader>e <Action>(NERDTreeToggle) | |
" Open NERDTree (use q to exit) | |
map <leader>e :NERDTreeToggle<CR> | |
map <leader>p :action SearchEverywhere<CR> | |
map <leader>ff :action GotoFile<CR> | |
map <leader>s <Action>(SelectInProjectView) | |
map <leader>S :action Switcher<CR> | |
" ======================[ VCS ]============================================ | |
map <leader>a <Action>(Annotate) | |
map <leader>h <Action>(Vcs.ShowTabbedFileHistory) | |
" ======================[ Code Editing ]=================================== | |
nmap == :action ReformatCode<CR> | |
vmap == :action ReformatCode<CR> | |
nmap -- :action OptimizeImports<CR> | |
vmap -- :action OptimizeImports<CR> | |
map <leader>l V<Action>(ReformatCode) | |
" Move line up/down | |
nmap <A-j> <Action>(MoveLineDown) | |
xmap <A-j> <Action>(MoveLineDown) | |
nmap <A-k> <Action>(MoveLineUp) | |
xmap <A-k> <Action>(MoveLineUp) | |
" Quick line insert | |
map <leader>J Ji<ESC> | |
" ======================[ Commenting ]===================================== | |
xmap <Leader>/ <Action>(CommentByLineComment)<ESC><ESC> | |
nmap <Leader>/ <Action>(CommentByLineComment)k | |
" ======================[ Debugging ]====================================== | |
map <leader>d <Action>(Debug) | |
map <leader>F <Action>(Debug) | |
map <leader>b <Action>(ToggleLineBreakpoint) | |
" ======================[ Window Management ]============================== | |
map <leader><Enter> <Action>(HideAllWindows) | |
map <leader>q :action CloseContent<CR> | |
map <leader>x :action CloseContent<CR> | |
map <leader>w :action SaveAll<CR> | |
" ======================[ Tools & Actions ]================================ | |
nnoremap ,a :action GotoAction<CR> | |
vnoremap ,a :action GotoAction<CR> | |
nmap <leader>vr <Action>(IdeaVim.ReloadVimRc.reload) | |
" Display options | |
map <leader>dd <action>(ToggleDistractionFreeMode) | |
map <leader>dz <action>(ToggleZenMode) | |
map <leader>df <action>(ToggleFullScreen) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment