I just want to transform
for(int i = 1; i <= N; i++) if(ord[i] == -1) dfs(i, 0, i);
to
for(int i = 1; i <= N; i++) {
if(ord[i] == -1) dfs(i, 0, i);
}
as little key I should press as possible.
I found the plugin 'surround' but It seems like it has some functions(like 'yss{') that surrounds entire text line with brackets but not the block I want to surround. And if it is possible, i have to add some new lines at some position, so i think it will be so uncomfortable.
And I also found some original vim commands, but I was too long and seems like taking too much time.
I'll be so glad if you guys tell me which plugin i should use. Thank you!