简体   繁体   English

在Linux和Windows下的emacs中为webdev实体配置?

[英]Solid Config for webdev in emacs under linux AND windows?

I have a windows laptop (thinkpad) and somewhat recently rediscovered emacs and the benefit that all those wacky shortcuts can be when the arrow keys are located somewhere near you right armpit. 我有一个Windows笔记本电脑(thinkpad)和一些最近重新发现的emacs和所有那些古怪的快捷方式可以是当箭头键位于你右边腋下的好处。

I was discouraged after php-mode, css-mode, etc, under mmm-mode was inconsistent, buggy, and refused to properly interpret some of my files. 在php-mode,css-mode等之后我很沮丧,在mmm模式下不一致,错误,并拒绝正确解释我的一些文件。 (In all fairness, I'm most likely doin' it wrong) So I eventually found the nxhtml package which worked pretty well. (平心而论,我很可能做错了)所以我最终找到了nxhtml包,它运行得很好。

However, nxhtml causes weird bugs and actually crashes on certain files (certain combinations of nested modes I supposed) under linux! 但是,nxhtml会导致奇怪的错误,并且在linux下的某些文件(我认为的嵌套模式的某些组合)上实际崩溃! (using Ubuntu 7.10 and Kubuntu 8.04) (使用Ubuntu 7.10和Kubuntu 8.04)

I'd like to be able to work on the laptop as well as the home linux pc without having to deal with inconsistent implementations of something that shouldn't be this hard. 我希望能够在笔记本电脑以及家用linux电脑上工作,而不必处理不应该这么难的不一致的实现。 I've googled and looked around and there's a good chance I'm the only human on the planet having these problems... Anyone got some advice? 我用Google搜索并环顾四周,很有可能我是地球上唯一遇到这些问题的人......任何人都有一些建议吗?

(in lieu of an emacs solutions, a good enough cross-platform lightweight text editor with the dev features would also work I suppose...) (代替emacs解决方案,一个足够好的跨平台轻量级文本编辑器与开发功能也可以工作,我猜...)

Personally, I like mumamo-mode . 就个人而言,我喜欢mumamo-mode I'm not sure if you're including that in your problem description, since it does rely on (and is usually downloaded with) nxhtml-mode . 我不确定你是否在你的问题描述中包含它,因为它确实依赖于(通常是下载的) nxhtml-mode So I don't know if you're using mumamo or just some aspect of nxhtml that lets you use multiple modes. 所以,我不知道,如果你正在使用mumamo或只是一些方面nxhtml ,让您使用多种模式。

If you're not using mumamo-mode , then I'd recommend trying it. 如果您没有使用mumamo-mode ,那么我建议您尝试一下。 It won't fix your nxhtml issues, but it is a pretty simple way to do editing of multi-mode files (works great for me, for HTML, CSS, JS, PHP, etc.) 它不会修复你的nxhtml问题,但它是一个非常简单的方法来编辑多模式文件(对我来说非常好,对于HTML,CSS,JS,PHP等)

Five years after the OP, let me recommend Emacs web-mode . OP五年后,让我推荐Emacs 网络模式

It has excellent support for combined web documents (html+php+css+js+asp+jsp...). 它对组合的Web文档(html + php + css + js + asp + jsp ...)提供了出色的支持。 Snippets. 片段。 Syntax highlighting. 语法突出显示。 Auto-completion. 自动完成。 css-colorization. CSS-着色。 Automatic working indentation. 自动工作压痕。 Auto-close tags. 自动关闭标签。

web-mode has completely replaced php-mode/html etc for my daily development. web-mode完全取代了php-mode / html等我的日常开发。

Easy installation through MELPA . 通过MELPA轻松安装。

There is a Github page for reporting issues, which the developer has been very quick to fix. 有一个Github页面用于报告问题,开发人员已经很快修复了这个问题。

Although I use emacs when I have to (ie. when I'm at the command line), I use Eclipse for all my real development work. 虽然我必须使用emacs(即,当我在命令行时),我使用Eclipse进行所有真正的开发工作。 If you get the Web Standards Toolkit plug-in for it, it can do syntax coloring, tag auto-completion, and other fun stuff. 如果您获得了Web Standards Toolkit插件,它可以进行语法着色,标记自动完成和其他有趣的东西。

Alternatively, if Eclipse is to "heavy" for you, jEdit is another excellent program for doing web development (it has most of it's web dev support built in, but you can also get some additional plug-ins for features like HTML Tidy). 或者,如果Eclipse对您来说很重要,那么jEdit是另一个用于进行Web开发的优秀程序(它内置了大部分的Web开发支持,但您也可以为HTML Tidy等功能获得一些额外的插件)。

Both programs are open source and Java-based, which means they're both free and run on (virtually) any platform. 这两个程序都是开源的,基于Java的,这意味着它们都是免费的,并且(几乎)可以在任何平台上运行。

You could try mmm-mode and multi-mode. 您可以尝试mmm模式和多模式。 I haven't tried them: I'm happy with nxhtml for now. 我没试过它们:我现在对nxhtml很满意。 What sort of problems did you encounter? 你遇到了什么问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM