Skip to content

Instantly share code, notes, and snippets.

@flamewing
Created October 9, 2019 13:21
Show Gist options
  • Save flamewing/b148d98c38886fc4bc4ac400df71a58a to your computer and use it in GitHub Desktop.
Save flamewing/b148d98c38886fc4bc4ac400df71a58a to your computer and use it in GitHub Desktop.
vim unwrap returns

Pattern to search for:

    return\s\+(\_[^;]\+)\s*;

Command to unwrap the parentheses from a return (cursor before the parentheses):

    nf(di(vhp

Using these, you can turn this:

    return (0);

into this:

    return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment