[gedit-list] please help write gedit plugin in vala
- From: 张斌 <eexpss 139 com>
- To: gedit-list <gedit-list gnome org>
- Subject: [gedit-list] please help write gedit plugin in vala
- Date: Thu, 28 Nov 2019 00:28:16 +0800 (CST)
Hi, all
I copy some code from https://wiki.gnome.org/Projects/Vala/Gedit3PluginSample, want write a plugin. I want excute some command prefix with "!" in the first 5 lines of current file when press "F5". Normally those commands are compile cmd.
The result almost like below:
Posix.system("gnome-terminal --working-directory="+path+" -e "+cmd+" &");
Here is compile code:
⭕ valac --pkg gtk+-3.0 --posix --pkg gedit --pkg libpeas-gtk-1.0 --pkg gtksourceview-4 \
run5.vala -X --shared -X -fPIC --library run5 --output librun5.so
⭕ cp librun5.so run5.plugin ~/.local/share/gedit/plugins/
But now met some trouble, I dont know how to get the **path** of current file. I had attached all two files in email. Sorry for some test code lines in the file.
thanks for all advise.
Attachment:
run5.plugin
Description: Binary data
Attachment:
run5.vala
Description: Binary data
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]