1.首先必须有gcc和g++ ,如果安装了cygwin就都ok了
2.下载notepad++,这个版本可用:http://www.xiazaiba.com/html/186.html
3.下载并解压 FunctionList_2_1_UNI_dll.zip。
将 FunctionList.dll 复制到Notepad++ 的 plugins 目录下。
将C++.flb、FunctionListRules.xml、Gmod Lua.bmp 复制到 plugins\Config 目录下。
重启NotePad++。效果如下:
4.NppExec安装
将 NppExec.dll 和目录NppExec 复制到Notepad++ 的 plugins 目录下。
将doc目录下的 fparser.html、NppExec.txt、NppExec_Manual.chm、NppExec_Manual.knt、NppExec_TechInfo.txt 复制到 plugins\doc\NppExec 目录下
重启NotePad++。
5.NppExec配置。
a. 打开菜单 Plugins -> NppExec -> Execute...。
6.编译C语言helloworld程序 。
b. 配置编译C文件。(注意gcc不支持文件路径有空格,需要编译的.c文件路径不能空格)
进入“Execute...” 对话框,输入 cmd /c "gcc-4 -o $(CURRENT_DIRECTORY)$(NAME_PART) $(FULL_CURRENT_PATH) ",点击“Save...”按钮保存,命名为“CompileC”。
c. 配置编译C++文件。(也不支持空格)
进入“Execute...” 对话框,输入 cmd /c "g++-4 -o $(CURRENT_DIRECTORY)$(NAME_PART) $(FULL_CURRENT_PATH) ",点击“Save...”按钮保存,命名为“CompileC++”。
d、将“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)下。
1)输入helloworld.c 的源代码:
2)点击菜单 Macro -> CompileC,执行效果如下图所示。
在与helloworld.c 相同的目录下生成了一个 hellowrold.exe 文件。
6.开启自动联想:
#include <stdio.h>
void print() {
printf ("Hello World!\n");
}
main() {
print();
return 0;
}
void print() {
printf ("Hello World!\n");
}
main() {
print();
return 0;
}
2)点击菜单 Macro -> CompileC,执行效果如下图所示。
在与helloworld.c 相同的目录下生成了一个 hellowrold.exe 文件。
说明:如果编译的 *.c文件的路径中包含了空格,在执行“Compile C”命令时将报错。
1、打开菜单 Settings -> Preferences...。
2、点击 Backup/Auto-Completion 选项卡。
选择 Enable auto-completion on each input.
选择 World completion。
选择 Function parameters hint on input
3、在编辑区域中,输入内容,自动联想提示功能效果如下图所示。
2、点击 Backup/Auto-Completion 选项卡。
选择 Enable auto-completion on each input.
选择 World completion。
选择 Function parameters hint on input