HNHacker News
TopNewBestAskShowJobs

tuhdo

785 karma · joined June 13, 2014

submissionscomments
tuhdo··on Emacs Rocks
I agree with everything you said about other aspects of Emacs.

You are right that supports for C++ is not as rich, since it is such a complicated language. But for small C++ projects and large C projects, it is pretty much usable, especially just for code navigation. At least it's better than using Grep and better than nothing at all. The currently available tools are perfectly usable for those who only write C.

For code completion, there's no pretty solution, but at least simple solution like company-clang which uses clang to get completion candidates from system include paths is pretty usable.

tuhdo··on Emacs Rocks
Emacs will tell you the exact location where you missed instantly when the files are loaded. No worry! Anyway, to try out Emacs these days everything is already done for you:

- Prelude (for those who want to learn Emacs): https://github.com/bbatsov/prelude

- Spacemacs (for long time Vim users): https://github.com/syl20bnr/spacemacs

tuhdo··on Emacs Rocks
Opps sorry about the link. I reposted with proper links here:

If you write C++, did you check my C/C++ guide: http://tuhdo.github.io/c-ide.html. Aside from refactoring, you have mostly everything like:

- code navigation: jump to anywhere instantly. DEMO: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif.

- code completion: context-sensitve completion. DEMO: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif.

- code compilation: you can click on the error and it gets you to where you want; work with any build system, while other IDE only supports a specific build system, i.e. for Makefile project, you only get plain text error message. DEMO: http://tuhdo.github.io/static/c-ide/compilation-mode.gif.

- code debugging: provides a frontend for GDB; DEMO: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif.

- Powerful automatic indentation: https://github.com/Bruce-Connor/aggressive-indent-mode. It does not only indent the current line, but the whole Semantic context around your cursor. Demos inside the homepage.

- Live grep: http://tuhdo.github.io/static/live_grep.gif.

- Access to a list of project with a few key strokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

- Quickly access any file in your project, as large as Linux kernel, instantly, regardless of where you are in the project, and within a few keystrokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Jump to any file depends on context, even if the file path is in a plain ASCII text file: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

- Copy files from anywhere to anywhere: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Delete files anywhere; files are always at your finger tip to do whatever with them: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Switch between other files with same names but different extensions: http://tuhdo.github.io/static/helm-projectile/helm-projectil.... Work not only for C/C++ but other languages, and is customizable. You don't have to configure anything, like adding include paths. Everything is automatically done for you.

- Jump to tag definition, from its own parser or external parser like GNu Global: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif

- Jump up to parent: http://tuhdo.github.io/static/c-ide/senator-go-to-up-referen....

- Do you like outline tree?: http://tuhdo.github.io/static/c-ide/sr-speedbar.gif

- Interactive outline tree: http://tuhdo.github.io/static/c-ide/helm-semantic-or-imenu-w...

- Easily move back and forth using the interactive outline tree: http://tuhdo.github.io/static/part3/helm-semantic-or-imenu-2...

- References retrieved from its Emacs internal parser: http://tuhdo.github.io/static/c-ide/semantic-symref.gif.

- Beautiful compile output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif

- Frontend support for GDB: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif

- Open man page for symbol at cursor: http://tuhdo.github.io/static/part3/helm-man-woman.gif.

- Emacs open 39MB C file: http://tuhdo.github.io/static/performance.gif

- Emac opens multi-gigabtye file: http://www.emacswiki.org/VLF

tuhdo··on GNU GLOBAL source code tagging system
I listed several methods for navigating C/C++ source code here in my guide: http://tuhdo.github.io/c-ide.html

Hope it help.

tuhdo··on GNU GLOBAL source code tagging system
Well, it seems like GNU Global while can only do #1, but does it better: http://www.farseer.cn/config/2013/11/26/ctags-cscope-gtags/
tuhdo··on Emacs Rocks
You can check https://github.com/syl20bnr/spacemacs if you want to use Evil mode not just for editing but for everything else in Emacs. Just clone to your ~/.emacs.d and start Emacs then everything will be automatically installed for you. Most key bindings outside of editing are Vim-like, created by Vim users. You already stick with Vim for 10 years and learned many things about, so I suggest you to keep that knowledge. But then, aside of editing text, if some Emacs utility does not have Evil key bindings, you should also learn the default, because most of the utilities are always in normal mode, so you only need to press a single key to execute most commands.

spacemacs also has extensive documentation, so you can learn key bindings easily and be productive with Emacs immediately without any extra configuration.

tuhdo··on Emacs Rocks
Not really. With Emacs, it makes navigating a project like Linux kernel seems a small project. You can see the demos in my other answer here: https://news.ycombinator.com/item?id=8616737

Emacs allows you to jump to anything instantly, even with source tree like Clang or Linux.

tuhdo··on Emacs Rocks
Here are some nice features that Emacs provide:

- Powerful automatic indentation: https://raw.githubusercontent.com/Bruce-Connor/aggressive-in.... It does not only indent the current line, but the whole Semantic context around your cursor.

- Live grep: http://tuhdo.github.io/static/live_grep.gif

- Access to a list of project with a few key strokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Quickly access any file in your project, as large as Linux kernel, instantly, regardless of where you are in the project, and within a few keystrokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Jump to any file depends on context, even if the file path is in a plain ASCII text file: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Copy files from anywhere to anywhere: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Delete files anywhere; files are always at your finger tip to do whatever with them: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Switch between other files with same names but different extensions: http://tuhdo.github.io/static/helm-projectile/helm-projectil.... Work not only for C/C++ but other languages, and is customizable. You don't have to configure anything, like adding include paths for the command to search. Everything is automatic. Just use it as it is.

- Jump to tag definition, from Emacs's own parser or external parser like GNU Global: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif

- Jump to any definition from a list of definitions in source tree, even for Linux kernel: http://tuhdo.github.io/static/c-ide/helm-gtags-select.gif

- Jump up to parent: http://tuhdo.github.io/static/c-ide/senator-go-to-up-referen....

- Do you like outline tree?: http://tuhdo.github.io/static/c-ide/sr-speedbar.gif

- Interactive outline tree: http://tuhdo.github.io/static/c-ide/helm-semantic-or-imenu-w....

- Easily move back and forth using the interactive outline tree: http://tuhdo.github.io/static/part3/helm-semantic-or-imenu-2....

- References retrieved from its Emacs internal parser: http://tuhdo.github.io/static/c-ide/semantic-symref.gif.

- Beautiful compile output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif

- Frontend support for GDB: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif

- Code completion: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif.

- Open man page for symbol at cursor: http://tuhdo.github.io/static/part3/helm-man-woman.gif.

- Emacs open 39MB C file: http://tuhdo.github.io/static/performance.gif

- Emac opens multi-gigabtye file: http://www.emacswiki.org/VLF

- Emacs is a bit torrent client: https://bitbucket.org/ukaszg/aria2-mode/

You can see more demos in:

+ Emacs Mini Manual: http://tuhdo.github.io/emacs-tutor.html + C/C++ Development Environment for Emacs: http://tuhdo.github.io/c-ide.html + A Package in a league of its own: Helm: http://tuhdo.github.io/helm-intro.html + Exploring large projects with Projectile and Helm Projectile: http://tuhdo.github.io/helm-projectile.html

Note that in the demos you may see me type in the commands. You can think of it like the start menu in Windows, but actually those commands can be executed quickly with a shortcut. I type in the commands for demonstration purpose to Emacs users.

Those demos are just tip of the iceberg.

tuhdo··on Towards a Vim-like Emacs
All those ports are incomplete and simple. You cannot use those to publish to HTML, PDF, Latex and TexInfo. You cannot do literate programming in those ports as well. Those are just shallow copies.

You should look at my guides if you want an IDE-like experience: http://tuhdo.github.io/

I find writing code in C/C++ with Emacs much faster than typical IDE: http://tuhdo.github.io/c-ide.html

For writing Lisp code, maybe except the commercial IDEs, none other tool matches.

tuhdo··on Towards a Vim-like Emacs
If you want to see what's new, check my guides: http://tuhdo.github.io/

For example, you should take a look at Projectile and Helm Projectile: http://tuhdo.github.io/helm-projectile.html

tuhdo··on Towards a Vim-like Emacs
Except that even if I have to type 10 characters for code, I want it to complete in 2 seconds, not 20 seconds, to continue my train of thoughts.
tuhdo··on Vim After 11 Years (2013)
In what aspect it is no match? Feature-wise, not GUI; GUI is non-factor here. People wrote a kernel without a debugger after all.
tuhdo··on Vim After 11 Years (2013)
Yes, since you spread failed information, and I had to post to correct it. There are many things that could not be done in those IDEs you listed, i.e. to debug random binary outside of a project. Did you tried it Ctrl + H for finding files? Completely unnecessary complicated with tons of checkboxes, and slow to search. It does not show me result instantly; meanwhile in Emacs, I could do this: Open file at point anywhere, even in plain text file: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

In debugging, Eclipse is no difference than Emacs; both use GDB. For compiling, Eclipse also uses external debugger. The only thing that makes it an IDE is its internal parser, that is broken for large projects and Emacs also has a C/C++ parser anyway. What make Emacs less IDEish than Eclipse?

tuhdo··on Vim After 11 Years (2013)
You never said this. And even if you did not stop, you answer strongly suggest that you do not use Emacs for serious development anymore, and was out of date with current state of Emacs. If you actually use it, you would know that none of my demos use Clang.
tuhdo··on Vim After 11 Years (2013)
> I edit shell scripts, config files, and a host of other non-.rb files all the time in RubyMine, for example. Many of the features, particularly the code navigation, that you demo on your site are available in JetBrains IDEs.

Is it available for shell scripts? When I write shell scripts in Emacs, press TAB and it shows me a list of available shell commands in my editing file. You can also jump around function/variable definitions in your shell scripts.

> (ps: your demos are awesome - great resource.)

Thanks :)

> That's one area where I would recommend trying emacs or vi before an IDE

Well, Emacs is also an IDE of its own language, Emacs Lisp. You have code navigation/completion, functional debugger, profiler and byte compiler all it one. Emacs is not merely an editor, it's an environment for people write programs to run in it. That's why you see IDE features in the demos I posted there. And those demos shows that Emacs also evolves itself over 30 years.

And for dynamic language, Cider for Clojure https://github.com/clojure-emacs/cider can compete with any Clojure IDE. In fact, I don't see anything better.

tuhdo··on Vim After 11 Years (2013)
This is just wrong. Eclipse is an IDE to some languages that it supports, but an average editor to everything else. Have you tried editing configuration files, shell scripts or patch files in it. Eclipse or similar things are terrible when you work in multi-language environment. And look at my other answer that has many demos to see many things your IDE has not yet satisfied me.
tuhdo··on Vim After 11 Years (2013)
You also missed the part that you stopped using it for almost 10 years. It is very different now. For example, I can now jump to anywhere in the kernel source tree instantly, jump to any definition or reference instantly. The new features make navigating Linux kernel source like a small project. I cannot do this with Eclipse.
tuhdo··on Vim After 11 Years (2013)
None of those relies on clang. And why do you think that it's ok for an IDE to use Clang, and Emacs is not?

You misunderstood what Emacs is really. It's an environment for creating programs to run in it. At its core, Emacs is just Emacs Lisp interpreter. The editor frontend is for users to interact with this core, by directly using Lisp code or just using editing commands. Comparing Emacs to IDE is just like comparing Python interpreter to IDE; but the former has more potential to be anything it wants.

> Navigate in binary files

Yes. You have Hexl mode for editing binary files, ages ago: https://www.gnu.org/software/emacs/manual/html_node/emacs/Ed...

You can even open files with gigabytes size to edit: http://www.emacswiki.org/VLF

> Semantic refactory

Fine. This can be done if someone puts the effort into making it. But text replace in whole project is good enough. Even so, things like that won't work with project like Linux kernel. Parsers in IDEs like Eclipse or VS just can't handle such complex project, so those IDEs are also useless.

> Background compilation

Yes. Emacs can do perform asynchronous operation. M-x compile and type in compilation command, then either do something else or see it display beautiful output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif. In Eclipse, even for debugging a simple binary file, you have to create a project. This is absurd.

> Debug unit tests

What's the problem? If you write unit tests in a language, use that language debugger. Emacs has an integrated interface for many debuggers, even for Bash and Make.

> Cross reference to source control checks and software tracking issues

Why is this essential? If you want, you can write one in Emacs. However, use a proper bug tracking software, like BugZilla and use your browser.

> Parallel code debugging

Yes, GDB provides that, so Emacs has that too. See this screenshot again: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif. Notice the bottom right. You have a tab "Threads" in there. Clicking on a thread in the list will switch other windows (i.e. registers, stack frames) to the context of that thread.

> Visualization of C++ data structures

Yes, you have Ebrowse: http://www.gnu.org/software/emacs/manual/html_mono/ebrowse.h..., that lists an index of classes in tree format. For example, if class is a child of a class, it is display as a child of that class in tree format. You can click on each class, you view all the member functions and can switch between declarations and definitions.

Or use Doxygen: http://www.stack.nl/~dimitri/doxygen/

> Database integration

Non-essential. I don't work with database. But, you can use Emacs as a database client if you want: http://truongtx.me/2014/08/23/setup-emacs-as-an-sql-database... and it's better than many crappy database clients out there.

> UML diagrams with two way code editing

Non-essential. Again, use Doxygen if you want.

> UI design

Can your IDE work on multi-hop remote machines?

> Integration with application servers

So, is running a terminal emulator inside Emacs and run commands to control the servers enough?

> Graphical visualization of profiling data

Non-essential. Use a separate profiler.

And please don't say that those IDEs are better because it can run some programs inside the same window, while Emacs relies on external programs. It's like saying Eclipse sucks and is not a real IDE because it uses gcc to compile code, not providing its own compiler. "IDE" is just a bunch of programs wired together.

tuhdo··on Vim After 11 Years (2013)
Your knowledge about Emacs was outdated then. And what make you think that Emacs cannot use Clang and LLVM? Currently, there's already rtags that uses Clang for live analysis: https://github.com/Andersbakken/rtags. Here are some nice features that Emacs provide:

- Powerful automatic indentation: https://raw.githubusercontent.com/Bruce-Connor/aggressive-in.... It does not only indent the current line, but the whole Semantic context around your cursor.

- Live grep: http://tuhdo.github.io/static/live_grep.gif

- Access to a list of project with a few key strokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

- Quickly access any file in your project, as large as Linux kernel, instantly, regardless of where you are in the project, and within a few keystrokes: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Jump to any file depends on context, even if the file path is in a plain ASCII text file: http://tuhdo.github.io/static/helm-projectile/helm-projectil...

- Copy files from anywhere to anywhere: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Delete files anywhere; files are always at your finger tip to do whatever with them: http://tuhdo.github.io/static/helm-projectile/helm-projectil....

- Switch between other files with same names but different extensions: http://tuhdo.github.io/static/helm-projectile/helm-projectil.... Work not only for C/C++ but other languages, and is customizable. You don't have to configure anything, like adding include paths for the command to search. Everything is automatic. Just use it as it is.

- Jump to tag definition, from Emacs's own parser or external parser like GNU Global: http://tuhdo.github.io/static/c-ide/helm-gtags-jump-dwim.gif

- Jump to any definition from a list of definitions in source tree, even for Linux kernel: http://tuhdo.github.io/static/c-ide/helm-gtags-select.gif

- Jump up to parent: http://tuhdo.github.io/static/c-ide/senator-go-to-up-referen....

- Do you like outline tree?: http://tuhdo.github.io/static/c-ide/sr-speedbar.gif

- Interactive outline tree: http://tuhdo.github.io/static/c-ide/helm-semantic-or-imenu-w...

- Easily move back and forth using the interactive outline tree: http://tuhdo.github.io/static/part3/helm-semantic-or-imenu-2...

- References retrieved from its Emacs internal parser: http://tuhdo.github.io/static/c-ide/semantic-symref.gif.

- Beautiful compile output: http://tuhdo.github.io/static/c-ide/compilation-compile.gif

- Frontend support for GDB: http://tuhdo.github.io/static/c-ide/gdb-many-windows.gif

- Code completion: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif.

- Open man page for symbol at cursor: http://tuhdo.github.io/static/part3/helm-man-woman.gif.

- Emacs open 39MB C file: http://tuhdo.github.io/static/performance.gif

- Emac opens multi-gigabtye file: http://www.emacswiki.org/VLF

- Emacs is a bit torrent client: https://bitbucket.org/ukaszg/aria2-mode/

You can see more demos in:

+ Emacs Mini Manual: http://tuhdo.github.io/emacs-tutor.html + C/C++ Development Environment for Emacs: http://tuhdo.github.io/c-ide.html + A Package in a league of its own: Helm: http://tuhdo.github.io/helm-intro.html + Exploring large projects with Projectile and Helm Projectile: http://tuhdo.github.io/helm-projectile.html

Note that in the demos you may see me type in the commands. You can think of it like the start menu in Windows, but actually those commands can be executed quickly with a shortcut. I type in the commands for demonstration purpose to Emacs users.

Those demos are just tip of the iceberg.

tuhdo··on Vim After 11 Years (2013)
Emacs can highlight colors in ANY text buffer if you activate it.
tuhdo··on Vim After 11 Years (2013)
You can easily have that if someone builds a starter kit specific to your workflow with all necessary packages. But then, when you want things your way, at least Emacs allows you; for Eclipse, better use the default one. Maybe you are not up to date but Emacs has features like code navigation/completion for many languages. Emacs's file navigation is superb that I could not find elsewhere: http://tuhdo.github.io/helm-projectile.html

See all my guides for more demos: http://tuhdo.github.io/

tuhdo··on Vim After 11 Years (2013)
Imagine that one day you want to use 10 plugins and have to setup all 10 language environments to use those plugins, and you have to set the whole thing on Windows...
tuhdo··on Emacs 24.4 released
Thanks. Look interesting.
tuhdo··on Emacs 24.4 released
The Eww browser is fully compatible with terminal if you run Emacs non-window mode (-nw option). It supports both HTML and CSS, and render quite nicely. Much better than any terminal web browser I used.

The browser is for looking up online documentation not available in your local machine. For example, sometime a man page is not available in my local machine. I can invoke a google query right inside Emacs and open it immediately without involving heavy weight browsers.

It is really nice to read online book like Practical Common Lisp: http://www.gigamonkeys.com/book/, and directly copy the code and paste to your REPL without ever leaving Emacs.

tuhdo··on Emacs 24.4 released
It supports html and css, but not Javascript. It is implemented in pure Elisp.

I wrote a few introduction guides to Emacs and its ecosystem: http://tuhdo.github.io/ . The guides do not include evil-mode though, as I use Emacs key bindings. But installing evil-mode is easy, and you can immediately use Vim key bindings for editing.

tuhdo··on Emacs 24.4 released
Emacs is in essence, a virtual machine: http://www.emacswiki.org/emacs/ByteCodeEngineering. That's why you are able to do so many things with it. The whole text editor GUI is just a frontend the Lisp interpreter. You can think that Python comes with an interpreter that runs in terminal. Emacs comes with an interpreter and a whole GUI frontend for its interpreter, not merely a terminal interpreter with a prompt. That's why you are able to evaluate any Emacs Lisp code ANYWHERE.

If you only use Emacs as a text editor, that's fine for using a subset of it. Just like a casual user uses Linux without never using its underlying tools in the terminal.

> saying that Emacs is only a Lisp interpreter implies that the entirety of the text editor is implemented in Lisp, which is clearly not the case.

With this argument, I guess Python is also not an interpreter because clearly it is not entirely written in Python.

tuhdo··on Emacs 24.4 released
This web browser in Emacs is usable inside a terminal, and it displays HTML really nice. Much better than something like elink. Other GUI web browser is not.
tuhdo··on Emacs 24.4 released
You can check my mini manual to quickly be productive with Emacs: http://tuhdo.github.io/emacs-tutor.html

Also check my other guides, even just to see Emacs's awesomeness: http://tuhdo.github.io/

tuhdo··on Emacs 24.4 RC 1
I wrote it in my guide: http://tuhdo.github.io/helm-intro.html#sec-2
tuhdo··on Beyond Light Table
Ah yes, the good old "mouse? you're doing it wrong!" bit of elitism. Some people find keyboard navigation through a second buffer that pops up on the bottom to be not-good. I'm one of those people. I hate it when completion buffers, or anything related to a second buffer, pops up in my frame.

There's nothing elite about the keyboard. It's just the keyboard enable higher productivity when it comes to write code.

For completion, it ought to work like the IDE I used back when I was writing Scala. A little tooltip would pop up with completions. You could scroll through them with the mouse or keyboard, and click or ENTER the one you want and it would paste in. Or you could ignore it completely and continue typing. This sort of UI is so much better than popping up a new buffer in the frame. But in Emacs UI, everything is a buffer and there are only three places they can (or usually do) go: in a new frame, in a new window, or in the minibuffer. Only that last one is usable.

In Emacs you have tooltip as well. For example, company-mode shows a completion popup like this: http://tuhdo.github.io/static/c-ide/company-clang-company-gt...

Completion using a window buffer is still vastly superior because it can handle large collections. For example, here is how I filter completion candidates with Helm: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif. Helm works even if you have 99999 candidates (not joking) to filter out. Here is how I quickly filter to a file and enter the file in Linux kernel source tree: http://tuhdo.github.io/static/helm_projectile.gif , very quick and simple; in contrast, the file search dialog box in typical IDEs is very complex with many checkboxes and text fields. How do you cope with completion popup with contains thousands of candidates in it?

GNU global is not a solution. It produces marginally better output than etags, but still requires you to actually run it whenever you make changes to the codebase. Or at least it did back when I tried it as an etags replacement.

No, ggtags: https://github.com/leoliu/ggtags or helm-gtags: https://github.com/syohex/emacs-helm-gtags automatically updates your tag database when you save your file. The tags produced by GNU Global is A LOT better than ctags for C/C++.

Maybe you can look at a few demo screenshots in my C/C++ guide: http://tuhdo.github.io/c-ide.html

← PreviousPage 3 of 5Next →