@drj

Thank you for the review!

#viTips

One of the things which encouraged me towards less "trendy" software is that it hasn't gotten totally caught up in ai-hype. Books written before the slop-pocalypse are really useful, and turn out to be a nice way to soothe my inner nerd while I continue to learn new (to me) things.

As an example, the venerable "Unix Power Tools" has a wonderful chapter on the vi editor:

https://docstore.mik.ua/orelly/unix/upt/part05.htm

Enjoy!

#vi #viTips #nvi #text-editor #plaintext #stopSlop #noAI

[Part V] Text Editing

In vi/vim, use % to find the matching bracket over the cursor.

#ViTips #VimTips #Vim

As I continue to escape into the obscuria of elder text mangling tools, I've found myself enjoying the opportunity to act as the local #viTips fairy when I find anything interesting or useful.

And here's another cool vi trick I found!

You can append to a file rather than overwriting it by prefixing >> to the filename:

:w >>appendtofilename

This can work on parts of a buffer by prefixing line numbers or ranges:

2,+1w >>appendfilename

This appends the second and subsequent line.

#vi #nvi

@rixx yay! see also #ViTips which were for my benefit and ... uh, I've been meaning to go back and read them for over a year, apparently 

It's been months since I added to this #VITips thread, but @ed1conf just shared something I didn't know that is *very* useful when you need it.

:g/^/m0

That will reverse the order of the lines in the file you are currently editing.

If you are following my #VITips toots and your brain gets full: I have pinned the first toot in the series on my profile and and making each toot a reply to the last.

cc
-Delete the text of the current line and start typing in its place

C
-Delete from the current character to the end of the line and start typing there

R
-Start typing. Any typed text replaces what is already there on the line starting at the current character

('c' is composable and so there are many variations of it to drop into editing, but I haven't done composable things yet  )

#VITips

Just hit 'i', right? Not just that.

i
-Insert before the current character

a
-Insert after the current character

o
-Open a line below this one and start inserting there

O
-Open a line above this one and start inserting there

A
-Start adding text at the end of the current line

I
-Start adding text at the beginning of the current line
(This one can be a little weird, it does it *after* any indentation)

(More coming)

#VITips

You can specify multiple files when starting vi

vi foo bar baz

This drops you into vi editing "foo". How do you get to the other files?

:n
:next
- Go to the next file

:rew
:rewind
- Go back to the beginning of the list

Both will complain if you have unsaved changes. Add '!' to the end to force it.

When editing multiple files, vi will complain if you try to quit out without looking at all the files. Repeating the quit command will exit.

#VITips