您的位置:首页 > 其它

NotePad++ - 安装和配置C/C++开发插件

2016-01-22 15:28 309 查看


一、NotePad++插件 / NotePad++ Plugins

1、Function List ( Unicode )

当前最新版本:Version 2.1

发布日期:2010-02-18

安装程序下载地址:http://sourceforge.net/projects/npp-plugins/files/Function%20List/FunctionList%20Plugin%20v2.1/FunctionList_2_1_UNI_dll.zip/download

2、NppExec ( Unicode )

当前最新版本:Version 0.4.1

发布日期:2010-07-22

安装程序下载地址:http://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec%20Plugin%20v0.4.1/NppExec_041_dll_Unicode.zip/download


二、安装环境 / Environment

Windows2003 / Windows XP

Notepad++-5.8.5 (Unicode版本)


三、NotePad++插件安装 / NotePad++ - Howto Install Plugins

如何安装NotePad++的插件,其官网原文如下:

Usually, the only installation procedure plugins require is to

place the dll in the plugins subfolder of the Notepad++ install folder;
place any configuration file it comes with in plugin\config
preferrably, place all documentation files in plugin\doc, or in some subfolder of it

Notepad++ loads plugins at startup. To load a new plugin, you can either close and restart Notepad++, or use the Settings -> Import -> Import plugin command. The latter will copy the dll in the plugin folder if it is not already there.

译文:

通常情况下,安装程序插件只需要执行如下方法:

将DLL文件复制到Notepad++安装目录的plugins目录下;
将配置文件复制到plugins\Config目录下;
更好的做法,将所有的文档文件复制到plugins\doc目录下,或它的子目录下。

Notepad++在启动的时候载入插件。要载入一个新插件,你可以关闭并重启Notepad++,或使用 Setting -> Import -> Import plugin 命令。稍后将复制插件的DLL到plugins目录下。


四、Function List 插件安装 / Howto Install Plugin "Function List"

1、下载并解压
FunctionList_2_1_UNI_dll.zip。

2、将 FunctionList.dll 复制到Notepad++ 的 plugins 目录下。

3、将C++.flb、FunctionListRules.xml、Gmod Lua.bmp 复制到 plugins\Config 目录下。

4、重启NotePad++。效果如下:




五、NppExec插件安装和配置 / Howto Install and Configure Plugin "NppExec"

1、NppExec安装。

下载并解压
NppExec_041_dll_Unicode.zip。
将 NppExec.dll 和目录NppExec 复制到Notepad++ 的 plugins 目录下。
将doc目录下的 fparser.html、NppExec.txt、NppExec_Manual.chm、NppExec_Manual.knt、NppExec_TechInfo.txt 复制到 plugins\doc\NppExec 目录下。
重启NotePad++。

2、NppExec配置。

1. 打开菜单 Plugins -> NppExec -> Execute...。



2. 配置编译C文件。

进入“Execute...” 对话框,输入:
cmd /c "gcc -o $(CURRENT_DIRECTORY)\$(NAME_PART) $(FULL_CURRENT_PATH) "
"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"




3. 配置编译C++文件。

进入“Execute...” 对话框,输入:

cmd /c "g++ -o $(CURRENT_DIRECTORY)\$(NAME_PART) $(FULL_CURRENT_PATH) "
"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"



4、将“CompileC”,“CompileC++”添加到宏菜单(Macros)下。

1)打开菜单 Plugins -> NppExec ->Advanced Options...。



2)在Associated script:下面下拉框中选择“CompileC”,“CompileC++”,点击“Add/Modify”按钮将它们依次添加到Menu items下面的列表中。

选择 "Place to the Macros submenu"复选框。



3)打开菜单 Macro ,可以看到“CompileC”,“CompileC++”都已经添加到宏菜单(Macros)下。



5、编译C语言helloworld程序 。

1)输入helloworld.c 的源代码:

#include <stdio.h>

void print() {

printf ("Hello World!\n");

}

main() {

print();

return 0;

}

2)点击菜单 Macro -> CompileC,执行效果如下图所示。

在与helloworld.c 相同的目录下生成了一个 hellowrold.exe 文件。



说明:如果编译的 *.c文件的路径中包含了空格,在执行“Compile C”命令时将报错。


六、NotePad++ 开启自动联想提示 / NotePad++ - Enable Autocompletion

1、打开菜单 Settings -> Preferences...。

2、点击 Backup/Auto-Completion 选项卡。

选择 Enable auto-completion on each input.

选择 World completion。

选择 Function parameters hint on input



3、在编辑区域中,输入内容,自动联想提示功能效果如下图所示。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: