Skip to content

Instantly share code, notes, and snippets.

@cpuuntery
Last active June 1, 2021 14:30
Show Gist options
  • Select an option

  • Save cpuuntery/c536b7e5f7192a9ef93bc2301994a49b to your computer and use it in GitHub Desktop.

Select an option

Save cpuuntery/c536b7e5f7192a9ef93bc2301994a49b to your computer and use it in GitHub Desktop.
# add blank lines between lines
find: \R
replace: $0$0
# add string to blank lines
find: ^(?:[\t ]*(?:\r?\n|\r))+
replace: the string
# add string at the end of each line
find: $
replace: the string
# add qoutes at the start and end of each line
find: (.+)
replace: "\1"
# add string to the start of ecach line
find: ^
replace: cd
# convert multiline to single line
find: \R
replace: leave it empty
#remove duplicate lines (the bothe the orignal and the duplicate)
^(.+(?:\R|$))\1+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment