易于扩展 C 语言 IDE

发布于 2024-07-07 09:19:16 字数 239 浏览 6 评论 0原文

我想要一个Linux中的简单的 C IDE/编辑器,我可以轻松地添加功能。 例如:我想为编辑器添加右键菜单项和相关操作。 它应该很容易扩展和添加任何所需的功能。 我尝试过 eclipse CDT,但对于我想做的小修改来说,需要大量的学习(我的意思是了解 eclipse 插件架构和 CDT 扩展点之类的东西)。

谢谢, 萨钦

I want an simple IDE/editor for C in Linux to which I can add features easily. For example: I want to add a right click menu item and a related action for the editor. It should be easy to extent and add any desirable functionality. I tried eclipse CDT but its to much of learning(I mean knowing the eclipse plug-in architecture and the CDT extension points and stuff) to do for the small modification/s I want to do.

Thanks,
Sachin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

狂之美人 2024-07-14 09:19:16

我个人使用 Code::Blocks,根据他们的网站,它也有一个 Linux 发行版。 http://www.codeblocks.org/
我不知道它是否具有很强的可扩展性,但它具有您期望 IDE 提供的所有功能。

量子皮特

I personally use Code::Blocks, which according to their website also has a Linux ditribution. http://www.codeblocks.org/
I don't know whether it's very extendable, but it has all the features you'd expect from an IDE.

QuantumPete

缱绻入梦 2024-07-14 09:19:16

我会尝试 emacs(但是你必须在 LISP 中进行编程。当你掌握了括号的技巧时,这很容易)。 您可以根据缓冲区的上下文(.c 除了 .h)进行编程,它有一个非常大的 c 模式,其中已经实现了许多最需要的东西。

示例:插入如果

;; the indention-thing needs refining
(defun pm-if ()
 "generates if stub"
 (interactive)
 (insert "if () {")
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (insert "} /* endif */")
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (previous-line 3)
 (end-of-line)
 (goto-char (- (point) 3))
)


;; bind it to CTRL-c i
(define-key Ctl-C-keymap "i" 'pm-if)

I would try emacs (but the programming you have to do is in LISP. it is easy, when you get the knack with parantheses). you can do the programming depending on context of the buffer (.c other than .h) an it has a very big c-mode which has many of the most need things implemented already.

Example: insert if

;; the indention-thing needs refining
(defun pm-if ()
 "generates if stub"
 (interactive)
 (insert "if () {")
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (insert "} /* endif */")
 (indent-according-to-mode)
 (newline)
 (indent-according-to-mode)
 (previous-line 3)
 (end-of-line)
 (goto-char (- (point) 3))
)


;; bind it to CTRL-c i
(define-key Ctl-C-keymap "i" 'pm-if)
或十年 2024-07-14 09:19:16

看看 QDevelop - 它非常简单,但具有针对 qt 应用程序的 IDE/编辑器。 5 分钟查看源文件给了我一种添加右键菜单项的方法:) 重现步骤:

  1. 下载源代码,尝试构建 - 我对此没有任何问题

  2. 运行,右键单击编辑器窗口中的某些文本 - 例如那里有一个“Goto Implement”项目

  3. 该文本位于 src/textEdit.cpp 文件中,如下所示:

    connect(menu->addAction(QIcon(":/treeview/images/cpp.png"), tr("转到实现")), SIGNAL(triggered()), this, SLOT(slotGotoImplementation()) );

因此,slotGotoImplementation() - 是一个将被调用的函数。 以与其中实施的所有其他操作类似的方式添加您的操作。

网站上有一些关于向编辑器编写插件的信息 - 可能这是扩展功能的更好方法,但向源代码添加一些代码似乎更容易。

Look at QDevelop - it`s quite simple but featured ide/editor for qt applications. 5 mins look at source files gives me a way to add a right click menu item :) Steps to reproduce:

  1. Download source, try to build - i had no problems with that

  2. Run, right click on some text in editor window - for instance there is a "Goto Implementation" item there

  3. That text is in src/textEdit.cpp file as:

    connect(menu->addAction(QIcon(":/treeview/images/cpp.png"), tr("Goto Implementation")), SIGNAL(triggered()), this, SLOT(slotGotoImplementation()) );

So, slotGotoImplementation() - is a func that will be called. Add your actions in a way like all other actions implemented there.

There are some information on a site about writing plugins to the editor - may be it`s a better way to extend features, but adding some pieces code to source seems easier.

七禾 2024-07-14 09:19:16

查看 codeblocks 以及如何为其编写插件。 这是向当前应用程序添加新功能的最简单方法。 应该是为代码块制作插件的一个很好的起点。

Look at codeblocks and how to write plugins for it. It is the simplest way to add new functionality to the current application. This should be a good starting point for doing a plugin for codeblocks.

只是在用心讲痛 2024-07-14 09:19:16

查看Anjuta。 它是一个用于 GNOME/Glib 类型应用程序的 IDE,据我所知是用 C 编写的,并且有一个应该有用的插件框架。

Look into Anjuta. It's an IDE for GNOME/Glib type applications and to my knowledge is written in C, and has a plugin framework that should be useful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文