-
Notifications
You must be signed in to change notification settings - Fork 756
IdeaVim Plugins
IdeaVim plugins work like the original Vim plugins. If you want to turn any of them on, you have to enable it via this command in your ~/.ideavimrc
:
Plug '<plugin-github-reference>'
If you reuse your existing .vimrc
file using source ~/.vimrc
, IdeaVim can parse and enable plugins that are defined
using vim-plug or vundle.
No additional set commands in ~/.ideavimrc
are required.
If you'd like to disable some plugin that's enabled in .vimrc
, you can use set no<extension-name>
in ~/.ideavimrc
. E.g. set nosurround
.
Available plugins:
Original plugin: vim-easymotion.
- Install IdeaVim-EasyMotion and AceJump plugins.
- Add the following command to
~/.ideavimrc
:Plug 'easymotion/vim-easymotion'
Alternative syntax
Plugin 'easymotion/vim-easymotion'
Plug 'https://github.com/easymotion/vim-easymotion'
Plug 'vim-easymotion'
set easymotion
All commands with the mappings are supported. See the full list of supported commands.
By Mikhail Levchenko
Original repository with the plugin: https://github.com/Mishkun/ideavim-sneak
Original plugin: vim-sneak.
- Add the following command to
~/.ideavimrc
:Plug 'justinmk/vim-sneak'
- Type
s
and two chars to start sneaking in forward direction - Type
S
and two chars to start sneaking in backward direction - Type
;
or,
to proceed with sneaking just as if you were usingf
ort
commands
Original plugin: NERDTree.
- Add the following command to
~/.ideavimrc
:Plug 'preservim/nerdtree'
Alternative syntax
Plugin 'preservim/nerdtree'
Plug 'https://github.com/preservim/nerdtree'
Plug 'nerdtree'
set NERDTree
Original plugin: vim-surround.
- Add the following command to
~/.ideavimrc
:Plug 'tpope/vim-surround'
Alternative syntax
Plugin 'tpope/vim-surround'
Plug 'https://www.vim.org/scripts/script.php?script_id=1697'
Plug 'vim-surround'
set surround
https://github.com/tpope/vim-surround/blob/master/doc/surround.txt
Original plugin: vim-multiple-cursors.
- Add the following command to
~/.ideavimrc
:Plug 'terryma/vim-multiple-cursors'
Alternative syntax
Plugin 'terryma/vim-multiple-cursors'
Plug 'https://github.com/terryma/vim-multiple-cursors'
Plug 'vim-multiple-cursors'
set multiple-cursors
At the moment, the default key binds for this plugin do not get mapped correctly in IdeaVim (see VIM-2178). To enable the default key binds, add the following to your .ideavimrc
file...
" 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
By Daniel Leong
Original plugin: commentary.vim.
- Add the following command to
~/.ideavimrc
:Plug 'tpope/vim-commentary'
Alternative syntax
Plugin 'tpope/vim-commentary'
Plug 'https://github.com/tpope/vim-commentary'
Plug 'vim-commentary'
Plug 'tcomment_vim'
set commentary
https://github.com/tpope/vim-commentary/blob/master/doc/commentary.txt
By igrekster
Original plugin: ReplaceWithRegister.
- Add the following command to
~/.ideavimrc
:Plug 'vim-scripts/ReplaceWithRegister'
Alternative syntax
Plugin 'vim-scripts/ReplaceWithRegister'
Plug 'ReplaceWithRegister'
Plug 'https://github.com/inkarkat/vim-ReplaceWithRegister'
Plug 'inkarkat/vim-ReplaceWithRegister'
Plug 'vim-ReplaceWithRegister'
Plug 'https://www.vim.org/scripts/script.php?script_id=2703'
set ReplaceWithRegister
https://github.com/vim-scripts/ReplaceWithRegister/blob/master/doc/ReplaceWithRegister.txt
Original plugin: argtextobj.vim.
- Add the following command to
~/.ideavimrc
:Plug 'vim-scripts/argtextobj.vim'
Alternative syntax
Plugin 'vim-scripts/argtextobj.vim'
Plug 'https://github.com/vim-scripts/argtextobj.vim'
Plug 'argtextobj.vim'
Plug 'https://www.vim.org/scripts/script.php?script_id=2699'
set argtextobj
By default, only the arguments inside parenthesis are considered. To extend the functionality
to other types of brackets, set g:argtextobj_pairs
variable to a comma-separated
list of colon-separated pairs (same as VIM's matchpairs
option), like
let g:argtextobj_pairs="(:),{:},<:>"
. The order of pairs matters when
handling symbols that can also be operators: func(x << 5, 20) >> 17
. To handle
this syntax parenthesis, must come before angle brackets in the list.
By fan-tom
Original plugin: vim-exchange.
- Add the following command to
~/.ideavimrc
:Plug 'tommcdo/vim-exchange'
Alternative syntax
Plugin 'tommcdo/vim-exchange'
Plug 'https://github.com/tommcdo/vim-exchange'
Plug 'vim-exchange'
set exchange
https://github.com/tommcdo/vim-exchange/blob/master/doc/exchange.txt
By Alexandre Grison
Original plugin: vim-textobj-entire.
- Add the following command to
~/.ideavimrc
:Plug 'kana/vim-textobj-entire'
Alternative syntax
Plugin 'kana/vim-textobj-entire'
Plug 'vim-textobj-entire'
Plug 'https://www.vim.org/scripts/script.php?script_id=2610'
set textobj-entire
https://github.com/kana/vim-textobj-entire/blob/master/doc/textobj-entire.txt
By KostkaBrukowa
Original plugin: vim-highlightedyank.
- Add the following command to
~/.ideavimrc
:Plug 'machakann/vim-highlightedyank'
Alternative syntax
Plugin 'machakann/vim-highlightedyank'
Plug 'https://github.com/machakann/vim-highlightedyank'
Plug 'vim-highlightedyank'
set highlightedyank
If you want to optimize highlight duration, assign a time in milliseconds:
let g:highlightedyank_highlight_duration = "1000"
A negative number makes the highlight persistent.
If you want to change background color of highlight you can provide the rgba of the color you want e.g.
let g:highlightedyank_highlight_color = "rgba(160, 160, 160, 155)"
If you want to change text color of highlight you can provide the rgba of the color you want e.g.
let g:highlightedyank_highlight_foreground_color = "rgba(0, 0, 0, 255)"
https://github.com/machakann/vim-highlightedyank/blob/master/doc/highlightedyank.txt
Original plugin: vim-paragraph-motion.
- Add the following command to
~/.ideavimrc
:Plug 'dbakker/vim-paragraph-motion'
Alternative syntax
Plugin 'dbakker/vim-paragraph-motion'
Plug 'https://github.com/dbakker/vim-paragraph-motion'
Plug 'vim-paragraph-motion'
Plug 'https://github.com/vim-scripts/Improved-paragraph-motion'
Plug 'vim-scripts/Improved-paragraph-motion'
Plug 'Improved-paragraph-motion'
set vim-paragraph-motion
https://github.com/dbakker/vim-paragraph-motion#vim-paragraph-motion
By Shrikant Sharat Kandula
Original plugin: vim-indent-object.
- Add the following command to
~/.ideavimrc
:Plug 'michaeljsmith/vim-indent-object'
Alternative syntax
Plugin 'michaeljsmith/vim-indent-object'
Plug 'https://github.com/michaeljsmith/vim-indent-object'
Plug 'vim-indent-object'
set textobj-indent
https://github.com/michaeljsmith/vim-indent-object/blob/master/doc/indent-object.txt
By Martin Yzeiri Original plugin: matchit.vim.
- Add the following command to
~/.ideavimrc
:packadd matchit
Alternative syntax
Plug 'vim-matchit'
Plug 'chrisbra/matchit'
set matchit
https://github.com/adelarsq/vim-matchit/blob/master/doc/matchit.txt
Original plugin: quick-scope.
- Install IdeaVim-Quickscope plugin.
- Add the following command to
~/.ideavimrc
:set quickscope
https://plugins.jetbrains.com/plugin/19417-ideavim-quickscope
Original plugin: vim-which-key.
- Install Which-Key plugin.
- Add the following command to
~/.ideavimrc
:set which-key
https://github.com/TheBlob42/idea-which-key?tab=readme-ov-file#installation
By Julien Phalip
Original plugin: vim-peekaboo.
Add set peekaboo
to your ~/.ideavimrc
file, then run :source ~/.ideavimrc
or restart the IDE.
By Julien Phalip
Add set functiontextobj
to your ~/.ideavimrc
file, then run :source ~/.ideavimrc
or restart the IDE.
https://plugins.jetbrains.com/plugin/25897-vim-functiontextobj
By Julien Phalip
Original plugin: switch.vim.
Add set switch
to your ~/.ideavimrc
file, then run :source ~/.ideavimrc
or restart the IDE.