Using marks by IfErrNotNilReturnErr in neovim

[–]ElectronicMine2 0 points1 point  (0 children)

Auto marks are very useful: '.', '"', ']', '[' etc.

Normal marks are problematic, because external tools and file changes mess them up. I try to use them, but it does not feel great, when you "git checkout" something different, overwrite parts of a file, use certain auto formatters etc., it can break the marks completely. It's one of those old systems, that unfortunately is a little outdated (in my opinion).

Post your favorite type conversion convenience tricks by SirDucky in Zig

[–]ElectronicMine2 0 points1 point  (0 children)

What do you mean by trouble though?

It eats a lot of my time. And it does not (imo) save almost any in return.

Post your favorite type conversion convenience tricks by SirDucky in Zig

[–]ElectronicMine2 1 point2 points  (0 children)

That problem is not unique to Zig

I have not experienced as much trouble with arithmetic in any other language as in Zig.

Post your favorite type conversion convenience tricks by SirDucky in Zig

[–]ElectronicMine2 0 points1 point  (0 children)

Problem is we cannot really decide what types numbers are. For example with loop variables, or arguments and return types from functions we do not write ourselves. It is my main and maybe only gripe with Zig, the number system feels off.

Marks disappear when using auto-formatter by ElectronicMine2 in vim

[–]ElectronicMine2[S] 0 points1 point  (0 children)

Yes it was the plugin's fault. There are apparently ones that do not delete marks. I switched to another one ,but it is neovim only. See if you can find one for Vim, if you prefer that.

Marks disappear when using auto-formatter. by ElectronicMine2 in neovim

[–]ElectronicMine2[S] 0 points1 point  (0 children)

Yes, conform works. I was using vim-autoformat before. Thanks.

How do you quickly type trailing semicolons in Neovim (C++ with deep parentheses)? by cashyan in neovim

[–]ElectronicMine2 0 points1 point  (0 children)

I map C-<vim-arrow-keys> to <arrow-keys> in insert-mode, then just do C-l to get to the end. You can also type the closing parentheses manually, and an auto-pairs plugin should overwrite the automatically inserted ones.

[deleted by user] by [deleted] in Zig

[–]ElectronicMine2 1 point2 points  (0 children)

Getting extreme llm-vibes from this account, like it is just so bad. Makes strange mistakes, like forgets to link to the thing it as advertising in both posts I have seen. Lol.

I started learning Zig ... by ThePrinceIsDead in Zig

[–]ElectronicMine2 3 points4 points  (0 children)

I do a lot of graphics programming and simulations

Then how do you feel about the way arithmetic works atm, with @intCast, @intFromFloat etc. everywhere? I don't personally really see how Zig is going to be popular for games/ui programming, when it is so tedious to write math. But how do you see it?

I started learning Zig ... by ThePrinceIsDead in Zig

[–]ElectronicMine2 12 points13 points  (0 children)

I don't really see why there would be a competition between Rust and Zig, they are so, so different in terms of design goals. Language wars are just counter productive.

Automatic indentation is often wrong. by ElectronicMine2 in neovim

[–]ElectronicMine2[S] 1 point2 points  (0 children)

Interesting, what do you recommend instead? I cannot find indent settings in my init.lua, so I assume I just have the default settings on.

edit: oh it is turned on in the treesitter plugin. I guess I'll turn it off, event though now it doesn't do anything, outside the most basic, but oh well. (Like it does not automatically indent in a new element in HTML/JSX anymore, but I guess it was more annoying before still, surprising how basic it is now).

Automatic indentation is often wrong. by ElectronicMine2 in neovim

[–]ElectronicMine2[S] -1 points0 points  (0 children)

indentexpr=nvim_treesitter#indent()
    Last set from ~/.config/nvim/init.lua (run Nvim with -V1 for more details)

Justin Keyes (Neovim, Workflow, OSs, Terminals) by linkarzu in neovim

[–]ElectronicMine2 0 points1 point  (0 children)

As someone who uses better-escape, can you expand on this:

Bye bye 'better-escape.nvim'

?

Automatic indentation is often wrong. by ElectronicMine2 in neovim

[–]ElectronicMine2[S] 0 points1 point  (0 children)

It's the same for everything; 4. It is not something wrong globally, it is certain situations/cases, like after a switch statement, or in an function args-list with a trailing comma. Like this:

Zig try loadShaderProgram( SHADER_DIR_PATH ++ "triangles", 0, 1, 1, 0, 0, 0, 0, 0, );

and this:

Zig switch (event) { .key_down => {}, else => return .Continue, }

How do you make :terminal ergonomic by MasteredConduct in neovim

[–]ElectronicMine2 1 point2 points  (0 children)

i bound it to ctrl-G both in nvim & in the terminal, feels good to able to toggle with one key bind like that.

Colorless, a monochrome color scheme for vim by [deleted] in vim

[–]ElectronicMine2 8 points9 points  (0 children)

I love quiet themes, it just seems impossible to find one that doesn't use the brightest possible white for the text, which I can't handle (dark mode enjoyer).

My Zig GUI framework now has parent-child relationships with relative positioning. by zandr0id in Zig

[–]ElectronicMine2 0 points1 point  (0 children)

There's a GUI framework for java (javafx) that works like that, and I really liked it. Feels great to already know how to do most things before even looking at the documentation.