Vim插件Align无法正常工作。(Vim plugin Align fails to work. Can it be installed without vimball?)
我很高兴在家用电脑上安装了vim Align插件,但在工作中的Red Hat服务器上,安装不起作用。 工作中的服务器有一个非常古老的副本(2006)vimball,谷歌我不知道它不支持更新的vimball,包括Align。 我无法让系统组(IT部门)升级vimball,所以我想也许我可以简单地将各种文件复制到〜/ .vim / plugin中。 我从我的家庭系统AlignMapsPlugin.vim AlignPlugin.vim cecutil.vim复制了3个文件,但当我尝试在vim中使用Align时,我收到以下错误消息
E117:未知功能:对齐#Align
我知道它正在看插件,因为当我删除插件时,错误信息是不同的(它说“不是编辑器命令对齐”)。
这有解决方法吗? 我喜欢“Align”,并且肯定会喜欢在工作和家中使用它。
I've happily installed the vim Align plugin on my home computer, but on the Red Hat servers at work, the installation doesn't work. The servers at work have a very old copy (2006) of vimball, which from Googling I know doesn't support more recent vimballs, including Align. I can't get the systems group (IT department) to upgrade vimball, so I thought perhaps I could simply copy the various files into ~/.vim/plugin by hand. I copied the 3 files from my home system AlignMapsPlugin.vim AlignPlugin.vim cecutil.vim, but when I attempt to use Align from within vim I get the following error message
E117: Unknown function: Align#Align
I know that it's seeing the plugin, because when I remove the plugin the error message is different (it says "Not an editor command Align").
Is there a workaround for this? I love "Align" and would sure like to use it at work as well as at home.
原文:https://stackoverflow.com/questions/9937075
最满意答案
通过执行以下操作,您可以在同一个CosmosDB帐户中同时使用MongoDB API和DocumentDB / Sql API(这可能也适用于使用Gremlin和Table API的CosmosDB帐户设置,但我还没有尝试过)。
首先,使用MongoDB API创建一个新的CosmosDB帐户。 一旦配置了新的CosmosDB帐户,您将无法像使用已配置DocumentDB / Sql API的CosmosDB帐户那样查找“密钥”刀片。
要获得将客户端连接到DocumentDB / Sql api所需的密钥,请运行以下Azure CLI命令 :
az cosmosdb list-keys --name "<your cosmosdb account name>" --resource-group "<name of resource group your cosmosdb lives in>"
现在,您可以在您使用的任何客户端API(.Net,Python等)中使用这些键中的一个,并对CosmosDB执行DocumentDB / Sql查询,即使它仅配置为使用MongoDB API。
如果您的客户端API需要“连接字符串”而不是一个键,则编辑普通连接字符串以将此键包含在字符串的“AccountKey”部分中。
You can use both the MongoDB API and the DocumentDB/Sql API in the same CosmosDB account by doing the following (this likely also works for CosmosDB accounts setup with Gremlin and Table APIs, but I haven't yet tried them yet.):
First, create a new CosmosDB account using the MongoDB API. Once this new CosmosDB account is provisioned, you won't be able to find the "Keys" blade as you can with a CosmosDB account that has been configured with the DocumentDB/Sql API.
To get the Keys which you need to connect your client to the DocumentDB/Sql api, run the following Azure CLI Command:
az cosmosdb list-keys --name "<your cosmosdb account name>" --resource-group "<name of resource group your cosmosdb lives in>"
Now, you can use one of these keys in whatever client API (.Net, Python, etc.) that you are using, and do DocumentDB/Sql queries against your CosmosDB even though it was only configured to use the MongoDB api.
If your client API requires a "Connection String" instead of just a key, then edit the normal connection string to include this key in the "AccountKey" section of the string.
相关问答
更多-
通过执行以下操作,您可以在同一个CosmosDB帐户中同时使用MongoDB API和DocumentDB / Sql API(这可能也适用于使用Gremlin和Table API的CosmosDB帐户设置,但我还没有尝试过)。 首先,使用MongoDB API创建一个新的CosmosDB帐户。 一旦配置了新的CosmosDB帐户,您将无法像使用已配置DocumentDB / Sql API的CosmosDB帐户那样查找“密钥”刀片。 要获得将客户端连接到DocumentDB / Sql api所需的密钥, ...
-
将Azure CosmosDB DocumentDB API与Graph API配合使用(Using Azure CosmosDB DocumentDB API with Graph API)[2023-03-15]
是的,可以通过Graph API和Document API插入文档。 但是,Cosmos期望文档具有特定的GraphSON格式,以便在图遍历期间拾取所有属性。 我建议您从Tinkerpop文档中查看Vertex Properties和GraphSON ,以便更好地了解这些主题。 通过Gremlin添加文档时,语法是为要添加的所有属性分隔的名称值逗号。 试试这个: g.addV('label', 'human', 'name', 'jesse', 'age', 27) 现在,如果您转到Azure门户并执行S ... -
根据你的描述,我检查了这个问题。 为了快速,我将MongoChef与Azure Cosmos DB一起使用。 根据我的测试, db.brucetest1.createIndex({loc:"2dsphere"})无法应用于集合。 此外,我发现DocumentDB在位置字段DocumentDBDefaultIndex上自动创建了一个2dsphere索引,然后我删除了我的文档,并按如下方式插入文档: db.brucetest.insertMany([ {DocumentDBDefaultIndex : { ...
-
感谢MS解决这个问题。 他们推出gremlin API端点时遇到了一些问题。 我的实例正在从我的数据库实例中调用一个不同区域的gremlin端点(如果我正确理解来自MS的消息),这会导致问题。 我获得了在门户上设置的功能标志,以强制在新基础架构上部署新数据库。 我现在看到所有查询和遍历都小于500毫秒的响应时间。 Thanks to MS for figuring out the issue. There was some problem with their roll out of the gremlin ...
-
问题在于您提到的问题,您将使用DocumentDB API将文档插入到Mongo API帐户中。 Mongo API帐户仅适用于启用Mongo的客户端/ SDK。 门户网站和第三方应用程序失败是因为它们使用MongoDB协议来读取文档,您通过DocumentDB API存储的这些文档没有所需的MongoDB属性(例如,“_id”)。 当您使用Mongo客户端插入文档时,客户端将确保没有丢失所需的MongoDB属性(并且在“_id”标识符的情况下,自动生成它)。 运行find()命令时,驱动程序遇到的文档不符 ...
-
SQL是DocumentDB API。 从这个link : Azure Cosmos DB DocumentDB API或SQL(DocumentDB)API现在称为Azure Cosmos DB SQL API 。 您无需更改任何内容即可继续运行使用DocumentDB API构建的应用程序。 功能保持不变。 SQL is DocumentDB API. From this link: The Azure Cosmos DB DocumentDB API or SQL (DocumentDB) API i ...
-
Azure DocumentDB与MongoDB协议Spark集成(Azure DocumentDB with MongoDB Protocol Spark integration)[2022-11-14]
我想使用DocumentDB,但PySpark没有连接器。 2017年4月初提供了Spark to DocumentDB连接器 (包括pyDocumentDB包 )的预览版。 看起来DocumentDB也支持这里提到的MongoDB协议 ,这意味着所有现有的MongoDB驱动程序都应该可以工作 DocumentDB支持用于通信的MongoDB有线协议,并将其版本报告为MongoDB 3.2.0,但这并不意味着它是完全支持所有MongoDB功能的直接替换(或者DocumentDB实现具有相同行为和限制的功能) ... -
Mongo和Cosmos分片机制的构建方式不同,因此如果要充分利用平台,分片密钥在系统之间应该是不同的。 取自本网站的Mongo DB http://learnmongodbthehardway.com/schema/sharding/ 基数 始终考虑分片键可以表达的值的数量。 具有仅50个可能值的分片键被认为是低基数,而可能表达数百万个值的分词可被视为高基数键。 高基数键优于低基数键,以避免不可拆分的块。 因此,在Mongo DB中,您需要具有高基数部分密钥来定位大约64MB的块(逻辑分区), 在Cosm ...
-
无论您在创建时选择哪种API,通过SQL或Graph API与Cosmos Collection交互的角度都没有功能差异。 但是 ,在浏览资源时,Azure门户的视角有所不同。 使用Graph API专门创建的集合将被标记为这样,并在门户中启用其他UI功能,以执行Gremlin查询和基本图形可视化。 如果您不关心Azure门户中的那些查询功能,那么您可以使用任一选项创建集合。 There is no functional difference from the perspective of interact ...
-
对CosmosDB / DocumentDB的数组进行大小写不敏感的搜索(Case insensitive search in arrays for CosmosDB / DocumentDB)[2022-04-14]
如果性能很重要,那么你应该考虑你提出的问题中的一种标准化解决方案。 然后,您可以对归一化字段进行索引,并在不进行全面扫描的情况下获得结果 如果由于某种原因你真的不想润饰文档,那么你缺少的功能可能是简单的连接? 使用扫描从数组中进行不区分大小写搜索的示例查询: SELECT c FROM c join email in c.emailAddresses where lower(email) = lower('ANOTHER.ADDRESS@someotherdomain.com') 您可以在Cosmos D ...