Archive for Uncategorized

Vimwiki wiki wild wild west: Tables

Vimwiki

Vimwiki is awesome and it has already done the rounds a few times. If you haven’t heard of it then check it out on the Vimwiki github repository. It’s great for note-taking, to-do lists, meeting minutes, etc. but I came across a use for it this week that I’ve already found myself using a few times since: Tables.

Vimwiki Tables

I’ve used the Tabular vim plugin on and off but I find it a bit tedious. It could well be that my workflow with it isn’t great. Vimwiki’s tables in comparison are super intuitive, to me at least. They have auto-formatting just when needed but also have the power of vim actions.

Demo

The Github repo has all the info you need to create and edit some tables but, as always, I find gifs speak louder than words:
Below, I’ve created a table with 3 columns and 2 rows with the command :VimwikiTable 3 2

Then I can start filling the table with some info about my favourite people ever:

See how it formats as I go? It even adds a new row when I tab on the last cell.

Lastly, I’ve added some incorrect info for Voltaire’s birth year. I can correct that pretty easily by using the \ text object which represents a cell. So, change in cell ci\ deletes the inner contents of the cell and puts me into insert mode, ready to write the correct year:

Too easy.

Remember, check out the Vimwiki github repository docs for more commands.

Quick linux tip

Linux never ceases to amaze me. I’ve been using it daily for years and somehow I haven’t come across this gem until now.

If you surround your terminal command with parentheses () then the command will execute and then return you back to your original directory.

Below I’ve got a really simple example. I’m in the folder “brackets” and I’ve created a folder “test”. I then use my parentheses around the command which moves into the test directory, creates a new file and lists the directory contents (showing the new file). Whenever the command finishes, I’m back in the folder I started in.

Linux terminal parentheses

Surrounding Linux terminal commands with brackets

Concurrency Game

Stumbled across this game that teaches concurrency in a fun and simple way.

Very cool.