Alec  🇦🇺 👨‍💻

@alecthegeek@mstdn.social
312 Followers
372 Following
1.6K Posts

Old school software geek, atheist, and sexagenarian (because I'm sexy?).

Sometimes uses naughty words.

Be excellent to each other!
======================

Interested in #DevRel, #Docker, #Linux, #Python, #Go, Programming Tech, Tech education, #DocsAsCode, and #Stoicism. Currently learning how to integrate #Obsidian into my workflows.

Location: Bunurong Land, Melbourne, Australia

Pronouns: he/him (https://pronoun.is/he)

Contact details on my vanity site, no time wasters please!

Personal Sitehttps://alecthegeek.gitlab.io/
LinkedInhttps://www.linkedin.com/in/alecclews/
GitLabhttps://gitlab.com/alecthegeek
GPGhttps://keyoxide.org/hkp/BF8AE8CC9DA3C1E3C5BD0CDD3FE7B98F9BBBFC7C

I you plan to attend my workshop on the #ValeTextLinter at #EverythingOpen 2025 please make sure you have Vale installed, Git would be very useful as well.

The examples have been tested with Vale 3.9

https://2025.everythingopen.au/schedule/presentation/63/

#eo2025 #EverythingOpen

Everything Open 2025 | Presentation: Upgrade your Docs-As-Code Foo with the Vale Text Linter

Everything Open 2025 - January 20-22 2025, Adelaide, SA, Australia

I'm presenting another "Staying Safe Online" course at the local community centre next year. If anyone knows a senior living in the area who would benefit they would be very welcome. Booking details on the poster and in the alt text
This is too close to the truth

Or as I call them "Wankers"

It's worth zooming in on the plaques around the door for maximum woo affect.

Today's #Neovim stroke #Vim tip is for me!

I learned Vi back in the day and never bothered tro grok Visual mode in Vim.

This is probably a mistake, especially when you demonstrate code in your editor. Visual highlighting can make it more obvious what you are doing.

Here is a place to start if you are new to Visual mode.

https://opensource.com/article/19/2/getting-started-vim-visual-mode

I'm sure all the #Neovim hipsters will think me rather silly for still editing like it's 1985

Getting started with Vim visual mode

Visual mode makes it easier to highlight and manipulate text in Vim.

Opensource.com

So

https://youtu.be/XvRQDsH0Yho?si=aRTtHG6TplOrgxFd

But yet here I am

PS this Chelsea on the Melbourne bay, not some overpriced London suburb

Just discovered GNU stow (https://www.gnu.org/software/stow/) to manage my dotfiles

Good intro video here

https://www.gnu.org/software/stow/

More detailed explanation here (read this before you do anything)

https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html

Not only do I now manage my dotfiles, but also my personal scripts directory.

Stow - GNU Project - Free Software Foundation

PSA follow up.

So my small business is now up and running. Probably not of much interest here as it's focused on the Mornington Peninsula Shire where I live.

I am providing an IT consulting business for domestic customers with limited IT skills or experience. Hoping to improve their quality of life in a small way.

http://alecthegeek.tech.

(image created on https://imgflip.com/)

Alec the Geek Technology

Alec the Geek Technolgy – a local consulting business

Alec the Geek Technology

In other news my AWK skills are really really rusty.

Back in the 80's I was a wiz ...

(and I am guessing a lot of you weren't even born then...)

Need to write an #AWK script (because sometimes #sed is not enough) and discovered my AWK book has been lost.

I wondered who borrowed it and never returned it....

×

Today's #Neovim stroke #Vim tip is for me!

I learned Vi back in the day and never bothered tro grok Visual mode in Vim.

This is probably a mistake, especially when you demonstrate code in your editor. Visual highlighting can make it more obvious what you are doing.

Here is a place to start if you are new to Visual mode.

https://opensource.com/article/19/2/getting-started-vim-visual-mode

I'm sure all the #Neovim hipsters will think me rather silly for still editing like it's 1985

Today's #Neovim / #Vim tip of the day is a bit wacky!

Learn Sed. (the stream editor).
========

Use Sed when you need to edit file inside a script.

Much easier than trying to script with Vim, and easier to install in a CI/CD container. Also smaller and faster than using AWK, Perl, etc

You can use in a pipeline, or edit a file in place (see the -i option).

Bonus tip: On a Mac install GNU Sed rather then use the default.

Here is an intro https://www.digitalocean.com/community/tutorials/the-basics-of-using-the-sed-stream-editor-to-manipulate-text-in-linux

The Basics of Using the Sed Stream Editor to Manipulate Text in Linux | DigitalOcean

The sed stream editor is a non-interactive line editor that can perform powerful editing operations on text streams or files. Learning to use sed well will …

#Neovim / #Vim tip of the day is to learn and use command-line mode.

It's a very powerful way to edit sets of lines (it only works on lines).

E.g. you can delete, yank, put, substitute, use external shell commands, as well as perform file operations & manage Vim, which is how most people know cmd mode.

A history buffer means if a cmd fails, undo with 'u' & try again. Useful for large search and replace operations.

More info here https://learnbyexample.github.io/vim_reference/Command-line-mode.html

Vim Reference Guide

Concise learning resource for beginner to intermediate level Vim users

Today's #Neovim / #Vim tip is simple AND useful.

Not sure what a command does? Use the built in help. For example is there a difference between `gg` and `1G`?

Try

:h G

and

:h gg

You can also confirm key mapping. e.g.

:h ctrl-]

When you are in the help text you can jump to tags with <ctrl>-] (and back with <ctrl>-o).

More info at https://freshman.tech/snippets/vim/jump-to-help-tag/

How to Jump to Help Tags in Vim

Jumping to a tag under the cursor in the Vim documentation window (:help) is done through the `Ctrl-]` keybinding

Freshman — Articles and Tutorials on Software Development
@alecthegeek Works with options as well, if you're not sure what you have it set to or what the default is you can run `:set tabstop?` and if you've got it at default still it will print `tabstop=8`
@mac <cough/> dont' forget the colon 😉
@alecthegeek edited to contain the required colon!
@alecthegeek thanks for the article link, I'm just getting started learning neo(vim) so this is very handy.