Fork me on GitHub
#emacs
<
2021-07-23
>
Jason10:07:13

Does anyone know if there’s a way to get emacs to open with very basic functionality in order to get a quick startup time for quick terminal text editing?

Jason10:07:02

Just finding that replacing vim with emacs for this workflow is a bit jarring but ultimately would like to stick with emacs if I can

Jakub Šťastný21:07:24

It should be fast enough as long as you don't do (package-refresh-contents) in your init file. If not, use Emacs server and maybe you want to compile Emacs 28 (the development branch) with the native-compilation feature (which is on master now).

Jason14:07:06

Is the native-compilation much faster then?

Jakub Šťastný14:07:55

@U028TA3H3PA Pretty considerably. Still – network requests in the init file is what kills the performance more than anything.

lispyclouds10:07:55

ive seen a lot of people use https://github.com/troglobit/mg for this purpose, maybe that helps?

👀 3
Jason10:07:18

Yeah think it’s partially slight differences I have between vim and emacs at the moment and would be less muscle memory to just use one or the other

Jakub Šťastný21:07:13

Also EVIL is very good Vim emulator, the best one I worked with probably.

jkxyz10:07:06

You can start Emacs as a server process for this: https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html Then running emacsclient will just start a new client on the already-running server instead of launching and initialising a new server

👍 3
Jason10:07:05

ooo, that sounds like a good option

jkxyz10:07:06

Personally I also just use vim though 😉

Jason10:07:30

How do you find going between them then?

Jason10:07:10

Do you not have any issues? I know it’s mainly minor things but I just value consistency

jkxyz11:07:07

I very rarely use vim for anything more than quickly editing shell scripts when I’m already in a shell, or for viewing and searching through large log files (which Emacs seems to struggle with). It hasn’t annoyed me enough to want to setup an Emacs server process

Jason11:07:30

Ah fair enough, with regard to the project searching have you tried ripgrep? I’ve heard it’s much faster but haven’t tried it myself

jkxyz11:07:37

You could also use nano which is a bit more Emacs-y

jkxyz11:07:54

Yeah I use ripgrep for project search in Emacs. But when I have a single large log file I don’t want to open it in an Emacs buffer, so I just switch to a shell and open it in vim to search through

Jason11:07:10

Yeah that makes sense

jkxyz11:07:57

I’m sure that Emacs is better at handling large files than I give it credit for but I’ve just had it crash too many times, and it happens rarely enough, that I find it easier to just use vim temporarily. There is a mode for tailing log files into a buffer

practicalli-johnny11:07:42

Opening in fundamental mode will be a lot faster and better at handling large files, but vim is probably better at this aspect at the moment

jkxyz11:07:16

Is there a built-in function to open a file with only fundamental-mode?

jkxyz11:07:24

Maybe opening read-only and calling fundamental-mode is the way to go. I will try it the next time I need to look at a big file 🙂

practicalli-johnny21:07:32

There is https://www.emacswiki.org/emacs/LongLines mode Using Spacemacs, it also warns about opening big files and can be set to open files over a certain size in a specific mode, i.e fundamental

Jason11:07:49

Think if I can’t use emacs vim would be the way to go for me. I’m only just coming to emacs after a long time with vim so pretty comfortable with it

lukasz15:07:31

I use zile for very quick edits: it has emacs-like keybindings and... nothing else

lukasz15:07:54

but +1 on emacs-server if it's for local workflow

grazfather16:07:26

+1 on using vim for those use cases

gammarray17:07:29

There’s also the option of never leaving Emacs: EXWM.

Jason19:07:51

For a beginner in emacs.. might take me a while to get there 😅

Jason19:07:10

Yeah I’m on doom, figured it was easier to start with doom and strip back when I start to get comfortable and definitely seems to be working out

Jason20:07:21

Makes sense, did you use emacs for something other than clojure? I imagine I’ll use it much more for other development more than clojure initially

Jason20:07:54

Yeah I’m currently using it for ruby

Jason20:07:33

Yeah I wonder how far down the rabbit hole I’ll go

Jason20:07:46

Whether I’ll try to live inside the bubble or not

Jason20:07:03

It definitely looks tempting

Jason20:07:45

Aww don’t say that 😅

Jason20:07:55

The dream is to only have to use one!

Jason20:07:15

But in reality yeah I can see that’s always going to be the case

Jason20:07:48

Yeah that’s an interesting perspective. I figure if anything is going to come close to replace all other editor for me it’s emacs. Just to do it will require a lot of investment..

Jason20:07:30

Especially since my day job is an iOS developer

Jason20:07:58

Xcode is so behind the curve compared to other editors

Jason20:07:27

Yeah last few major releases haven’t been great

Jason20:07:02

Yeah it does, I tried it long ago but there’s always something that brings you back to Xcode

Jason20:07:15

Especially when you work in a team

Jason20:07:27

No such thing right? aha Once you think you find it, what you do day to day changes

Jason20:07:38

But yeah I’ll have fun with it either way

Jason20:07:50

Yeah wouldn’t want to fall off the tightrope of development to my death 😱

nyantocat 3