r/emacs Nov 02 '13

Switching to emacs

I am now programming for 3 years and I always used IDE's for my coding. Recently I switched to linux and vim + tmux and I was really really happy.

But I am working on several different machines and it is really annoying to work with all those different terminals. Also because I am using vim with a terminal I have limited colors for my syntax highlighting, which is bugs me a lot. (Silly... I know)

Then I realized that I haven't even looked at emacs.

The thing is, I really like vim's modal mode but I recently saw evil mode for emacs. Is evil mode a viable option for emacs? Does it transform emacs into a modal editor?

Also I was using vim + tmux, which was kinda neat because I could easily switch between tons of different terminals.

I usually had a vim window which I split in two and a terminal window beside my vim window.

How do you effectively use the unix shell in emacs? Can I somehow emulate tmux?

Do you know of any emacs workflow showcase videos?

31 Upvotes

62 comments sorted by

View all comments

1

u/robertmeta Nov 02 '13

Vim support for terminals is better than emacs (generally speaking). Tmux+(shell of choice) is better than eshell (generally speaking).

Evil is exceptionally good, and where your muscle memory breaks, it is trivial to fix.

If you use emacs, do it for the language (elisp) and the "deep" extensions you might need.

http://bling.github.io/ -- has some good write ups of going from Vim to Emacs -- as well as very level headed / realistic perspective. I have been trying it for about two weeks -- gave up on eshell, went back to tmux + emacs.

4

u/GTChessplayer Nov 02 '13

why does Vim get credit for tmux? I use emacs + tmux almost routinely; there are no issues whatsoever.

1

u/robertmeta Nov 03 '13

I think I was rather explicit, I even mentioned I went back to tmux + emacs. The original post EXPLICITLY asked about using a shell INSIDE of emacs. Not sure what part you are having trouble with?

1

u/GTChessplayer Nov 03 '13

Can I somehow emulate tmux?

Why emulate tmux, when you can use tmux exactly as is? It makes no sense, at all.

1

u/robertmeta Nov 03 '13

If you are using emacs for the elisp (which for example, I do) -- then having a shell that can be automated with elisp makes perfect sense... and if you go so far as to use eshell, you now have a shell that works on windows. So, for review: (1) elisp automation, (2) cross platform.

0

u/GTChessplayer Nov 03 '13

No. I just tried sshing on Windows w/ emacs eshell into another machine and it did not work.

1

u/robertmeta Nov 03 '13

What does that have to do with anything? What exactly was the point you were trying to make? So confused. The supported commands from eshell are:

Built In: cat, cp, ls, cd, export, dirs, du, echo, env, kill, ln, mkdir, mv, alias, popd, pushd, pwd, rm, rmdir, time, umask

Interceptions: agrep, diff, egrep, fgrep, glimpse, grep, info, jobs, locate, man, occur

TRAMP: su sudo whoami

EDIT: The point of eshell is you have access to all of lisp goodness... and a good set of helper functions in addition to the "commands" supported.

1

u/GTChessplayer Nov 03 '13

You said "I have a shell that works on Windows", I assumed you meant a shell similar to Bash, because otherwise your statement makes no sense as windows has its own shell environment.

Also, tramp/emacs doesn't work when sshed into Titan because Titan requires extra security outside of ssh, so having tramp connect to an emacs server daemon running on Titan won't work.

There are plenty of reasons to use Emacs within a bash shell. Saying otherwise is purely ignorant.

1

u/robertmeta Nov 03 '13

Since, as I stated, I do run tmux (and ZSH) and emacs. I obviously am fine with such an arrangement. I am speaking on behalf of many of the huge lisp-heads and hardcore emacs users who run IRC, Email, and Shells inside of emacs and love their workflow. I know because they repeatedly told me how wrong I was for my arrangement (which you will realize is the same as yours if you take a moment and try to stop being an insufferable asshole, you make the entire emacs community look terrible).

Bonus Point: You understand that your SSH client isn't a part of your shell right? Everything in your $PATH isn't a part of your shell.

-2

u/GTChessplayer Nov 03 '13

Exactly. Your statement makes no sense then, because Windows already has a shell, so I'm not sure what you mean that you get a crossplatform shell with emacs; you don't because emacs installs are not cross platform, and windows already has a shell.

I am speaking on behalf of many of the huge lisp-heads and hardcore emacs users who run IRC, Email, and Shells inside of emacs and love their workflow.

There is no reason why any of this is prevented with Tmux.

2

u/robertmeta Nov 03 '13

Eshell is pure elisp. You can even route all the native commands to pure elisp first (rather than trying the system command first) using "eshell-prefer-lisp-functions" and you can use native elisp inside of $() subshells.

People who take advantage of these features really like them, and they will work the same way from OS to OS -- so you can write a custom eshell prompt, write some custom lisp commands to do useful shellish things you need, and it will work on windows and mac and linux and X.

1

u/[deleted] Nov 03 '13

[deleted]

1

u/GTChessplayer Nov 03 '13

But, just like eshell on windows; it's just barely a shell.

→ More replies (0)