Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
Why should you be fucked?
I'm retarded.
i personally use neovim not because some gay bullshit like "blazingly fast" or "very configurable" but because i dont want to move my hand between my mouse and my keyboard so often
I don't want to type things when I'm programming, I just want to change the symbols, can Neovim (or emacs) do that? Like paredit but extra autistic.
 
Most, if not all programming languages are regular grammars, right? Outside of variables, there's a fixed amount of symbols you can type at any juncture. I want to type, for example 'c', and have 'const' pop up intelligently, because that's the only symbol that can appear at that particular place in code.

I don't know if such a feature exists, but if I have to code it myself so be it.
 
I want to type, for example 'c', and have 'const' pop up intelligently
So autocomplete?

I don't use any such thing because I want the machine to respond only to what I actually type. But some people do use it, I think this may be kinda sorta what you are looking for? Never used it personally, so not sure. Anyways, the plugin system should allow for a pretty easy install.
 
Most, if not all programming languages are regular grammars, right? Outside of variables, there's a fixed amount of symbols you can type at any juncture. I want to type, for example 'c', and have 'const' pop up intelligently, because that's the only symbol that can appear at that particular place in code.

I don't know if such a feature exists, but if I have to code it myself so be it.
both emacs and neovim may have something like shortcuts but its not syntax aware

maybe you can code something up using the treesitter integration

both emacs and vim have support for lsps too
 
Both Emacs and Vim support auto complete. Imo when it comes to Emacs corfu is the best implementation. Emacs C-mode supports syntax suggestions by default however if you want more advanced ones there is always eglot(now build in) for LSP support. As for VIM idk as i do not use GNU/Haram software.
 
The biggest reason that vim is so popular is that MacOS ships with it
 
I intend to continue to Emacs for certain purposes like Magit and OCaml in the future but will use Neovim for everything else.
Why not just use emacs with evil mode? You get the best of both worlds and don't have to jump back and forth between editors.
Contrary to popular belief, you don't have to pick one or the other.
 
from what i understand the cwd is whatever is the location of the current buffer or whatever they call it in emacs land
Emacs has the buffer-local variable default-directory and you can view and change it with M-x pwd and M-x cd, respectively.
So autocomplete?

I don't use any such thing because I want the machine to respond only to what I actually type. But some people do use it, I think this may be kinda sorta what you are looking for? Never used it personally, so not sure. Anyways, the plugin system should allow for a pretty easy install.
YouCompleteMe only supports a few major languages and is surprisingly kinda bloated for that. I did use YouCompleteMe but switched to vim-lsp. The way servers are registered is a little opaque but vim-lsp-settings lets you rock and roll with a fairly decent number of languages and not have to worry about any other configuration but :LspInstallServer. Of course I'd rather be using Neovim anyway.
Both Emacs and Vim support auto complete. Imo when it comes to Emacs corfu is the best implementation. Emacs C-mode supports syntax suggestions by default however if you want more advanced ones there is always eglot(now build in) for LSP support. As for VIM idk as i do not use GNU/Haram software.
I currently use company. Should I switch?
Why not just use emacs with evil mode? You get the best of both worlds and don't have to jump back and forth between editors.
Contrary to popular belief, you don't have to pick one or the other.
We talked about this before. Setting up Emacs to use evil consistently has to be done on a case-by-case basis and, with Emacs being as complex as it is, there's no way all of these cases can be covered. I want to read documentation for any Emacs feature or plugin I come across and immediately be able to apply that documentation without having to extensively look up how I need to translate it to evil mode, assuming evil covers it. A side benefit is that knowing two keyboard-driven editing paradigms will keep me on my toes mentally.
 
I currently use company. Should I switch?
The only major difference is that corfu is more integrated with Emacs internals as it uses them for auto-completion instead of it's own implementation as company does. Usage wise there is no major difference in fact there is company-capf which makes corfu use company backend. I like it more because you can use things like orderless to modify how it auto-completes.
 
The only major difference is that corfu is more integrated with Emacs internals as it uses them for auto-completion instead of it's own implementation as company does. Usage wise there is no major difference in fact there is company-capf which makes corfu use company backend. I like it more because you can use things like orderless to modify how it auto-completes.
I see. I try to figure out It Just Werks™ solutions as much as possible (which Emacs unfortunately tends to militate against). Even so, right now company Just Werks™—indeed ChatGPT suggests it's overall better "out of the box"—and I'll continue using it until such time as it ever becomes deprecated. I'm glad you mentioned eglot as it also seems to be more on the side of It Just Werks™ than lsp-mode. For OCaml I would only have to do a little more configuration. (On the other hand I had limited success with either and Java.)
 
Last edited:
writing high level abstractions is cool because i can just write a bunch of pseudocode and never actually write the code the abstractions are abstracting and pretend it'll just work somehow eventually

your car is missing an engine? that's fine, just describe the shape of the hole the engine should go into with increasing specificity, it'll figure itself out eventually and if it doesn't you probably just haven't said enough about the engine hole yet
 
writing high level abstractions is cool because i can just write a bunch of pseudocode and never actually write the code the abstractions are abstracting and pretend it'll just work somehow eventually

your car is missing an engine? that's fine, just describe the shape of the hole the engine should go into with increasing specificity, it'll figure itself out eventually and if it doesn't you probably just haven't said enough about the engine hole yet
Code:
Beware of bugs in the above code; I have only proved it correct, not tried it.
                -- Donald Knuth
 
The main difference between emacs and vim used to be, do you want to configure and extend your editor in a ridiculous language called Lisp, or with an even more ridiculous language called vimscript.

Now the only real difference is, when you have to command the editor, do you want to stretch your fingers to press three keys at the same time (emacs) or press three keys in sequence (vim/nvim/whatevervim)
 
Now the only real difference is, when you have to command the editor, do you want to stretch your fingers to press three keys at the same time (emacs) or press three keys in sequence (vim/nvim/whatevervim)
I'm a relatively light user of keybindings compared to some others but you have considerable leeway with Vim to bind/rebind things and ostensibly even more with Emacs.
 
I'm a relatively light user of keybindings compared to some others but you have considerable leeway with Vim to bind/rebind things and ostensibly even more with Emacs.
Everything in emacs is a lisp function which you can rewrite on the fly to do literally whatever else you want. The original vim isn't quite so flexible, but neovim's API is so broad you can pretty much turn your neovim into a NES emulator and program the plugin in Javascript if you want.

This is historical and irrelevant, but it used to be a significant difference that the keybindings of emacs relied on ctrl, alt and shift combinations. Because on an ancient tty there is no such thing as shift+space, for example. And sending modifier keys via different terminal emulators and SSH used to be very janky back in the day. Vim keybindings being 99% just a sequence of normal keys was a clear advantage if you worked with many terminals connecting to many servers.
 
Back
Top Bottom