如何使用命令或本地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
最满意答案
do
git add -A
然后是git rebase --continue
。 这应该添加所有更改,包括删除文件,然后继续。不保证提交没有没有冲突并应合并的其他文件。
git rebase --skip
会丢失这些文件。 你不想要希望这可以帮助。
do
git add -A
followed bygit 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 rebase合并冲突(git rebase merge conflict)[2023-07-20]
重新定位可能是一个真正的头痛。 您必须解决合并冲突并继续重新定位。 例如,您可以使用合并工具(根据您的设置而有所不同) 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 rebase补丁(Revert one patch of git rebase)[2021-10-28]
您的回购中的所有内容都会一直存在,直到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 --onto失败了(git rebase --onto fails)[2022-01-11]
好的,深呼吸:-) Git的rebase 复制提交 git rebase使用的基本技巧是cherry-pick操作,它复制提交。 我们将了解目前复制提交的机制,但考虑一个简单的,普通的git cherry-pick ,我们git checkout一些分支名称 - 我将在这里创建一个指向一个特定提交的新的 - 然后告诉Git复制一些其他提交,通常是我们新分支上尚未提交的提交。 git checkout -b newbranch 23dfc61 这使23dfc61成为当前提交,但为其提供了一个新的分支名称 n ...