top | item 35558433

(no title)

circuit | 2 years ago

I had a similar experience, but came to the opposite conclusion. I walked away replacing vim with emacs as my daily driver. Elisp is far more extensible than vimscript and evil-mode is pretty much at 1-1 feature parity with the real vim. I don't care much for the emacs movement keybindings except for the readline movement commands.

> to this day I still don't see what the hype was about.

Most of vim is written in C with some interfaces exposed for scripting. Emacs is mostly written in elisp with some C code where necessary. The latter lends itself better to 'hackability' imo

For my own machines, I build emacs and import my saved init.el

On other machines, there is usually a standard vi/vim install that I can use if I am ssh'd in somewhere where I don't have my personalized copy of emacs. If I remember, I'll try to put these five lines[1] in the .vimrc for some saner defaults

[1] https://news.ycombinator.com/item?id=25410390

discuss

order

outworlder|2 years ago

Why don't you SSH _from_ Emacs?

If you are editing a remote file there's usually no need to SSH and then invoke an editor.

https://willschenk.com/howto/2020/tramp_tricks/

circuit|2 years ago

I used to, and I probably would if I had to work with remote files more often. But in my experience I found it faster to just build emacs on the remote server and run it as a daemon there, since all the machines I was working on remotely had /home on an NFS mount. TRAMP took just a little too long to load remote directories for my liking.

But in case I am plopped in front of an unknown terminal/have to do something on someone else's machine ... at least I can rely on using the default vim to do basic editing.

kagevf|2 years ago

Is there a preferred way to do the equivalent of xref_find_definitions when using tramp?

NERD_ALERT|2 years ago

Vimscript is a pain but these days you can use Neovim which supports Lua as a replacement. I’d recommend checking out what Neovim has to offer. ThePrimeagen has a great video on setting up Neovim as an IDE from scratch.

https://m.youtube.com/watch?v=w7i4amO_zaE

rjzzleep|2 years ago

I mean it's a matter of preference, I personally find vimscript a lot more readable for vim configuration. Maybe not for more advanced stuff, I don't know, but how is the following:

vim.keymap.set("n", "K", vim.lsp.buf.hover, { buffer = buffnr, desc = "vim.lsp.buf.hover" })

vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>")

better than

nmap K :lua vim.lsp.buf.hover()<CR>

It's like the javafication of vim configuration.

pseudostem|2 years ago

Thank you. Been a vi (not vim, vi) user for decades for editing files in /etc.

Tried using vim, neovim, Emacs, mg, etc a month ago and quickly went back to pycharm which hogs resources on my ancient computer.

Have been looking for a "how-to" on various editors. This video seems to be it for neovim.

Offtopic: I'll pay you in blood for configs for fvwm