调整 NppAutoIndent,或者是否有一个好的可定制替代方案?
我最近开始使用 Notepad++ 的 NppAutoIndent 插件,并且对智能缩进模式相当满意,但我发现它缺乏可定制的首选项很烦人,因为智能缩进模式中有一些行为我想调整/调整。我考虑过修改插件的源代码并重新编译它以尝试获得我想要的行为,但我有 Visual Studio 2010 和 该插件的项目似乎是一个 VS 2003 项目,并且由于我是使用 Visual Studio 进行 C/C++ 项目的完全初学者,所以我不这样做甚至不知道从哪里开始处理将项目转换为 VS 2010 时给出的一些警告。
简而言之:是否有 NppAutoIndent 插件的更可定制的替代方案,或者是否有更好的方法来更新 VS 2010 的源项目?
更新:
这是大部分警告。其中很多看似不重要,但我不确定哪些可能是需要注意的。
- 由于 C/C++ 编译器的异常处理开关发生变化,在此项目中 /EHsc 已自动转换为 /EHa。
- 已完成转换为新项目文件“C:[...]\NppAutoIndent\project\NppAutoIndent.vcxproj”。
- 由于 Visual C++ 项目要求生成嵌入式(默认)Windows SxS 清单,因此现在使用清单工具自动构建项目中的清单文件。您可能需要更改您的构建才能使其正常工作。例如,建议将任何清单文件中包含的依赖项信息转换为源代码中包含的头文件中的“#pragma comment(linker,"")”。如果您的项目已通过资源 (.rc) 文件在 RT_MANIFEST 资源部分中嵌入了清单,则可能需要注释掉该行,然后才能正确构建项目。
- 由于 C++ 编译器中的一致性更改,可能需要更改代码才能正确构建项目。以前版本的C++ 编译器允许通过成员函数名称(例如MemberFunctionName)指定成员函数指针。 C++ 标准要求使用地址运算符的完全限定名称(例如 &ClassName::MemberFunctionName)。如果您的项目包含 Windows 窗体设计器中使用的窗体或控件,则您可能必须更改 InitializeComponent 中的代码,因为设计器生成的代码在委托构造中使用了不一致的语法(在事件处理程序中使用)。
- 此应用程序已更新,包含与 Windows Vista 的用户帐户控制 (UAC) 功能相关的设置。默认情况下,当在启用了 UAC 的 Windows Vista 上运行时,该应用程序被标记为以与启动它的进程相同的权限运行。此标记还会禁止应用程序通过虚拟化运行。您可以从项目的属性页更改 UAC 相关设置。
- “VCCLCompilerTool”的属性“Detect64BitPortabilityProblems”在此版本中不受支持,并已在转换过程中删除。
- 不再支持 VCWebServiceProxyGeneratorTool。该工具已从您的项目设置中删除。
- C/C++ 编译器开关 /Og 已被弃用,并已从您的项目设置中删除。建议您使用/O1 或/O2 代替。
- VCConvertEngine 无法在工具 VCCLCompilerTool 下转换属性 GlobalOptimizations = TRUE。
- 此版本不支持“VCCLCompilerTool”的属性“Detect64BitPortabilityProblems”,并且已在转换过程中删除。
- “VCLinkerTool”的属性“OptimizeForWindows98”在此版本中不受支持,并且已在转换过程中删除。
- VCConvertEngine 无法在工具 VCCLCompilerTool 下转换属性 GlobalOptimizations = TRUE。
- 此版本不支持“VCCLCompilerTool”的属性“Detect64BitPortabilityProblems”,并且已在转换过程中删除。
- “VCLinkerTool”的属性“OptimizeForWindows98”在此版本中不受支持,并且已在转换过程中删除。
- 此版本不支持“VCCLCompilerTool”的属性“Detect64BitPortabilityProblems”,并且已在转换过程中删除。
- MSB8012:$(TargetName) ('NppAutoIndent') 与项目配置“Debug|Win32”中链接器的 OutputFile 属性值“..\build\NppAutoIndentA_D.dll”('NppAutoIndentA_D') 不匹配。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetName) 属性值与 %(Link.OutputFile) 中指定的值匹配。
- MSB8012:$(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Debug\NppAutoIndent.dll') 与链接器的 OutputFile 属性值“..\build\NppAutoIndentA_D”不匹配。项目配置“Debug|Win32”中的“C:[...]\NppAutoIndent\build\NppAutoIndentA_D.dll”。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetPath) 属性值与 %(Link.OutputFile) 中指定的值匹配。
- MSB8012:$(TargetName)('NppAutoIndent')与项目配置“Release|Win32”中链接器的 OutputFile 属性值“..\build\NppAutoIndentA.dll”(“NppAutoIndentA”)不匹配。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetName) 属性值与 %(Link.OutputFile) 中指定的值匹配。
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Release\NppAutoIndent.dll') 与链接器的 OutputFile 属性值 '..\build\NppAutoIndentA 不匹配。项目配置“Release|Win32”中的“C:[...]\NppAutoIndent\build\NppAutoIndentA.dll”。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetPath) 属性值与 %(Link.OutputFile) 中指定的值匹配。
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Release Unicode\NppAutoIndent.dll') 与链接器的 OutputFile 属性值 '..\build\NppAutoIndent 不匹配项目配置“Release Unicode|Win32”中的“C:[...]\NppAutoIndent\build\NppAutoIndent.dll”。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetPath) 属性值与 %(Link.OutputFile) 中指定的值匹配。
- MSB8012:$(TargetName) ('NppAutoIndent') 与项目配置“Debug Unicode|Win32”中链接器的 OutputFile 属性值“..\build\NppAutoIndent_D.dll”('NppAutoIndent_D') 不匹配。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetName) 属性值与 %(Link.OutputFile) 中指定的值匹配。
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Debug Unicode\NppAutoIndent.dll') 与链接器的 OutputFile 属性值 '..\build\NppAutoIndent_D 不匹配项目配置“调试 Unicode|Win32”中的“.dll”(“C:[...]\NppAutoIndent\build\NppAutoIndent_D.dll”)。这可能会导致您的项目构建不正确。要更正此问题,请确保 $(TargetPath) 属性值与 %(Link.OutputFile) 中指定的值匹配。
I recently started using the NppAutoIndent plugin for Notepad++, and have been fairly pleased with the Smart Indent mode, but I find its lack of customizable preferences to be annoying as there are a few behaviors in Smart Indent mode that I'd like to tweak/modify. I thought about modifying the plugin's source code and recompiling it to try to get the behavior I want, but I have Visual Studio 2010 and the project for the plugin seems to be a VS 2003 project, and as I'm a complete beginner to using Visual Studio for C/C++ projects I don't even know where to start to deal with some of the warnings given when converting the project to VS 2010.
In short: Is there a more customizable alternative to the NppAutoIndent plugin, or is there a better way to update the source project for VS 2010?
UPDATE:
Here are most of the warnings. A lot of them seem to be unimportant, but I'm not sure which may be necessary to pay attention to.
- Due to a change in the exception handling switches for the C/C++ Compiler, /EHsc has been automatically converted to /EHa in this project.
- Done converting to new project file 'C:[...]\NppAutoIndent\project\NppAutoIndent.vcxproj'.
- Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly.
- Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).
- This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.
- Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
- VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
- The C/C++ compiler switch /Og has been deprecated and has been removed from your project settings. It is recommended that you use /O1 or /O2 instead.
- VCConvertEngine could not convert attribute GlobalOptimizations = TRUE under Tool VCCLCompilerTool.
- Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
- Attribute 'OptimizeForWindows98' of 'VCLinkerTool' is not supported in this version and has been removed during conversion.
- VCConvertEngine could not convert attribute GlobalOptimizations = TRUE under Tool VCCLCompilerTool.
- Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
- Attribute 'OptimizeForWindows98' of 'VCLinkerTool' is not supported in this version and has been removed during conversion.
- Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
- MSB8012: $(TargetName) ('NppAutoIndent') does not match the Linker's OutputFile property value '..\build\NppAutoIndentA_D.dll' ('NppAutoIndentA_D') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Debug\NppAutoIndent.dll') does not match the Linker's OutputFile property value '..\build\NppAutoIndentA_D.dll' ('C:[...]\NppAutoIndent\build\NppAutoIndentA_D.dll') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
- MSB8012: $(TargetName) ('NppAutoIndent') does not match the Linker's OutputFile property value '..\build\NppAutoIndentA.dll' ('NppAutoIndentA') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Release\NppAutoIndent.dll') does not match the Linker's OutputFile property value '..\build\NppAutoIndentA.dll' ('C:[...]\NppAutoIndent\build\NppAutoIndentA.dll') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Release Unicode\NppAutoIndent.dll') does not match the Linker's OutputFile property value '..\build\NppAutoIndent.dll' ('C:[...]\NppAutoIndent\build\NppAutoIndent.dll') in project configuration 'Release Unicode|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
- MSB8012: $(TargetName) ('NppAutoIndent') does not match the Linker's OutputFile property value '..\build\NppAutoIndent_D.dll' ('NppAutoIndent_D') in project configuration 'Debug Unicode|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).
- MSB8012: $(TargetPath) ('C:[...]\NppAutoIndent\project..\build\Debug Unicode\NppAutoIndent.dll') does not match the Linker's OutputFile property value '..\build\NppAutoIndent_D.dll' ('C:[...]\NppAutoIndent\build\NppAutoIndent_D.dll') in project configuration 'Debug Unicode|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在VS2010中打开VS 2003项目;一个对话框将引导您完成转换。您只需阅读说明并单击相应的按钮即可。
关于缩进,进入工具--->选项,选择语言(C++)并转到格式化。您可以在那里看到一堆选项,根据您的需要进行更改。
为此,您根本不需要 Notepad++。顺便说一句,我是 Notepad++ 的狂热用户,也是我最喜欢的编辑器。
希望这有帮助。
Open the VS 2003 project in VS2010 ; a dialog shall walk you through the conversion. You just need to read the instructions and click the appropriate button .
Regarding indentation, go to Tools ---> Options , choose the Language (C++ ) and go to formatting. You can see a bunch of options there , change it according to your needs .
You dont need Notepad++ at all for this . BTW , I am an avid user of Notepad++ , and its my favourite editor.
Hope this helps.