zoukankan      html  css  js  c++  java
  • 如何找到某个方法的声明

     (文章是从我的个人主页上粘贴过来的,大家也可以访问我的主页 www.iwangzheng.com)

    1. 在VIM中,输入:    :Gsearch -F '要搜索的东西' -R --include=*rb --include=*js
    2. 就会得到:(可以看到,最下面的绿色地方,就是JS的声明)
    1 #
    2 # Modify the contents of this buffer and then
    3 # use the ":Greplace" command to merge the changes.
    4 #

    5 app/views/client/version_ups/_form.html.erb:149:  validate_form( 'form', {
    ...

    ...
    15 app/views/layouts/_customized_coffeescript.html.erb:118:@validate_form = (form_selector, options) ->

    只有15那一条变量前面是加了@符号的,所以就可以直接回车查看了,那个文件就是方法声明的地方。

  • 相关阅读:
    帮忙看看怎么优化这个最长的sql
    12种不宜使用的Javascript语法
    走格子
    乘法逆元
    完美字符串
    全排列问题
    A. Sorting Railway Cars
    Prim
    矩阵取数
    套题T8&T9
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/3578003.html
Copyright © 2011-2022 走看看