[vim]如何在打开文件时跳到指定行号?

vim file +line

例如:

root@xxx-ubuntu:/ics-android/ics-src/system/core/init# grep init.rc * -rn
init.c:706:    init_parse_config_file("/init.rc");
util.c:79: * ("/dev/socket") as dictated in init.rc. This socket is inherited by the
root@xxx-ubuntu:/ics-android/ics-src/system/core/init# vi init.c +706
691     mount("sysfs", "/sys", "sysfs", 0, NULL);
692 
693         /* indicate that booting is in progress to background fw loaders, etc */
694     close(open("/dev/.booting", O_WRONLY | O_CREAT, 0000));
695 
696         /* We must have some place other than / to create the
697          * device nodes for kmsg and null, otherwise we won't
698          * be able to remount / read-only later on.
699          * Now that tmpfs is mounted on /dev, we can actually
700          * talk to the outside world.
701          */
702     open_devnull_stdio();
703     klog_init();
704 
705     INFO("reading config file\n");
706     init_parse_config_file("/init.rc");                                             
707 
708     /* pull the kernel commandline and ramdisk properties file in */
709     import_kernel_cmdline(0, import_kernel_nv);
710     /* don't expose the raw commandline to nonpriv processes */
711     chmod("/proc/cmdline", 0440);
712     get_hardware_name(hardware, &revision);
713     snprintf(tmp, sizeof(tmp), "/init.%s.rc", hardware);
714     init_parse_config_file(tmp);
715 
716     action_for_each_trigger("early-init", action_add_queue_tail);
717 
718     queue_builtin_action(wait_for_coldboot_done_action, "wait_for_coldboot_done");
719     queue_builtin_action(property_init_action, "property_init");
720     queue_builtin_action(keychord_init_action, "keychord_init");
721     queue_builtin_action(console_init_action, "console_init");
 /mnt/ics-android/ics-src/system/core/init/init.c[1,RO]        [c] unix utf-8 5:706/819



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值