vim-registers 相关问题


vim netrw 退出后更新当前工作目录

这是场景。 我在unix命令行上(在主目录中)。我想浏览目录 $vim . 从而打开vim netrw。 现在我正在使用网络浏览目录...


VIM YouCompleteMe 搜索 py 库时出错

我在 VIM 中安装 YCM 并收到此错误: 正在搜索 Python 3.8 库...错误:/usr/include/python3.8 中缺少 Python 标头 我尝试过 py 3.8 3.7 和 3.9,也是一样的...


Vim 错误:处理函数时检测到错误<SNR>14_UseConfigFiles[26]..<SNR>14_Initialize[47]..<SNR>14_InitializePythonBuiltin:

当我简单地 $ vim CHANGELOG.md 时,出现以下错误 “变更日志.md”1788L,61291C 处理函数时检测到错误 14_UseConfigFiles[26]..14_Initialize[47]..<...


Vim 中的列总计

有谁知道如何在 Vim 中对表中的所有列求和,而不使用 AWK 或 SED,而是使用 vimscript? 我想选择要求和并具有以下值的列 像这样: 2,50 欧元...


在 Vim 中搜索后居中光标位置

我希望 Vim 在搜索后将光标放在屏幕中间。我已经在 .vimrc 中使用以下几行实现了 *、#、n 和 N 命令 nmap * *zz nmap # #zz nmap n nzz nmap N Nzz ...


vim: ":source %" 命令导致错误 (E499)

如何解决此错误: E499: '%' 或 '#' 为空文件名,仅适用于“:p:h” 每当我在 vim 命令中使用 % 时都会发生此错误。我以前从未见过这个。这是我的 .vi...


跳转到vim中的搜索位置?

在使用vim时,我经常使用命令/foo跳转到文件中的某个变量foo来查看。然后我记住行号,按 escape 键,然后执行 :lno 跳转到行号。有没有...


Vim - 删除搜索到的字符串

是否有一个 VIM 命令/组合键可以执行类似 dt/mystring 的操作(这不起作用)? dta 尝试在当前行查找字母 a,但我想删除搜索到的所有内容


如何在 PyCharm 中退出 vim 的插入模式?

假设您正在尝试在 Pycharm 中使用 git 对分支进行变基。 您正在使用控制台(在 Pycharm 中)命令 git rebase -i -head~X 与 vim 进行交互式 rebase。 通常你会...


当 :q 或 :x 不起作用时如何退出 Vim 编辑器

vi / vim 新手,我通常使用 pico,但使用只有这 2 个编辑器的锁定框(目前)。 我无法让它保存文件,甚至退出。我看到其他人有...


在vim中如何将“保存”映射到ctrl-s

在vim中,如何将“save”(:w)映射到ctrl-s。 我正在尝试“映射”该命令,但是当我按 ctrl-s 时 xterm 冻结。 如果我按 ctrl-v,ctrl-s 仍然只能看到 ^,而不是 ^S。


缩进 GNU 风格如何在 VIM 中正常运行?

我写的函数如下: 静态整型 foo_bar(const char *字符串) { } 当我使用 Vim 缩进时,它会执行以下操作: 静态整型 foo_bar(const char *字符串) { } 它增加了一些额外的水疗...


vim: ":source %" 命令导致错误: E499: '%' 或 '#' 的文件名为空,仅适用于 ":p:h"

如何解决此错误: E499: '%' 或 '#' 为空文件名,仅适用于“:p:h” 每当我在 vim 命令中使用 % 时都会发生此错误。我以前从未见过这个。这是我的 .vi...


vim - 使用 cabbrev 和 '!'

我已经使用下面的 cabbrev 多年了(“SafeQuitAll()”实际上在这里做什么并不重要);- cabbrev qa =(getcmdtype()==#':' && getcmdpos()==1 ? '调用


Nerdtree:更改树中显示的信息

这可能是一个奇怪的问题,但我想使用 vim 来记录/个人日志。我的笔记将放在名为“2024”的文件夹中,每个月作为单独的 txt 文件。 每个月......


如何在 Lazyvim 上安装 tsserver?

我取消了lazy.lua的注释来安装tsserver和jsonls,但两者都安装失败。任何人都可以解决这个问题吗? 我安装了运行lazy vim 所需的一切。然后我取消注释l...


将补丁一分为二(最好是在 Vim 中)

我有一个补丁,我想将其分成两个补丁。我需要以每行粒度分割补丁——我不能只是将块分割成两个单独的文件。 我可以使用 Emacs diff mod...


Vim:如何清除所有标记?

我想“清除所有标记”。 可选注释:(随意跳过) 一些编号标记指的是我很长时间没有编辑的文件,我不知道它们为什么在那里,它们是如何创建的......


如何避免在Windows中由vim创建额外的文件

当我在 gvim 中创建一个新文件并使用 :wq 文件名保存它时,它会创建另外两个文件,我需要手动删除它们。 例如,我打开 gvim 并保存文件 c:\dev\


备份已上传并提取,但 @ 99% 的数据库恢复在 WP 迁移时出现错误(插件“一体化迁移”)

I 创建 ec2 实例并安装 PHP、MYSQL、Apache 和 Wordpress。配置以下4个文件 1st>> sudo vim /etc/php/8.1/apache2/php.ini >> 更改最大。文件大小上传限制。


vim:如何将 shell 命令“:!echo foo”的输出重定向到缓冲区?

给定两个并排的缓冲区,源代码位于缓冲区 1 中,如何运行编译器(或任何命令行程序)并在缓冲区 2 中查看其输出(stdout)? 另外,我如何使用当前或


SecurityException:不允许启动服务Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (有额外功能)}

我尝试从 Google 获取我的 GCM 注册 ID。 我的代码: 字符串SENDER_ID =“722*****53”; /** * 向 GCM 服务器异步注册应用程序。 * * 存储注册信息... 我尝试从 Google 获取我的 GCM 注册 ID。 我的代码: String SENDER_ID = "722******53"; /** * Registers the application with GCM servers asynchronously. * <p> * Stores the registration ID and the app versionCode in the application's * shared preferences. */ private void registerInBackground() { new AsyncTask<Void, Void, String>() { @Override protected String doInBackground(Void... params) { String msg = ""; try { if (gcm == null) { gcm = GoogleCloudMessaging.getInstance(context); } regid = gcm.register(SENDER_ID); msg = "Device registered, registration ID=" + regid; // You should send the registration ID to your server over // HTTP, so it // can use GCM/HTTP or CCS to send messages to your app. sendRegistrationIdToBackend(); // For this demo: we don't need to send it because the // device will send // upstream messages to a server that echo back the message // using the // 'from' address in the message. // Persist the regID - no need to register again. storeRegistrationId(context, regid); } catch (IOException ex) { msg = "Error :" + ex.getMessage(); // If there is an error, don't just keep trying to register. // Require the user to click a button again, or perform // exponential back-off. } return msg; } @Override protected void onPostExecute(String msg) { mDisplay.append(msg + "\n"); } }.execute(null, null, null); } 我收到错误: 03-01 19:15:36.261: E/AndroidRuntime(3467): FATAL EXCEPTION: AsyncTask #1 03-01 19:15:36.261: E/AndroidRuntime(3467): java.lang.RuntimeException: An error occured while executing doInBackground() 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.os.AsyncTask$3.done(AsyncTask.java:299) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.setException(FutureTask.java:219) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.run(FutureTask.java:239) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.lang.Thread.run(Thread.java:841) 03-01 19:15:36.261: E/AndroidRuntime(3467): Caused by: java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) } without permission com.google.android.c2dm.permission.RECEIVE 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.app.ContextImpl.startServiceAsUser(ContextImpl.java:1800) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.app.ContextImpl.startService(ContextImpl.java:1772) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.content.ContextWrapper.startService(ContextWrapper.java:480) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.google.android.gms.gcm.GoogleCloudMessaging.b(Unknown Source) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.google.android.gms.gcm.GoogleCloudMessaging.register(Unknown Source) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.example.gcm.DemoActivity$1.doInBackground(DemoActivity.java:177) 03-01 19:15:36.261: E/AndroidRuntime(3467): at com.example.gcm.DemoActivity$1.doInBackground(DemoActivity.java:1) 03-01 19:15:36.261: E/AndroidRuntime(3467): at android.os.AsyncTask$2.call(AsyncTask.java:287) 03-01 19:15:36.261: E/AndroidRuntime(3467): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 03-01 19:15:36.261: E/AndroidRuntime(3467): ... 4 more 这是我的清单: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.manyexampleapp" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="com.example.manyexampleapp.c2dm.permission.RECEIVE" /> <uses-permission android:name="com.example.manyexampleapp.gcm.permission.C2D_MESSAGE" /> <permission android:name="com.example.manyexampleapp.gcm.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <application android:name="com.zoomer.ifs.BaseApplication" android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <activity android:name="com.zoomer.ifs.MainActivity" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize" android:launchMode="singleTop"> <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <!-- PUSH --> <!-- WakefulBroadcastReceiver that will receive intents from GCM services and hand them to the custom IntentService. The com.google.android.c2dm.permission.SEND permission is necessary so only GCM services can send data messages for the app. --> <receiver android:name="com.example.gcm.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <!-- Receives the actual messages. --> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="com.example.manyexampleapp" /> </intent-filter> </receiver> <service android:name="com.example.gcm.GcmIntentService" /> <activity android:name="com.example.gcm.DemoActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <!-- DB --> <activity android:name="com.example.db.DbActivity" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.http.RestGetActivity" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" > </activity> <activity android:name="com.example.fb.FacebookLoginActivity" android:label="@string/app_name" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <activity android:name="com.example.http.SendFeedbackActivity" android:label="@string/app_name" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <activity android:name="com.zoomer.general.SearchNearbyOffersActivity" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity> <activity android:name="com.facebook.LoginActivity" android:label="@string/app_name" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.manyexampleapp.StoresListActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.fb.ShareActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.notifications.NotificationsActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.example.fb2.no_use.MainActivity" > <intent-filter> </intent-filter> </activity> <activity android:name="com.zoomer.offers.OffersListActivity" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <activity android:name="com.example.http.SearchNearbyOffersActivity" > <!-- <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> --> </activity> <service android:name="com.example.geo.LocationService" android:enabled="true" /> <receiver android:name="com.example.manyexampleapp.BootReceiver" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="com.example.manyexampleapp.LocationService.LOCATION_BROAD_MSG" /> </intent-filter> </receiver> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id" /> </application> </manifest> 改变 <uses-permission android:name="com.example.manyexampleapp.c2dm.permission.RECEIVE" /> 到 <!-- This app has permission to register and receive data message. --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> 您收到异常是因为您尚未定义所需的权限 如果应用程序开发后安装了播放服务, 可能会发生 com.google.android.c2dm.permission.RECEIVE 权限已被授予但 android 仍在抱怨同样的错误。 在这种情况下,您必须完全重新安装开发的应用程序才能使此权限发挥作用。 我认为你必须检查 Kotlin 版本兼容性。


© www.soinside.com 2019 - 2024. All rights reserved.