Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
wooger
Apr 16, 2005

YOU RESENT?

BusError posted:

Has anyone messed around with any of the Vim emulation packages in Emacs? I've been wanting to learn more about Vim, both for when I'm on a server with no Emacs and also just to broaden my editing horizons. vi-mode seems to not really have any of the cool stuff I've seen pro Vim users use, so I think that's out. Any experience with stuff like evil?

I've used Vim exclusively for the last couple of years, but I just recently switched to emacs after reading about some of the advanced features and modes available.

I use evil all the time, it works perfectly and is well maintained, though you need a couple of other config changes to make it totally feel like vi. I mapped Esc to totally kill any command anywhere, so it's now pretty much identical to Vim when I'm not using one of the fancy modes. All the vim commands I commonly used are emulated with the exact same syntax.

As I use it, it looks like Vim, but with better file and directory management, more features (the regex replace in evil visually shows you the changes as you type the command), and better written extension scripts.

Adbot
ADBOT LOVES YOU

wooger
Apr 16, 2005

YOU RESENT?
I use emacs evil. I know how to define and vim style macros, but I've not been able work out the syntax to save them in my init.el between sessions.

Any suggestions for the best way to do this, so I can call the macros with @m or similar?

wooger
Apr 16, 2005

YOU RESENT?

Pham Nuwen posted:

Emacs is pretty cool but this is a dumb thing to do: http://www.howardism.org/Technical/Emacs/new-window-manager.html since you could do all the same poo poo by running xmonad or whatever, at least that would let your Firefox windows go full-screen and allow you to switch between browser and emacs without closing the browser every time.

I think his eshell-here thing is pretty neat though: http://www.howardism.org/Technical/Emacs/eshell-fun.html

It's inspired me to try integrating eshell and dired a bit more rather than relying on external xterms all the time.

Saw that first link the other day on HackerNews. This guy is a bit OTT, but I like the concept. I just have a workspace / monitor dedicated to emacs fullscreen, and use that for all text & shell work, with browsers / office tools / gui stuff elsewhere. Any workspace enabled window manager is fine though.

I use emacs on Windows at work, in lieu of a proper Unix environment, and use the msys GNU tools (they come with Git) + eshell + tramp to accomplish most things. It's not ideal, but it works. For the guys above messing with putty, plink & trump, I'd definitely recommend switching to proper OpenSSH and spending a little while making a nice ssh.conf.

Reading the comments there, I did find an interesting new emacs addon /alternative distribution called Spacemacs. https://github.com/syl20bnr/spacemacs

"Spacemacs is a user-friendly and well-documented Emacs kit that integrates the best Emacs packages out there. It uses Evil Mode to combine the ergonomic editing features of Vim with the extensibility of Emacs."

As an exclusive evil-mode user, this really looks like it could be of value, though I've only just started playing around really. I get the sense that they've bundled a few too many tools by default.

I only switched from vim a year or two back, but my init.el has a bunch of stuff in it.

Oddly, Spacemacs arrives at a very similar solution to my own one to enhance ergonomics:
They use vim leader to make all commands accessible via a press on the space bar.

In my init.el: In evil normal mode, the space bar sends C-x, and the ; key sends M-x.

So combined with evil, I almost never have to chord.

wooger
Apr 16, 2005

YOU RESENT?

horse mans posted:

So, for shiggles, I replaced my .emacs.d with Spacemacs, which is meant to provide a set-and-forget vim environment within Emacs.

It's... very painful so far. It's intricately configured and seems to break super easily between revisions, and relies on so many bleeding edge packages that a first run is almost guaranteed to have something not work, which you may or may not be aware of. The navigation scheme for commands is somewhat interesting, though, and it does come packed with a lot of poo poo people should be using in Emacs anyway (helm, projectile, ace, and so on). Has anyone else taken a look at it?

Yep, see my post up above on this very page. I agree with you I think, I'm back to using my own customised evil-mode, but with space mapped as C-x rather than using it as a vim leader key.

It's way more complicated than vim by default, but may provide some useful ideas of modules to look at.

wooger
Apr 16, 2005

YOU RESENT?

Mr. Fish posted:

Emacs on Windows will start supporting running daemon in version 25.1, I am pretty excited about this:
http://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS#n766

I would prefer not to use Windows but when I have to it is nice to have the same sort of workflow I do on Linux.

I use the server mode for Emacs on windows in 24.x at present, via some init.el code, what difference does this make to me?

I guess it just means there's no window required and I can't accidentally start the client before the server is started, which I occasionally manage by clicking the wrong shortcut.

wooger
Apr 16, 2005

YOU RESENT?

Mr. Fish posted:

That is exactly what it means, personally I find it frustrating that I can close my server by accident.

Indeed. Emacs is definitely something that makes windows bearable.

wooger
Apr 16, 2005

YOU RESENT?

duck hunt posted:

I just got a new keyboard from WASD, and it has a switch on the back of the board that you can set to remove caps lock and turn it into Ctrl like the old IBM keyboards. On top of being really well made and great to use, I highly recommend them for emacs work.

You can do this in software pretty easily FWIW. However, I've found that moving Ctrl to the alt key, alt to the win key & escape to CapsLock is by far the most ergonomic layout for me. Ctrl on escape is still using the pinky on the left side only far too much.

Caveat: I use evil-mode

wooger
Apr 16, 2005

YOU RESENT?

PlesantDilemma posted:

Looks like EmacsConf is this weekend in San Francisco. Anyone going? Seems much of it will be live streamed. I plan to check it out, maybe get a emacs guru to show me how helm mode is installed and used.

http://emacsconf2015.org/

Shouldn't that be init.el2015.org?

Adbot
ADBOT LOVES YOU

wooger
Apr 16, 2005

YOU RESENT?

horse mans posted:

How many people don't use an American keyboard? 30, 40 people tops?

This is true. I'm in the U.K., but only use USA keyboards.

Plus we're talking about MacBooks, the UK Apple keyboard is a sick joke.

  • Locked thread