Skip to content
Discussion options

You must be logged in to vote

You can create some clever vim mapping to do this.
e.g. if you place your caret at the first line of function definition nnoremap dm Va{%d would do the job for functions like this:

fun name(args): Int {
  ....
}

or even better nnoremap dk V/{<CR>%d would also work for functions where arguments occupy multiple lines:

fun name(arg1,
arg2) {
  ...
}

Replies: 5 comments 21 replies

Comment options

You must be logged in to vote
3 replies
@yaoqiangpersonal
Comment options

@Sebastian-Nielsen
Comment options

@lippfi
Comment options

Answer selected by yaoqiangpersonal
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
18 replies
@magidc
Comment options

@huyz
Comment options

@OptimusCrime
Comment options

@magidc
Comment options

@magidc
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants