1

如何结合 Free Pascal 编译器和 NP++(或者其他编辑器,Vim,Geany,...)?即我想要类似IDE:编译,从NP++ 运行,错误\警告列表。我试过http://sourceforge.net/projects/notepad-plus/forums/forum/331753/topic/2084061?message=5036415但它不起作用。还尝试了一些不同的代码

cd $(CURRENT_DIRECTORY)
fpc $(NAME_PART).pas

但同样的问题发生

在此处输入图像描述

4

4 回答 4

1

你应该试试ConText。我将它用于 Pascal 编程。它不是最漂亮的代码编辑器,但我认为对于 Pascal 来说它是最好的。我从那里使用“Turbo Pascal 7.0”荧光笔。我有编译、运行 .exe 或在 Free Pascal 中打开文件等命令的代码。如果你愿意,我可以在那里写。

于 2012-01-29T10:48:35.737 回答
1

嗯,看起来问题中提到的 np++ 插件有效,不确定是什么问题以及为什么我第一次尝试时它没有创建 .exe,但现在一切正常。

还找到了 SciTE 编辑器,可以在其中添加类似

#using free pascal

# compile
command.compile.*.pas=fpc "$(FilePath)"

# normal execute
if PLAT_WIN
    command.go.*.pas="$(FileName).exe"
    command.go.subsystem.*.pas=2
if PLAT_GTK
    command.go.*.pas="kvt -e $(FileName)"

# build
command.build.*.pas=fpc -B "$(FilePath)"
command.build.subsystem.*.pas=1

command.name.0.*.pas=Debug Compile
command.0.*.pas=fpc -g "$(FilePath)"
command.name.1.*.pas=Debug Build
command.1.*.pas=fpc -g -B "$(FilePath)"
command.name.2.*.pas=GDB
if PLAT_WIN
    command.2.*.pas=gdbpasw "$(FileName)"
if PLAT_GTK
    command.2.*.pas=gdb "$(FileName)"
    command.name.3.*.pas=DDD
    command.3.*.pas=ddd "$(FileName)"

pascal.properties. 或者这里已经包含:http ://code.google.com/p/scite-ru/downloads/list

于 2012-01-30T10:51:19.070 回答
1

我已经使用这个脚本来编译和运行我的 pascal 代码:

cd $(CURRENT_DIRECTORY)
C:\FPC\2.6.0\bin\i386-Win32\fpc.exe $(NAME_PART).pas
$(NAME_PART).exe

如果需要,请记住更改 fpc 路径。

于 2012-11-21T11:40:07.277 回答
0

也许试试这个代码:

NPP_SAVE
cd $(CURRENT_DIRECTORY)
CMD.EXE /C if exist $(Name_PART).exe DEL $(Name_PART).exe
fpc.exe "$(FULL_CURRENT_PATH)"

它用于编译

于 2017-05-27T15:45:00.467 回答