Redux VS代码-搜索特定函数中的函数引用-macOS

Redux VS代码-搜索特定函数中的函数引用-macOS,redux,visual-studio-code,next.js,redux-devtools,Redux,Visual Studio Code,Next.js,Redux Devtools,在vs代码中有没有快速搜索的方法 method1在method2中引用 我正在尝试查看使用远程redux devtools是否对我的项目有用,并且我们正在使用next js,它通过getInitialProps执行服务器端调用,因此我试图在getInitialProps中查找对dispatch的所有引用 我需要一个更具体的搜索,而不是通过command+shift+F单独搜索任何一个术语(dispatch或getInitialProps)。 在这种情况下,我需要在getInitialProps中

在vs代码中有没有快速搜索的方法 method1在method2中引用

我正在尝试查看使用远程redux devtools是否对我的项目有用,并且我们正在使用next js,它通过
getInitialProps
执行服务器端调用,因此我试图在
getInitialProps
中查找对
dispatch
的所有引用

我需要一个更具体的搜索,而不是通过
command+shift+F
单独搜索任何一个术语(
dispatch
getInitialProps
)。
在这种情况下,我需要在
getInitialProps

中搜索
dispatch
的引用,如果我们可以假设您的
getInitialProps
函数的形式与此类似:

  static async getInitialProps(ctx) {
    const res = await fetch('https://api.github.com/repos/zeit/next.js')
    const json = await res.json()
    dispatchEvent(event)
    return { stars: json.stargazers_count }
  }
特别是关于最后一行的
return
语句,那么这个正则表达式用于区分那些
getInitialProps
函数和该函数中某处的序列
dispatch

^.*getInitialProps[\s\S]*?\bdispatch[\s\S]*?(return).*\n.*
如果您只想要
分派
而不是
分派事件
,您可以在其周围使用单词边界,如
\bdispatch\b
,除非它用作
分派(
),然后使用
\bdispatch(
或类似的名称)