对于我的编码风格,我有一个很好的简洁的配置,但是如果我在vim中恢复了所有的文件,那么我的文件的许可头就不会被正确地恢复。
牌照头:
/* =========================================================================
Program: Visualization Toolkit
Module: vtkPeriodicArray.txx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
========================================================================= */
我的.vimrc (相关部分):
:set tabstop=2 "Number of spaces a TAB in the text stands for
:set shiftwidth=2 "Number of spaces used for each step of (auto)indent
:set expandtab
:set cindent
:set cinoptions={1s,t0,f0s,g0,i0,(0
希望的结果:牌照头缩进没有改变
所见成果:
/* =========================================================================
Program: Visualization Toolkit
Module: vtkPeriodicArray.txx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
========================================================================= */
发布于 2015-04-20 00:05:41
我在附近找到了一份工作。我只需在我的.vimrc中映射以下命令:
map <F12> gg=G\|:3,12>\|:10,12> <Enter> <Enter>
它将F12键映射到:
因此,它非常特定于我的标题,不会在另一个项目中工作。无论如何,我所有的vimrc都是针对这个项目的。
https://stackoverflow.com/questions/29699032
复制相似问题