Friday Picks 036

Read more →

TIL: kitty @ set-colors

kitty is the terminal emulator that I use in conjunction with fish. Kitty is fast, customizable, and has font ligatures. When I start a Vim session from the kitty terminal, Vim looks smooth (I use Victor Mono as my font). If you want to switch kitty’s color scheme, you can use kitty @ set-colors –all <path-to-colors-file> to interactively switch colors in your session. I wrote a fish function that uses kitty @ set-colors and sed to switch colors for both kitty and (Neo)Vim.
Read more →

Friday Picks 035

Read more →

TIL: You Can’t Mount Host Volumes Into Docker During Build

Today I learned that you can’t bind-mount folders on your host machine into a Docker container during build. For local development, I bind-mount with docker-compose. Example: version: '2.4'services: url-shortener: build: context: ./services/url-shortener dockerfile: Dockerfile volumes: - './services/url-shortener:/usr/src/app:delegated' ports: - 5001:5000My goal was to use the language’s package manager to install the required dependencies. Here’s the Dockerfile:

base imageFROMnimlang/nim:1.0.4-regular AS build-image## set working directoryWORKDIR/usr/src/app## install dependenciesRUN nimble refresh && nimble install -y## run serverCMD nimble c -r src/urlShortenerHere is the problem: nimble can’t find the required files for installation.

Read more →

Lint Your Markdown Files in Vim

Why Should You Lint Markdown? Isn’t the syntax easy enough? There’s nothing that can go wrong. Right? The goal of some markdown linters is to offer a consistent style, and to avoid obvious mistakes (e.g., duplicated headings). Some plugins also provide help in improving your writing style. Linting in Vim ALE is a popular lint engine for Vim and NeoVim. ALE also offers interfaces for markdown linters. You can see a list of all supported plugins on GitHub.
Read more →

How to Start and Restore Tmux Sessions Automatically With tmux-continuum

You’ve created a tmux session and worked with it. You’ve created a pane layout that works for you, and started your Vim editor. What happens when you shut down your computer, and start it again later? Tmux doesn’t remember your sessions. When you restart tmux, you loose all your running programs, etc. There are two tmux plugins that can help with that: Tmux Resurrect and tmux-continuum. Installation with Tmux Plugin Manager Add theses lines to the list of plugins inside tmux.
Read more →

Copy and Paste in Tmux

A few days ago, I wanted to copy text from my tmux shell. Unfortunately, the defaults from your standard terminal and shell ([kitty][kitty] and [fish][fish]) don’t work, as tmux has its own key bindings. I came across an excellent blog post called [Everything you need to know about Tmux copy past - Ubuntu][everythingcopy], which listed all the steps you need to take. First, the default behavior: Enter ‘copy mode’ by pressing CTRL+b, [.
Read more →

Step-by-Step Guide to Manage OCaml Installations With asdf

Use asdf to manage opam (and OCaml) asdf is a command-line tool which allows you to install multiple versions of a programming language. With asdf you have absolute control over which language version gets installed on your system. You can also switch between different versions. That’s useful if you work with several projects that might use different versions. I wrote about asdf a while ago. In this post, I will go over the steps on how to manage OCaml via asdf.
Read more →

Friday Picks 032

Read more →

TIL: Replace Local Files With Remote Files With Git

Read more →