HN user

jonS90

21 karma
Posts0
Comments14
View on HN
No posts found.

I migrated from omz to zimfw and am reasonably happy.

But I have yet to meet anyone in real life who knows what zimfw is.

Funny that I've been doing something nearly identical, but with way more boilerplate.

    fzfCommit() {
      local FZF_PROMPT="${FZF_PROMPT:=Commit: }"
      git log --oneline | fzf --border --prompt="$FZF_PROMPT" --height=10 --preview="git show {+1} --color=always" --no-sort --reverse | cut -d' ' -f1 | tr '\n' ' ' | sed 's/[[:space:]]$//';
    }
    function gfixup {
      local commit=$(FZF_PROMPT='Fixup Commit: ' fzfCommit)
      if [[ -z "$commit" ]]; then
        return 1
      fi
      set -x
      git commit --fixup "$commit" --allow-empty > /dev/null || return 1
      git rebase --interactive "$commit"~ --autosquash || return 1
    }

I used jsweet to accomplish something really cool once, bringing pieces of an archaic, tried-and-true java codebase into the browser. I had to downgrade java to accomplish it, and I had to manually fiddle with the outputted typescript, but I'm overall very grateful for JSweet (and my users would be too if they only knew). I hope there's a future for it.

If it takes 5 seconds for your prompt to display or become interactive, yes.

As far as I'm aware, most of the other quality of life improvements can be reproduced in zsh with plugins. This performance bulletpoint makes me want to consider switching back to fish from zsh.

This is how I make pbcopy/pbpaste work on both Linux and WSL (Windows Subsystem for Linux).

    if [[ "$(uname)" == "Linux" ]]; then
      if ! grep -q Microsoft /proc/version; then
        alias pbcopy='xsel --clipboard --input'
        alias pbpaste='xsel --clipboard --output'
      else
        alias pbcopy='clip.exe'
        alias pbpaste='powershell.exe -command "Get-Clipboard"'
      fi
    fi

When making code changes feels quick and effortless, I think you become more willing to try out different things and experiment, which ultimately enables you to learn your languages and frameworks faster and make better choices. When code changes feel arduous and time-consuming, you're less inclined to experiment and more inclined to tolerate unknowns and best-guesses. I think vim helps push things towards the former scenario.

It might be worth learning the readline keybindings. They are supported rather ubiquitously in all terminal shells (including REPLs and SQL prompts and such). If you use MacOS they are supported across the entire OS.

You can also adopt these keybindings inside vim with the tpope/vim-rsi plugin. This approach has been quite effective in my experience.

http://readline.kablamo.org/emacs.html