mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-18 19:24:55 +02:00
.github
.idea
.teamcity
assets
config
doc
images
Emulated-plugins.md
Home.md
NERDTree-support.md
Select-mode.md
ideajoin-examples.md
set-commands.md
sethandler.md
gradle
src
vim-engine
vimscript-info
.editorconfig
.gitignore
AUTHORS.md
CHANGES.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.txt
README.md
build.gradle.kts
gradle.properties
gradlew
gradlew.bat
qodana.yaml
settings.gradle
1.0 KiB
1.0 KiB
Some examples of join command with ideajoin
option enabled.
Put set ideajoin
to your ~/.ideavimrc
to enable this functionality.
Now, you can press J
(shift+j
) on a line or a selected block of text to join the lines together.
- Automatic join concatenated lines:
"Hello" + -> "Hello world"
" world!"
- Nested if's:
if (a) { -> if (a && b) {
if (b) { ...
... }
}
}
- Comments:
// Hello -> // Hello world
// world
- Remove braces from one line for / if / while:
if (fail) { -> if (fail) return;
return;
}
- Kotlin one line method:
fun myNumber(): Int { -> fun myNumber(): Int = 42
return 42
}
- Join declaration and initialization:
int a; -> int a = 5;
a = 5;
- Chain call:
sb.append("a"); -> sb.append("a").append("b");
sb.append("b");
And other features provided by the plugins.