首页 \ 问答 \ 如何使用命令或本地vimrc文件在多个vim配置之间切换?(How to switch between multiple vim configurations with a command or local vimrc files?)

如何使用命令或本地vimrc文件在多个vim配置之间切换?(How to switch between multiple vim configurations with a command or local vimrc files?)

我在几个组中工作,每个组在C中都有自己的选项卡/缩进/间距标准。

有没有办法为每个文件单独选择VIM配置,当我编辑一个文件:

  • 我做一些set group=1来选择一个配置
  • 存在于工作目录中的本地.vimrc用于自动设置配置

I work in several groups, each of which has its own tab/indentation/spacing standards in C.

Is there a way to have separate selectable VIM configurations for each so, when I edit a file, either:

  • I do something like set group=1 to select a configuration
  • a local .vimrc that lives in the working directory is used to set the configuration automatically

原文:https://stackoverflow.com/questions/1889602
更新时间:2022-03-31 09:03

最满意答案

do git add -A然后是git rebase --continue 。 这应该添加所有更改,包括删除文件,然后继续。

不保证提交没有没有冲突并应合并的其他文件。 git rebase --skip会丢失这些文件。 你不想要

希望这可以帮助。


do git add -A followed by git rebase --continue. This should add all changes - including your removal of the files and then continue.

There is no guarantee that the commit didn't have other files that did not conflict and should be merged. git rebase --skip would lose those files. You don't want that.

Hope this helps.

相关问答

更多
  • 重新定位可能是一个真正的头痛。 您必须解决合并冲突并继续重新定位。 例如,您可以使用合并工具(根据您的设置而有所不同) git mergetool 然后添加并提交您的更改并继续 git rebase --continue 祝你好运 Rebasing can be a real headache. You have to resolve the merge conflicts and continue rebasing. For example you can use the merge tool (wh ...
  • do git add -A然后是git rebase --continue 。 这应该添加所有更改,包括删除文件,然后继续。 不保证提交没有没有冲突并应合并的其他文件。 git rebase --skip会丢失这些文件。 你不想要 希望这可以帮助。 do git add -A followed by git rebase --continue. This should add all changes - including your removal of the files and then continu ...
  • 有几种情况,我看到rebase被卡住了。 一个是如果更改变为null(提交具有之前已经在rebase中进行的更改),在这种情况下,您可能必须使用git rebase --skip 。 很容易说出来 如果你做git status它不会显示任何变化。 如果是这样就跳过它。 如果不是这样,请发贴git status的副本,我可以尝试进一步帮助。 There are a couple situations where I've seen rebase get stuck. One is if the changes ...
  • 我遇到一个类似的问题与rebase。 我的问题是因为我的一个提交只改变了一个文件,当解决时,我抛弃了这个提交中引入的更改。 我能够通过跳过相应的commit( git rebase --skip )来解决我的问题。 您可以在测试库中重现此问题。 首先创建存储库。 $ mkdir failing-merge $ cd failing-merge $ git init Initialized empty Git repository in $HOME/failing-merge/.git/ 然后在master ...
  • 我不在乎提交的历史。 如果你真的不关心历史, git merge --squash会让你立即解决所有的冲突,并且产生一个包含所有更改的提交。 基本上这样做--squash就地,你可以做这样的事情: git branch -m feature feature-old git checkout master -b feature git merge --squash feature-old 在解决所有冲突(一次)之后,您将在主要feature上创建一个提交作为父项。 这就是说,我是保持历史的粉丝。 绝对先试试 ...
  • 如果没有什么可以展示的话,那么其他的东西可能已经引入了相同的变化。 你可能想跳过这个补丁。 正如消息所示,你现在想要做git rebase --skip 。 If there is nothing left to stage, chances are that something else already introduced the same changes; you might want to skip this patch. As the message suggests, you want to d ...
  • 您的回购中的所有内容都会一直存在,直到git通过任何参考资料完全无法访问至少一个月1 。 所以你已经做了一些相当于git rebase master topic ,自从分支以来,有26个提交AZ的话题,而你做了一个真正糟糕的oops重新定义O并且直到S之前并没有真正获得完整的效果: A...O...Z topic / ...a....z master \ A2..O2..S2 the inflight rebase with the mistake i ...
  • 仔细检查消息。 远程存储库中是否已存在相同的更改? 如果是这样,请跳过应用该更改,就像它建议的那样。 “如果没有任何东西可以上台,很可能其他东西已经引入了相同的变化;你可能想跳过这个补丁。” Double check the message. Do the same changes already exist in the remote repository? If so, skip applying that change, like it suggests. "If there is nothing l ...
  • 如果出现冲突: master具有不在myremote/master提交。 这些提交包括公共文件/更改与最后21个myremote/master提交。 如果新鲜的git-svn clone与先前的git-svn repo具有不同的SHA1,那么就没有紧密的共同祖先,并且冲突的可能性要高得多。 有关rebase期间冲突的说明,请参阅“ 如何在git rebase期间通过哈希识别冲突提交? ”。 将本地主服务器重置为myremote / master的一种方法是: git checkout -b tmp myre ...
  • 好的,深呼吸:-) Git的rebase 复制提交 git rebase使用的基本技巧是cherry-pick操作,它复制提交。 我们将了解目前复制提交的机制,但考虑一个简单的,普通的git cherry-pick ,我们git checkout一些分支名称 - 我将在这里创建一个指向一个特定提交的新的 - 然后告诉Git复制一些其他提交,通常是我们新分支上尚未提交的提交。 git checkout -b newbranch 23dfc61 这使23dfc61成为当前提交,但为其提供了一个新的分支名称 n ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。