Last active
May 6, 2025 13:59
-
-
Save kuroski/54b4b27add75e0c02d215b0379de53d3 to your computer and use it in GitHub Desktop.
.ideavimrc
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
" LazyVim default settings | |
" https://www.lazyvim.org/configuration/general | |
source ~/.lazy-ideavimrc | |
unmap <leader>s" | |
" ensure <Esc> really quits vim-multiple-cursors (default quit key is <Esc>) | |
" LazyVim had `nmap <esc> :nohlsearch<CR>` which blocks the plugin’s mapping. | |
" We redefine it so that a raw <Esc> gets sent first (quitting cursors) then clears hlsearch. | |
silent! nunmap <Esc> | |
silent! vunmap <Esc> | |
nnoremap <Esc> <Esc>:nohlsearch<CR> | |
xnoremap <Esc> <Esc>:nohlsearch<CR> | |
""" Plugins -------------------------------- | |
set surround | |
set commentary | |
set argtextobj | |
set textobj-entire | |
" set ReplaceWithRegister | |
set peekaboo | |
""" Common settings ------------------------- | |
set so=5 | |
""" Idea specific settings ------------------ | |
set ideajoin | |
set ideastatusicon=gray | |
set idearefactormode=keep | |
""" Custom --------------------------------- | |
Plug 'terryma/vim-multiple-cursors' | |
" Remap multiple-cursors shortcuts to match terryma/vim-multiple-cursors | |
nmap <C-n> <Plug>NextWholeOccurrence | |
xmap <C-n> <Plug>NextWholeOccurrence | |
nmap g<C-n> <Plug>NextOccurrence | |
xmap g<C-n> <Plug>NextOccurrence | |
xmap <C-x> <Plug>SkipOccurrence | |
xmap <C-p> <Plug>RemoveOccurrence | |
" Note that the default <A-n> and g<A-n> shortcuts don't work on Mac due to dead keys. | |
" <A-n> is used to enter accented text e.g. ñ | |
" Feel free to pick your own mappings that are not affected. I like to use <leader> | |
nmap <leader><C-n> <Plug>AllWholeOccurrences | |
xmap <leader><C-n> <Plug>AllWholeOccurrences | |
nmap <leader>g<C-n> <Plug>AllOccurrences | |
xmap <leader>g<C-n> <Plug>AllOccurrences | |
" | |
Plug 'machakann/vim-highlightedyank' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment