Live data from Hacker News

'Using Emacs' Series

cestlaz.github.io

61–70 of 106 posts

Re: 'Using Emacs' Series

#61
post #2

I have never understood the rampant practice of using ~/.emacs.d/ for one's personal Elisp files. Most of what is in this directory appears to be machine generated files from various packages. To me, it seems much cleaner to have a separate directory for my own files, instead of maintaining ~/.emacs.d in Git and having to constantly update my .gitignore as I install and use new packages. EDIT: Also, C-h v user-emacs-…

I don't think there is a right and wrong way to customize emacs, whatever works is good. What I do is have a .emacs and my custom elisp files in a Dropbox folder. Then I have a simple ~/.emacs file that loads the Dropbox one. If I didn't use Dropbox for various other purposes I think I'd use git as well.

Re: 'Using Emacs' Series

#62
post #42

Hey, has any of you guys been using emacs for modern front-end development? I’ve been looking for video tutorials (or at least for demos) on this subject, but could not find anything useful and practical. How is emacs’ support of JSX? Of typescript and TSX? Of flow? Of CSS in JS? Of eslint? Does it keep up with the crazy speed frontend development is changing, or has it remained far behind (being used mostly for the…

I have done some work in angular2 (and rails, fwiw) using emacs. There are modes for javascript (yegge's js2-mode is one of the more feature rich modes I have seen for any language), angular, and typescript. I have not tried eslint but a quick search for emacs eslint turned up some packages. What in particular would you be looking for in terms of front-end development? One issue I run into is problems with poor (auto…

I've found web-mode to be superior for JSX and ES6 stuff, though I tried to use Yegge's for a while. Though I don't do much JS development anymore, this is my current config for web-mode, though I had Flycheck and Flow types working at one point, as well.

https://gist.github.com/asummers/b8304b8ea78fc331b8177ff35d0...

Re: 'Using Emacs' Series

#64
post #7

I am a little concerned you start with package repository and then org mode. Emacs is at heart a simple, modeless editor. With c-[fbpns] and c-x c-[fa] you can immediately, if laboriously, do anything. Every new thing you learn incrementally speeds you up.

> Every new thing you learn incrementally speeds you up.

Like forgetting the original keybindings and switching to evil.

Re: 'Using Emacs' Series

#65
post #12

What is the best way to reduce pain from using ctrl with pinky finger? (emacs pinky?)

I read from somewhere saying that Emacs was invented at a time where the control key reside at where the caps lock key resides now. One day, my pinky genuinely hurt from stabbing the control key of my work-issued keyboard. I remapped the control key to caps and never looked back.

I remapped Ctrl to SPC (like spacemacs) and swapped CAPS with ESC.

Re: 'Using Emacs' Series

#66
post #28
post #22

Earlier quoted context omitted.

Well there is the built in tutorial for that. And it'll leave you at a point where you can frustratingly do text editing and feel a bit confused about what all the hype is and then after a few weeks/months you'll drift back to a more traditional/"modern" text editor. At least that was my experience... twice.. The only way to stick with emacs is to see how extensible and useful it is - which is really all about learni…

I'm a long time vim user, but after a colleague showed me org-mode I installed emacs (with spacemacs). Currently I only use it to edit org files, but it feels like there is a whole ecosystem waiting to be explored.

Magit, ESS, SLIME, Cider, Gnus/mu4e, dired...

There are some fundamentals that make it relatively easy to pick up anything:

    * Help system (nearly everything is self-documenting)
    * Customization
    * ELisp basics (write some helper functions in your .emacs)
    * Debugging (Edebug, just do C-u C-M-x to instrument a fn and step through it next time it's called)
I've been a long-time Emacs user, and the "aha" moment happened when I realized that Emacs really boils down to three things: 1) a text editor 2) mechanisms to interact with your system (e.g. subprocesses) and 3) interactive and dynamically programmable runtime. Once you learn the fundamentals of those three things, the sky's the limit...

Re: 'Using Emacs' Series

#67
post #17

Earlier quoted context omitted.

In my experience - buy a good mechanical keyboard, and remap Control and Caps Lock.

I don't understand how remapping Caps Lock to Control is supposed to improve things, considering that there's already a Control key in the vicinity of Caps Lock. For me the bigger problem is the right control key.

I used to basically think it was insane that people would recommend changing the layout of my keyboard in order to accommodate the inefficient default key bindings of Emacs.

However, even though I long ago stopped using Emacs, to this day I still swap Caps Lock with Ctrl because it's a much more natural position for the control key once you get used to it.

Re: 'Using Emacs' Series

#68
post #42

Hey, has any of you guys been using emacs for modern front-end development? I’ve been looking for video tutorials (or at least for demos) on this subject, but could not find anything useful and practical. How is emacs’ support of JSX? Of typescript and TSX? Of flow? Of CSS in JS? Of eslint? Does it keep up with the crazy speed frontend development is changing, or has it remained far behind (being used mostly for the…

I do all front end development in emacs, using Clojurescript. Lisp support is of course great in emacs.

I also use web-mode a lot for source files that are a mix of CSS, Js and HTML.

Re: 'Using Emacs' Series

#69
post #15

Earlier quoted context omitted.

Agreed, although it's also true that vanilla Emacs is quite spartan and has many questionable defaults. In my opinion it would be much better if plain Emacs provided a nicer user experience out of the box, thus reducing the need for customisation and external packages which is a big barrier to entry for new users.

http://spacemacs.org/ solves this exact problem. It's a set of packages, with consistent UX.

Once you find what you like about spacemacs, it is usually better to start with a raw configuration and add those things that you found and remove everything else. You end up with a much faster and lighter editor.

Re: 'Using Emacs' Series

#70
post #15

Earlier quoted context omitted.

Agreed, although it's also true that vanilla Emacs is quite spartan and has many questionable defaults. In my opinion it would be much better if plain Emacs provided a nicer user experience out of the box, thus reducing the need for customisation and external packages which is a big barrier to entry for new users.

Do you have a good set of basic customisations that anyone using Emacs should do?

I think ido mode in the mini buffer is a requirement for smooth emacs use. And of course, installing any editing modes for particular program languages that you use.
Post reply on HN