💾 Archived View for bbs.geminispace.org › s › vim captured on 2023-09-08 at 15:58:32. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-07-22)
-=-=-=-=-=-=-
After decades of using random editors and emacs I've switched to vim. So why not have a place to share a tip or bitch about weird things vim does (or fails to do)? Put short tips and discoveries under TIPS topic; for anything that warrants its own discussion, please start a new topic.
Off by 1 character — I hate that vim is always off by a character. Let me clarify. When you exit the insert mode, the cursor backs up to the last character entered. So if you insert some text, then delete to the end of the line, vim will eat your last-inserted character unless you move over one. Annoying, right? Or, say you repeatedly enter insert mode then exit back to command line. That is a no-op, right? Wrong: your cursor will move left one character. That seems kind of idiotic. Does...
💬 12 comments · 1 like · 2023-09-04 · 4 days ago
Which config/plugins do you use for writing Gemtext? — I'm not really sure about, the only thing I set so far is that the text should wrap on the terminal border, but I want to set it to wrap at column 80. I don't know how you edit your gemtext files, are there any plugins, syntax highlighters or the like? Or is there even a dedicated editor for gemtext? Pls let me kno!
💬 4 comments · 2023-08-14 · 4 weeks ago
I want to have completion for my custom C language headers, but I cannot see how to add it. I use CoC and it does help with the language headers, but not the ones in my project folder. How can I add them?
💬 9 comments · 2023-08-07 · 5 weeks ago
The author and maintainer of Vim, Bram Molenaar, passed away today. Thank you, Bram, for such a wonderful program that has stood the test of time. :wq
💬 6 comments · 2023-08-05 · 5 weeks ago
Quitting VIM — Nothing new, but a quick review: [preformatted]
💬 1 comment · 3 likes · 2023-07-16 · 8 weeks ago
A long time ago I had the idea of changing vim keybinds such that each operation would have its dual as capital. most operations such as fF do this already. I wanted to do it for everything including movement. In the end it was too non standard given any reduction in complexity, didn't work for special characters, and it was unclear what dual meant (e.g. iI vs oO vs aA).
💬 1 like · 2023-07-08 · 2 months ago
I wrote a plugin to use vim as a smallnet client frontend. You need a backend that formats things ok for it. Lynx works if you want web/gopher. I wrote a backend that supports gemini as well (and supports 10 gemini and 7 gopher types for input). It works pretty well so far. [https link] Plugin [https link] Custom Backend From the plugin folder run `make` and you are all set. The backend requires a go compiler (the plugin defaults to using lynx). For info on customization, get help in vim: [...
💬 1 like · 2023-07-07 · 2 months ago
Editing Near-ASCII Binary Files — I am experimenting with a near-ASCII file format containing text messages and binary markers (high bit set). Vim is surprisingly useful: it will display files in a reasonable-for-debugging way by displaying hex values for high characters. It preserves these during editing, and will even allow you to enter non-ascii characters: In Insert mode, [preformatted] will insert 0xAB. o will similarly take 3 octal digits. Just numbers for decimal digits.
💬 1 comment · 1 like · 2023-07-07 · 2 months ago
Configuration tricks, tips, etc.
💬 8 comments · 2023-07-04 · 2 months ago
What is the best way to write a plugin in Lua and C? — I wrote a plugin to use Vim as a hex editor. As there is quite a bit of computation to do I prefered not to do them in Vimscript. As the hex editor will manipulate arbitrary data and not text, Lua seemed a better choice than Python as the strings don't need to contain only Unicode characters. As some functions do heavy computation, I wrote them in C for the very substantial speed boost. Unfortunately, compiling the C librairy is not...
💬 3 comments · 2023-07-02 · 2 months ago
TIPS — [http link] [https link] [https link]
💬 6 comments · 2023-07-01 · 2 months ago