Hacker News new | past | comments | ask | show | jobs | submit login

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




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.


While I wholeheartedly agree, you don't have to sprinkle Lua everywhere, you can use both. As a matter of fact, I do[0]. And when I want to enable a setting on the fly in the editor, I still use the vimscript version. But Lua is way nicer to work with the moment you do something non trivial. For example, I've never been able to make sense out of vimscript string interpolation.

0: https://github.com/RMPR/dotfiles/blob/master/.config/nvim/in...


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: