Better HN
topnewbestaskshowjobs
Log inSign up

jonS90

21 karma · joined Apr 27, 2013 (13y ago) · 14 submissions

Submissions

comment 1y ago · link · parent

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.

comment 2y ago · link · parent

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
    }

comment 2y ago · link · parent

I use this in combination with FZF's ctrl-r command history which allows me to fuzzy search command history.

comment 2y ago · link · parent

This makes me think of an alternative that no one seems to be mentioning: http/rest files. They're git-friendly and there are community plugins to operate them from every major IDE.

I believed the standard was created by jetbrains.

https://www.jetbrains.com/help/idea/http-client-in-product-c...

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 5y ago · link · parent

I came here to ask the same...

comment 5y ago · link · parent

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

comment 5y ago · link · parent

In Android you can configure Do Not Disturb to allow notifications from specific apps. I'm very curious if iPhone can do this.

comment 6y ago · link · parent

Sometimes I wonder if we need a new metric for time of day. The 24 system is very inconsistent throughout the year with respect to daylight.

comment 6y ago · link · parent

Lifestyle choices only get you so far if you have to figbt against your circadian rhythm to wake up before the sun. Your body wants to stay up late and wake up late, so you just end up sleeping less.

comment 6y ago · link · parent

I do the same. This might be overboard to some, but I went a step further and installed a vim plugin that brought many of the emacs-style key bindings into vim.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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