Łukasz Wieczorek's blog A slice of programmer's life

Tool driving

What is the common in scripts.

  • Version printer.
  • Help printer.
  • Arguments count must be proper.
  • Arguments are taken into tuples (what, what value).
  • Arguments have well known types in libraries for CLIs.
  • Script contains main method.
  • Scripts contain echo step by step explanation.
  • Scripts contain colouring statements.
  • Scripts call blobs.
  • Scripts source files.
  • Scripts use flags (set -eu).
  • Scripts have a starting untold directory.
  • Scripts have a way to know where they are placed at (dirname (status –current-filename)).
  • Scripts have a $status, $? mechanism.
  • Scripts do not scale.

VIM

VIM is my favourite terminal editor. I am writing this post for me to easier to switch to Helix which I will follow up with another post.

Before opening:

which -a vim
brew install vim
vim --version
vim Notes.md
vimtutor

To exit:

:q
:q!
:x
:wq

To navigate:

h j k l # train this with muscles
^ # home
$ # end
gg # document beginning
shift + G # document end

In visual mode:

i # insert
a # append
shift + i # append to the beginning of line
shift + a # append to the end of line
dd # delete line
dw # delete word
y # yank
p # paste
u # undo
ctrl + r # redo
shift + v # visual line

In insert mode:

esc # escape to visual mode

Say no!

say-no is here.

I built a simple HTML, CSS, JavaScript website around the idea of saying no to things that destroy us.

You can check the source code here.