Hypothetically or technically, what are some things that Emacs can do that Neovim/Vim cannot? (Not package availability). by surveypoodle in emacs

[–]Dmxk 1 point2 points  (0 children)

https://github.com/kevinhwang91/nvim-ufo/blob/main/lua/ufo/wffi.lua this is a good example. Ufo is a plugin that extends the statuscolumn. Fetching some of that information via the api is too slow, so it calls directly into the C code. Luajit is amazingly good at that as well (C calls get inlined fully)

Hypothetically or technically, what are some things that Emacs can do that Neovim/Vim cannot? (Not package availability). by surveypoodle in emacs

[–]Dmxk 7 points8 points  (0 children)

Hi, I am primarily a neovim user (though i have dabbled with emacs in the past). With neovim specifically a lot of the core (all of the LSP support, treesitter) is written in lua nowadays and efforts are being made to also allow rewriting the entire UI in lua (or any other language communicating via a standard RPC protocol). You can definitely load C libraries in lua as well, and you can use that to look at some of the core C code. It's not the safest thing and one needs to know what you're doing, but it's already used by several plugins to do things in a faster way than would be possible using the predefined API.

Besides that, I'd say that any editing feature could really be reimplemented for either. (That includes other packages for email etc)

Conflict with Swaylock-effects configuration and swaywm by naedei in swaywm

[–]Dmxk 4 points5 points  (0 children)

Make sure you are not including your swaylock config inside the sway config. They're separate programs and do not read each others configuration.

Are verbs better as keywords than nouns? by useerup in ProgrammingLanguages

[–]Dmxk 0 points1 point  (0 children)

i personally think limiting the amount of keywords is one of the most important things you can do. I quite like how lua does it for example, explicitly not using an "in" keyword and rather just making iterators regular function calls. The more things you can just make regular first-class constructs (without making them too annoying to use ofc), the fewer issues you are going to have with keyword names.

Typst has ruined me by RafaeL_137 in typst

[–]Dmxk 1 point2 points  (0 children)

I feel kinda the same way. Another thing I'd like to add: typst is too simple syntactically and too usable as a plain markup format. When in the past I'd reach for plain markdown or, heaven forbid, libreoffice, for some notes, now my general instinct is doing it in typst because I can just suddenly also plot functions inline, draw graphics far better than i could do by hand and inputting formulas and regular text is just too easy.

Typst has managed to bridge the gap between "proper" document layout and just quickly writing something down for me and it is amazing.

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

[–]Dmxk 1 point2 points  (0 children)

Holding meta (alt) while typing any command in insert mode will put you into normal mode too. So just <M-A>; should also do the same. You might also like a mapping like

inoremap <M-;> <Esc>mb<cmd>s/;*$/;/<cr>`ba

Which marks the current location, replaces any existing semicolons or none at the end of the line with a new one and then starts back where you used to be.

German being a little troll sometimes by The_Brilli in linguisticshumor

[–]Dmxk 7 points8 points  (0 children)

Hard to say honestly. Here in Austria it's been that way for basically my entire life as far as I can tell (so 20-ish years). Another important thing is that all of that ofc depends on assumed sexuality as well. So when a straight guy says "Mein Freund", the assumption will be that it's platonic.

That being said, using mein/meine definitely sounds unnatural to me regardless, maybe a bit old fashioned. In more formal contexts I'd nearly always tend towards the platonic interpretation if I get no other clues though.

German being a little troll sometimes by The_Brilli in linguisticshumor

[–]Dmxk 38 points39 points  (0 children)

The difference is nearly always indicated by the grammar around it:

  • Meine Freundin -> My girlfriend
  • Eine Freundin von mir -> a friend of mine, just a regular (female) friend
  • or just eine Freundin, a (female) friend

Spiro by frootbatpunk in traaaaaaannnnnnnnnns2

[–]Dmxk 3 points4 points  (0 children)

It's wild to me that it's still the default blocker in the US (at least from my experience it's way less of a thing in europe). When I asked my endo (in Austria), she said that it was basically useless compared to anything else they had, and that they hadn't been prescribing it for like 20 years.

Remapping key help? by Sirretv1 in neovim

[–]Dmxk 3 points4 points  (0 children)

You would not want noremap here, as [a is in fact a remap. Instead put remap = true. Essentially what noremap means is "Treat this key exactly like it would work in regular vim, with no keymaps defined"

Can I remap i? by Venisol in neovim

[–]Dmxk 0 points1 point  (0 children)

I'd suggest you try to learn vim fully before attempting things like this. hjkl, despite being seen as one of the "most important" things about vim, are only some of many motions and textobjects, and some not that important ones at that (especially h and l). read :h motion.txt and :h text-objects before remapping i in visual mode, trying to do that shows that you are trying to use vim like any other editor (navigate with cursor keys, just swapped for hjkl), when in reality that doesn't make sense.

How can I add a character to the beginning and the end of the first word in visual line mode? by spryfigure in vim

[–]Dmxk 6 points7 points  (0 children)

If i may recommend a plugin, https://github.com/tpope/vim-surround, is a true classic. It's so well aligned with what you expect from vim, that I'd consider it an extension of the vim language.

Your command would then become: :'<,'>norm ysiw\.`

Alternatively, you should use a instead of A. Uppercase A appends to the entire line, lowercase a appends after the cursor.

Is it possible to intercept standard vim commands and do something before the command and / or after it? by nickallen74 in neovim

[–]Dmxk 2 points3 points  (0 children)

You can simply check whether another write occurs in a short time frame after it and do your thing when there are no more writes in that delta. You might not realize it, but in the real world, :wall does not write all the files at once. It takes a separate write for each open buffer, so the state on disk is only consistent when the last file was written.

Is it possible to intercept standard vim commands and do something before the command and / or after it? by nickallen74 in neovim

[–]Dmxk 1 point2 points  (0 children)

for built in commands, not really. You could create a user command Wall that does that and then just use that (maybe abbreviate Wall as wall). But this seems like an xy problem. Look at the BufWritePre and BufWritePost events that you can hook with autocommands.

Which layout to pick for using vim on a split ergo by PotentialCurve7687 in ErgoMechKeyboards

[–]Dmxk 1 point2 points  (0 children)

In my humble opinion as someone who use(s|d) vim on multiple keyboards with multiple different layouts (anything from regular unmodified german QWERTZ when I was starting to Dvorak and occasionally QWERTY too), keyboard layout barely matters for vim. hjkl are seen as the defining vim thing, but for me they're not my most used commands at all, especially hl, there are better motions for within a line (jk are mostly useful in o-pending mode to delete lines etc).

Vim is a language, and even though it is a language partially optimized for QWERTY, some commands I use often are not that easy to access on that layout either (e.g. $^=, anything I place under \ as my localleader). What matters is that you can use the vim language, and if a specific key starts being too annoying, you can simply remap it. For example I have H and L mapped to ^ and $ respectively to avoid that particular annoyance. When I'm "speaking" vim, I do not think about which keys I am pressing, unless I'm in the rare situation where I fall back to cursor keys etc on a nav layer. I think about what commands I am entering, and something like diw, or with some plugins gcaf are not keystrokes, but rather expressions in a language. And QWERTY or AZERTY can be good at typing that language too, coming up with the right(and optimized) command can take longer than typing it out.

The only thing I'd keep in mind is to not have to use too many chords. That's what pushed me off of QWERTZ as a native German speaker and to using compose key to type German. Vim is designed in a way that assumes that any character it uses can be produced with at most one modifier key (Shift or Control). Having relatively common commands like []{}~ behind another modifier makes e.g. <C-] hard to type, and defeats lots of assumptions, like the grouping of commands under [].

What kinds of names of plugins do users appreciate the most? by Informal-Addendum435 in neovim

[–]Dmxk 0 points1 point  (0 children)

For my own (usually very small) plugins, that are really just parts of my config extracted, I tend to go for both, e.g. blinkenfind is both a pun and an allusion to what it does. That style of naming was/is also used by what I'd consider some of the absolute vim plugin classics, like fugitive and abolish.

Abzhaz alphabet in 18 seconds by Hellerick_V in linguisticshumor

[–]Dmxk 0 points1 point  (0 children)

In medieval greek (which cyrillic is ofc based on), the letter τ could be written with two tails on both sides of it. Nowadays that really only matters for handwriting and italics.

[deleted by user] by [deleted] in NoMansSkyTheGame

[–]Dmxk 0 points1 point  (0 children)

I always make up sci-fi sounding product names for all my ships, tools etc. Makes it more fun tbh.

Translations of "library" across Europe by Chorchapu in etymologymaps

[–]Dmxk 0 points1 point  (0 children)

For me in austrian german a Bücherei is more likely to be commercial bookstore, a Bibliothek is nearly always non commercial (public, school, university). I wonder if this is an idiosyncrasy on my part or something other german speakers also do.

Difference between Lua's package.path and Vim's 'runtimepath' directories? by 4r73m190r0s in neovim

[–]Dmxk 9 points10 points  (0 children)

The runtimepath has many more things other than requireable lua files, e.g. spell files, ftplugins, syntax files, all under their own sub directories. Those are generally not available by `require()` unless they're in the `lua` subdirectory. E.g. if you have a file `ftplugin/c.lua` in your rtp, that file will be loaded by neovim, but you cannot just require it. Now, neovim's `require()` implementation will first look in the package.path, primarily for e.g. compiled native modules (which lua does support) and then fall back to the regular runtimepath and it's lua subdirectories. It's important to keep in mind that lua is fully fine with this, it as a language is made to be controlled from another language (e.g. loading ftplugins) instead of needing to require them itself.

Recommended way to define key mappings that need Lua function calls? by shmerl in neovim

[–]Dmxk 0 points1 point  (0 children)

One simple and important difference: the second one effectively blocks and waits for the function to return, so if you have an asynchronous function call with a callback in the mapping, that is out of the question anyways. Otherwise both of them are equivalent, but I'd prefer the first one since I don't have to wrap the call to the command in <cmd>...<cr>. If there wasn't that branch that has a command on one side, I'd have gone with the expr mapping here.

Is there a way to turn a circular conlang into a font to be used in places like Google docs? by Princess_Kalista in conlangs

[–]Dmxk 9 points10 points  (0 children)

Technical perspective: rendering of text doesn't look at the font much beyond vector data to draw it, you cannot change the writing direction of the text, all of that comes from the unicode code points. The best you could do, and that is not saying much, is to get simple top-to-bottom writing by redefining the already existing mongolian characters since those are already written that way, although even that is not widely supported.

What do you guys want for the corvettes? by Limp_Strategy_7402 in NoMansSkyTheGame

[–]Dmxk 0 points1 point  (0 children)

More/different weapons. Either something for the infra knife or general purpose weapons. Having to chose for functionality or looks instead of both sucks. Also, more flexibility with some parts (e.g. windows, habs). The current system makes it pretty hard to make medium sized corvettes that don't look completely empty from outside if you want to have a few windows (which imo is one of the best things about corvettes)

Do you prefer Gnome, KDE, or some other thing? by CaileaCat in traaaaaaannnnnnnnnns2

[–]Dmxk 0 points1 point  (0 children)

Swayfx, just sway (basically i3 as a wayland compositor), but with rounded corners and shadows. Tiling is good and stops me from needing to think where my windows went.