gedit

How do I style user-defined function names in gedit?

♀尐吖头ヾ 提交于 2019-12-23 21:25:44
问题 I'm trying to tweak a gedit style so that user-defined functions have a different colour. I've searched through http://library.gnome.org/devel/gtksourceview-2.0/stable/lang-reference.html but I couldn't find anything. I thought <style name="def:function" /> might do it, but it seems have no effect in gedit. <?xml version="1.0" ?> <style-scheme id="wombat" name="Wombat" version="1.0"> <author/> <_description>Wombat theme</_description> <style background="#2d2d2d" name="current-line"/> <style

gedit plugin error - plugin loader 'python3' was not found

拈花ヽ惹草 提交于 2019-12-23 08:33:57
问题 I tried to add some plugins in gedit 3.10.4 on ubuntu 14.04LTS and some errors occured when I try to activate those plugins in gedit: (gedit:20686): libpeas-WARNING **: Error initializing Python Plugin Loader: PyGObject initialization failed ImportError: could not import gobject (error was: ImportError("No module named 'gi'",)) (gedit:20686): libpeas-WARNING **: Please check the installation of all the Python related packages required by libpeas and try again (gedit:20686): libpeas-WARNING **

Setting the cursor position in PyGTK (for a Gedit plugin)

◇◆丶佛笑我妖孽 提交于 2019-12-23 06:06:07
问题 I'm developing a Gedit plugin which is built on PyGTK. I'm trying to figure out how to programatically tell the cursor where to go. For example, I'd like to have the cursor automatically go to right before the first "|" (pipe) in the current line. Any ideas or starting points? I've been using the Gedit API up until now (right here) which is helpful for the most part but doesn't mention anything about manipulating the cursor position. 回答1: Looking at the gedit plugin API, it looks like gedit

GEdit/Python execution plugin?

不羁岁月 提交于 2019-12-20 10:11:25
问题 I'm just starting out learning python with GEdit plus various plugins as my IDE. Visual Studio/F# has a feature which permits the highlighting on a piece of text in the code window which then, on a keypress, gets executed in the F# console. Is there a similar facility/plugin which would enable this sort of behaviour for GEdit/Python? I do have various execution type plugins (Run In Python,Better Python Console) but they don't give me this particular behaviour - or at least I'm not sure how to

从G_BEGIN_DECLS和 G_END_DECLS说起

痴心易碎 提交于 2019-12-19 17:08:58
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 今天开始正式研究gedit的源码,第一次看c/c++的源码,有点吃力啊,坚持不懈,慢慢来。 在gedit.c文件中遇到了 G_BEGIN_DECLS 和 G_END_DECLS ,平常搞C语言的东西,我个人几乎没这样用过(怕是太菜了。。)遂顺藤摸瓜,抽丝剥茧。(以下用G宏代替) 由宏定义联想这两个东西,例如#define PRINT printf("Hello World\n");在程序中可以直接使用PRINT输出,G宏的形式很像宏定义啊。果真,上网一查,得到如下定义 //https://github.com/bratsche/glib/blob/master/glib/gmacros.h /* Guard C code in headers, while including them from C++ */ #ifdef __cplusplus # define G_BEGIN_DECLS extern "C" { # define G_END_DECLS } #else # define G_BEGIN_DECLS # define G_END_DECLS #endif 它的庐山真面目出来了,一段预处理命令。大概解释一下,如果定义了__cplusplus,则定义G宏按照C程序风格编译,否则按照C++风格编译

Block commenting in Gedit?

谁说胖子不能爱 提交于 2019-12-18 10:12:21
问题 Is there a way to comment out a chunk of highlighted code? I am programming in ruby, and I hate putting # on lines individually. 回答1: 1.Install gedit plugins sudo apt-get install gedit-plugins 2.Go to Edit->Preference->Plugins-> and enable Code Comment 3.Ctl+m to comment block of codes 4.Ctl+Shift+m to uncomment block of codes 回答2: Ruby has block commenting... =begin Insert comment here =end This will avoid the need to add # to each line... However, I don't think Gedit will convert

Gedit with Git in Windows?

徘徊边缘 提交于 2019-12-12 17:11:52
问题 Is there any way to use Gedit as the core.editor for Git in Windows? 回答1: Add your gedit bin directory to environment variable %PATH%, then configure git core.editor "gedit" 回答2: Though this question doesn't answer your question directly, it does talk about setting up an editor to work with Git for Windows: How can I set up an editor to work with Git on Windows? This question might also be useful for you incase you run into problems while changing the default editor: Unable to change the

Syntax highlighting in gedit not working automatically

夙愿已清 提交于 2019-12-12 09:01:59
问题 I'm trying to use Ubuntu for Rails development and I'm liking gedit except the syntax highlighting does not seem to work with out me setting it for each file I open. Should it not recognize a .rb file a ruby file rather than me having to go into the menu and setting it as such? Have I missed a setting somewhere? 回答1: Try to edit your /etc/mime.types file and add those “text/x-????” entries: text/x-ruby-source rhtml html.erb erb text/x-eruby rjs text/x-yaml yml yaml 回答2: Try opening up /usr

Is there a way to tell gedit that .sage files should always be highlighted as Python code?

送分小仙女□ 提交于 2019-12-11 02:27:19
问题 Well, that's about all there is to say. Currently I have to set the highlighting on each file by hand, which is getting annoying, especially since it sometimes forgets and I have to set it again. I'm using gedit 3.6.1 on a lubuntu machine, if that matters. Sorry if this is a really easy question, but I haven't been able to figure it out myself. Thanks. 回答1: Thanks to Fredrik's comment I found an easy solution, although it seems like more of a hack than one would want. go to /usr/share

Java problems with UTF-8 in different OS

China☆狼群 提交于 2019-12-10 11:38:27
问题 I'm programing with other people an application to college homework, and sometime we use non-english characters in comments or in Strings displayed in the views. The problem is that everyone of use is using a different OS and sometimes different IDE's to program. Concretely, one is using MacOS, another Windows7, and another and me Ubuntu Linux. Furthermore, all of them use Eclipse and I use gedit. We have no idea if Eclipse or gedit are configurable to work propertly with UTF8 bussiness, at