Skip to content

Instantly share code, notes, and snippets.



Last active Apr 23, 2017
What would you like to do?
Super simple JavaScript git diff hunk header config
*.js diff="javascript"
# In git config: .git/config, ~/.gitconfig, /etc/gitconfig
[diff "javascript"]
xfuncname = "^\\s*(.*?\\bfunction\\b.*?\\(.*?\\))"

This comment has been minimized.

Copy link

@eilgin eilgin commented Apr 23, 2017

Cool tip !
But this doesn't work for functions like this (ES2015 syntax):

class Foo {
  constructor () { = "baz"

  getBar () {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment