- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
当前目录:
[mirror@home libevent]$ ls
arc4random.c bufferevent_sock.c epoll.c event_tagging.c evutil.c l Makefile.am strlcpy-internal.h
autogen.sh buffer_iocp.c epoll_sub.c evmap.c evutil_rand.c libevent_openssl.pc.in Makefile.nmake test
b changelist-internal.h evbuffer-internal.h evmap-internal.h evutil_time.c libevent.pc.in minheap-internal.h time-internal.h
buffer.c ChangeLog evconfig-private.h.in evport.c ht-internal.h libevent_pthreads.pc.in mm-internal.h util-internal.h
bufferevent_async.c ChangeLog-1.4 evdns.3 evrpc.c http.c LICENSE poll.c whatsnew-2.0.txt
bufferevent.c ChangeLog-2.0 evdns.c evrpc-internal.h http-internal.h listener.c ratelim-internal.h whatsnew-2.1.txt
bufferevent_filter.c compat event.3 evsignal-internal.h include log.c README WIN32-Code
bufferevent-internal.h configure.in event.c evthread.c iocp-internal.h log-internal.h sample win32select.c
bufferevent_openssl.c defer-internal.h event-internal.h evthread-internal.h ipv6-internal.h m4 select.c
bufferevent_pair.c devpoll.c event_iocp.c evthread_pthread.c kqueue.c make_epoll_table.py signal.c
bufferevent_ratelim.c Doxyfile event_rpcgen.py evthread_win32.c kqueue-internal.h make-event-config.sed strlcpy.c
测试目录下有一些文件:
[mirror@home libevent]$ ls test/
bench.c Makefile.am regress_dns.c regress_listener.c regress_ssl.c regress_zlib.c test-fdleak.c test-time.c tinytest_local.h
bench_cascade.c Makefile.nmake regress_et.c regress_main.c regress_testutils.c rpcgen_wrapper.sh test-init.c test-weof.c tinytest_macros.h
bench_http.c regress_buffer.c regress.h regress_minheap.c regress_testutils.h test-changelist.c test-ratelim.c tinytest.c
bench_httpclient.c regress_bufferevent.c regress_http.c regress.rpc regress_thread.c test-dumpevents.c test-ratelim.sh tinytest_demo.c
check-dumpevents.py regress.c regress_iocp.c regress_rpc.c regress_util.c test-eof.c test.sh
test目录下有很多文件有main()函数:
[mirror@home libevent]$ find test/ -regex .*.c -exec grep main {} +
test/regress.c:struct testcase_t main_testcases[] = {
test/test-weof.c:main(int argc, char **argv)
test/regress_dns.c:/* FIXME: We should move this to regress_main.c if anything else needs it.*/
test/regress_buffer.c: size_t remaining;
test/regress_buffer.c: remaining = v[0].iov_len - 512;
test/regress_buffer.c: tt_int_op(remaining, ==, v[0].iov_len);
test/regress_buffer.c: remaining -= 8;
test/regress_buffer.c: n = evbuffer_reserve_space(buf, remaining+64, v, 2);
test/regress_buffer.c: tt_int_op(remaining, ==, v[0].iov_len);
test/regress_buffer.c: remaining -= 1;
test/regress_buffer.c: n = evbuffer_reserve_space(buf, remaining+64, v, 2);
test/regress_buffer.c: tt_int_op(remaining, ==, v[0].iov_len);
test/regress_buffer.c: /* Drain some of the remaining chunk, then add it to another buffer */
test/regress_main.c: { "main/", main_testcases },
test/regress_main.c:main(int argc, const char **argv)
test/regress_main.c: if (tinytest_main(argc,argv,testgroups))
test/tinytest.c:static int in_tinytest_main = 0; /**< true if we're in tinytest_main().*/
test/tinytest.c: if (!in_tinytest_main) {
test/tinytest.c: " called from within tinytest_main.\n");
test/tinytest.c:tinytest_main(int c, const char **v, struct testgroup_t *groups)
test/tinytest.c: ++in_tinytest_main;
test/tinytest.c: --in_tinytest_main;
test/test-eof.c:main(int argc, char **argv)
test/test-ratelim.c:main(int argc, char **argv)
test/tinytest_demo.c:main(int c, const char **v)
test/tinytest_demo.c: /* Finally, just call tinytest_main(). It lets you specify verbose
test/tinytest_demo.c: return tinytest_main(c, v, groups);
test/test-time.c:main(int argc, char **argv)
test/bench_cascade.c:main(int argc, char **argv)
test/test-dumpevents.c: remain in the future.
test/test-dumpevents.c:main(int argc, char **argv)
test/test-changelist.c:main(int argc, char **argv)
test/test-init.c:main(int argc, char **argv)
test/test-fdleak.c:main(int argc, char **argv)
test/bench_http.c:main(int argc, char **argv)
test/bench.c:main(int argc, char **argv)
test/bench_httpclient.c:main(int argc, char **argv)
但在我使用之后:
ctags -R .
打开vim,然后
:tag main
:g ]
状态栏只显示:
E433: No tags file
E426: tag not found: main
怎么了? 标签文件已经加载,为什么没有标签文件?令人困惑...
似乎由 ctags 生成的索引包含这些文件,其中包含主要功能:
3643 main sample/dns-example.c /^main(int c, char **v) {$/;" f
3644 main sample/event-read-fifo.c /^main(int argc, char **argv)$/;" f
3645 main sample/hello-world.c /^main(int argc, char **argv)$/;" f
3646 main sample/http-server.c /^main(int argc, char **argv)$/;" f
3647 main sample/le-proxy.c /^main(int argc, char **argv)$/;" f
3648 main sample/signal-test.c /^main(int argc, char **argv)$/;" f
3649 main sample/time-test.c /^main(int argc, char **argv)$/;" f
3650 main test/bench.c /^main(int argc, char **argv)$/;" f
3651 main test/bench_cascade.c /^main(int argc, char **argv)$/;" f
3652 main test/bench_http.c /^main(int argc, char **argv)$/;" f
3653 main test/bench_httpclient.c /^main(int argc, char **argv)$/;" f
3654 main test/regress_main.c /^main(int argc, const char **argv)$/;" f
3655 main test/test-changelist.c /^main(int argc, char **argv)$/;" f
3656 main test/test-dumpevents.c /^main(int argc, char **argv)$/;" f
3657 main test/test-eof.c /^main(int argc, char **argv)$/;" f
3658 main test/test-fdleak.c /^main(int argc, char **argv)$/;" f
3659 main test/test-init.c /^main(int argc, char **argv)$/;" f
3660 main test/test-ratelim.c /^main(int argc, char **argv)$/;" f
3661 main test/test-time.c /^main(int argc, char **argv)$/;" f
3662 main test/test-weof.c /^main(int argc, char **argv)$/;" f
3663 main test/tinytest_demo.c /^main(int c, const char **v)$/;" f
3664 main_callback sample/dns-example.c /^main_callback(int result, char type, int count, int ttl,$/;" f file:
3665 main_testcases test/regress.c /^struct testcase_t main_testcases[] = {$/;" v typeref:struct:testcase_t
但是为什么tag main,g]找不到包含main函数的文件列表呢?
即使启用了 autochdir,romainl 的解决方案也适用于 :tag name
我已经运行了 :set tags=./tags,tags,因为启用了 autochdir,即使当前目录更改为其他目录,它也能正常工作,但 g ] 有时可能无法工作,为什么?
但 g ] 有时不起作用:
错误信息是E257: cstag: tag not found
编辑 2:.vimrc 的内容
cat ~/.vimrc
set autoindent
colorscheme desert
set number
最佳答案
E433
错误意味着 Vim 没有找到您的 tags
文件,所以,不,tags 文件还没有加载。
键入 :set tags
应该输出如下内容:
./tags,tags
这是默认值,意思是“在当前目录中然后查找位于当前文件目录中的tags
文件”。
因为您有set autochdir
,所以您最终可能会进入一个没有tags
文件的目录。例如,在 test
中。
要确保 Vim 找到你的 tags
文件,你应该使用像这样的东西:
set tags=./tags,tags;$HOME
意思是“在当前目录then中的任何父目录中查找位于当前文件then目录下的tags
文件直到 $HOME
”。
编辑
好吧,上面的设置对我来说已经按预期工作了很长时间。但这是我刚刚做的小实验(当然是使用 set autochdir
):
我在 ~/workspace/accordion/
中,其中仅包含一个文件 accordion.js
。
我执行 $ ctags -R .
:~/workspace/accordion/tags
已创建。
我做 $ mkdir -p aa/bb/cc/dd/ee/ff
。
我做 $ vim aa/bb/cc/dd/ee/ff/test.js
。
在 Vim 中,我执行 :tag *mini
跳转到 mini()
方法的声明,Accordion() 的成员
构造函数位于 ~/workspace/accordion/accordion.js
中,符合预期。
因为我的 ~/.vimrc
中有 set tags=./tags,tags;$HOME
Vim 正确地从一个目录爬到另一个目录,直到它到达 ~/worspace/accordion/tags
。即使我深陷在一个不切实际的深文件树中。
Is there an accordion/aa/bb/cc/dd/ee/ff/tags ? no, let's go up…
Is there an accordion/aa/bb/cc/dd/ee/tags ? no, let's go up…
Is there an accordion/aa/bb/cc/dd/tags ? no, let's go up…
Is there an accordion/aa/bb/cc/tags ? no, let's go up…
Is there an accordion/aa/bb/tags ? no, let's go up…
Is there an accordion/aa/tags ? no, let's go up…
Is there an accordion/tags ? yes! let's scan it!
正如另一位评论者反复问你但没有成功,当你在子目录中时 :pwd
的输出是什么?这是另一个请求::call tagfiles()
的输出是什么?
关于linux - 为什么 ctags -R 。不为子目录中的源代码生成索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12541403/
我正在编写一个 Java 应用程序,该应用程序检查网页的源代码,并在满足源代码中的条件时在我的默认浏览器中向我显示该网页。我通过以下方式获取源代码: String source = getUrlSou
数周以来,我一直在为 Android 上的蓝牙项目而苦苦挣扎。有谁知道我可以去哪里查看 Google 用于使其蓝牙配对和连接逻辑正常工作的实际代码? 我浏览了所有的文档、BluetoothChat 应
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 4 年前。
Android 源代码有多个目录,其中包含针对不同设备的代码。此外,在特定目录中,存在显示不同分支和标签的路径。举个例子,在“android/platform/external/iptables”目录
在哪里可以找到 SQLMembershipProvider (.NET2.0) 的源代码? 是可用的么? 最佳答案 源代码已经发布。 See ScottGu's blog for further de
我只想知道如何下载特定版本的 Android 源代码。我已经尝试过以下命令 repo init -u https://android.googlesource.com/platform/manifes
我想看看OpenCL框架是如何实现的。我发现的只是已经编译好的可供下载的库。 当然,OpenCL 可以有许多不同的实现,但我想看看其中的一个来了解它是如何完成的。 为了确保我自己清楚,OpenCL 框
latex 源代码列表应该是什么样子才能产生像已知书籍中那样的输出,例如 Spring 框架的输出?我尝试过使用 latex 列表包,但无法生成看起来像下面一样好的东西。因此,我主要对生成类似以下示例
PHP 是用 C 语言编写的吗?我在哪里可以在线找到 PHP 源代码而无需下载全部内容? 最佳答案 PHP 函数是用 C 编写的 - 您可以在 lxr.php.net 找到可浏览的源代码. 例如:ht
我正在使用Elasticsearch OSS的官方Docker镜像(docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4),似乎完全无法使用s
我试图在Cython中同时编译C和C++源代码。这是我当前的设置: -setup.py from distutils.core import setup from Cython.Build impor
好吧,事情是这样的:你们所有人可能都在想同样的事情:您可以使用 driver.getPageSource(); 这部分是正确的。唯一的问题是源代码以一种相当奇怪的方式编译,所有代码都在其中 \&quo
由于 TwoLineListItem 自 API 17 起已被弃用,因此我已采取措施将其替换为自定义 XML 和 ViewHolder。但是,我真的希望我的应用程序看起来与使用 TwoLineList
要从 HttpURLConnection 获取 InputStream,我们的代码如下 urlConnection.getInputStream(); 如果InputStream是一个Abstract
我刚刚开始学习更多关于 C/C++ 的知识,我正在使用 Visual Studio 2013 来管理代码。 我正在使用 Tobii EyeX 眼睛注视系统的项目要求我能够稍微调整此代码,但是我不明白如
我在按钮上有一个IBAction,其中包含以下代码,我尝试使用它来检索 UIWebView 的源代码: - (IBAction)loadInAWebView:(id)sender { [self
我正在 asp.net 中创建一个网站,我只是想知道有什么方法可以使用 JavaScript 从图像生成调色板吗?类似于 1) http://www.cssdrive.com/imagepalette
有人可以分享 WinKill() from AutoIt 的源代码吗? ? 我想知道它如何处理消息(是/否/取消)以确保它得到正确处理。我想用它来清理桌面上的意外弹出窗口。 最佳答案 正如我们在下面的
我的问题与 Opencv 的源代码有关。在我看来不同的平台the Opencv website提供不同的代码结构。我只是想知道是否有可能为所有不同的平台提供一个源代码。使用相同的源代码,我可以针对不同
这个问题在这里已经有了答案: Convert Python program to C/C++ code? [closed] (8 个答案) 关闭 3 年前。 我一直在努力寻找一种方法将 .py 源文
我是一名优秀的程序员,十分优秀!