Blog: 2023-07-20

From razwiki
Jump to navigation Jump to search

Sort bug is known, I guess:

I was seeing it on lines like:

tnoremap <C-@>[ <C-@>N
tnoremap <C-[> <C-@>N
tnoremap <C-@>" <C-@>:terminal<cr>

where that was the sorted order. Weird... I'd expect from left to right to have the [ before or after the @, not between them...

Sigh... I'd like to be able to open vim with vim +help <topic> then have vim exit when I'm done. Instead it goes to the empty buffer like at the start of vim with no arguments. This is really turning into quite the yak shaving

That itself is just to help me figure out why vim is triggering visual mode when I press M-v in a nested vim session. I'd like to be able to paste in vim terminal.

Ok I'm sorta finding progress on the m-v. But now the swapfile issue is front and center once again. Why is it that only vim has such trouble with swapfiles? I should just turn em off.

Just now I discovered this terminal emulator st, but it runs on x and I'm trying to get that out of my config so it's a no-go for now. Though it does claim the suckless tag.

Also reminded of the Kakaoune editor, looks like vim with multiple cursors: - reminded of it by this other editor

But I think I'm going to just switch back to emacs, with my new knowledge of terminal window management done by an editor terminal emulator.

I keep seeing tree-sitter all over the place, looks cool but maybe so low level it just works and I don't need to learn it. All this great software for free, wow!

Making a vim plugin out of

You can install from a sourcehut repo as a tar.gz if you publish a tag. cool. Did this for headlessvim, which doesn't work with the latest 3.11 python any more.

Ok I got a lot of vim stuff working, glad to say. Don't have the drop-in-current-window functionality yet, but opening a file in a new tab and pasting into vim terminal both work.

First I had to turn off the alacritty paste. Then it turned out all that was going wrong was it was sending <esc>v instead of M-v (which I sorta tried to fix using a previous answer on Stackoverflow). The final fix was:

tnoremap <esc>v <C-@>"+

Along the way I learned how to make vim really verbose:

and a step towards a vim desribe-key: an answer recommended remapping a key by typing


and then C-q then the key you want. In my case the familiar ^[v popped up, which gave the the info I needed: it was coming through as escape.

So just to play along, I did as they instructed and got

:tnoremap ^]v

which now shows my command: <Nul>"+. Unfortunately at no point did it show "visual mode" command, whatever that is. Maybe it just discarded the escape and went for v, visual mode. I guess you can read about default keybindings with :index.

Still want to get vim terminal mouse scrolling working. The plugin I copied from a github comment was busy spinning or whatever it's called when it puts your cpu at 100%. Spinlock

Also I was reminded of this great paragraph from the blender wiki article:

> In February 2002, it was clear that the company behind Blender, NaN, could not survive and would close its doors in March. Nevertheless, they put out one more release, Blender 2.25. As a sort of Easter egg and last personal tag, the artists and developers decided to add a 3D model of a chimpanzee head (called a "monkey" in the software). It was created by Willem-Paul van Overbruggen (SLiD3), who named it Suzanne after the orangutan in the Kevin Smith film Jay and Silent Bob Strike Back.

Still think there's more to be gleaned from