]> git.wincent.com - wincent.git/log
2 years agofeat: avoid querying for latest Node version
Greg Hurrell [Mon, 15 Jun 2020 17:09:08 +0000 (19:09 +0200)] 
feat: avoid querying for latest Node version


    Error: failed to download version index (https://nodejs.org/dist/index.tab)

if you try to run without a network connection.

Obviously, `install` will only work if the 14.4.0 has been previously
downloaded, and the Yarn cache has been primed, but if you were able to
clone the repo and run it once, the above will probably be true.

2 years agofeat(cron): log something if exiting due to a trap
Greg Hurrell [Mon, 15 Jun 2020 16:03:06 +0000 (18:03 +0200)] 
feat(cron): log something if exiting due to a trap

For example, if there is no network, we just die silently. Instead,
let's at least log that we had a premature exit. User can look at debug
file if they want to know more.

2 years agochore(vim): update Scalpel submodule
Greg Hurrell [Mon, 15 Jun 2020 15:03:05 +0000 (17:03 +0200)] 
chore(vim): update Scalpel submodule

* aspects/vim/files/.vim/pack/bundle/opt/scalpel 8fc6f3a...50d6beb (5):
  > chore: prepare v1.1. release
  > chore: ignore "media" worktree
  > docs: add demo gif to README
  > docs: restore header image
  > Merge branch 'pull/11'

2 years agofeat(cron): add job for keeping frontend-infra fork in sync
Greg Hurrell [Mon, 15 Jun 2020 15:01:30 +0000 (17:01 +0200)] 
feat(cron): add job for keeping frontend-infra fork in sync

For reasons described here:


Going with a very low-tech solution for keeping this in sync.

2 years agofix(cron): correctly manage multiple jobs
Greg Hurrell [Mon, 15 Jun 2020 14:58:05 +0000 (16:58 +0200)] 
fix(cron): correctly manage multiple jobs

Seeing as I am about to add a second job, this needs to work for more
than one job at a time.

Old code would only keep "current" job up to date, ignoring others. So
you'd then visit a "non-current" Fig-managed job and it would blow away
the job id comment, and just return the body.

New code does the right thing, always preserving the id comments, and
forcing the entry to match of whatever job it is currently managing.

2 years agofeat(karabiner): add "Launcher" mode
Greg Hurrell [Sun, 14 Jun 2020 20:16:18 +0000 (22:16 +0200)] 
feat(karabiner): add "Launcher" mode

Hold "o" and a shortcut key to open or switch to an app; examples: "o" +
"t" (terminal), "o" + "b" (browser etc).

Inspired by the "Hyper Mode" section in this blog post:


I realized that I rely pretty heavily on Command-Tab to switch
applications and this could be a nice way to eliminate some of the
inefficiency (sometimes you have to cycle through multiple steps to get
to a target, and this can serve as a shortcut).

Right-option seems to be a popular choice for the "hyper" key but I find
that I use it often enough as a real modifier that I'd probably get
confused if I tried to repurpose it.

2 years agostyle(tampermonkey): fix formatting
Greg Hurrell [Fri, 12 Jun 2020 13:33:34 +0000 (15:33 +0200)] 
style(tampermonkey): fix formatting

2 years agofeat(tampermonkey): hide Twitter "Like" buttons
Greg Hurrell [Fri, 12 Jun 2020 13:31:31 +0000 (15:31 +0200)] 
feat(tampermonkey): hide Twitter "Like" buttons



I don't want me clicking "Like" on something to take it as a cue to
publish something with my name next to it.

This will help me avoid clicking on this button accidentally.

2 years agofix(vim): avoid two edge cases that could lock up Vim
Greg Hurrell [Thu, 11 Jun 2020 14:20:19 +0000 (16:20 +0200)] 
fix(vim): avoid two edge cases that could lock up Vim

Two examples:

1.  In a vim-fugitive buffer, you can wind up with a "file"
    name like:


    Which leads to an infinite loop when traversing:

        1. fugitive:///Users/me/something/.editorconfig
        2. fugitive:///Users/me/.editorconfig
        3. fugitive:///Users/.editorconfig
        4. fugitive:/.editorconfig
        5. ./.editorconfig
        6. [goto 5]

2.  In an empty Vim buffer (no file name), if you hit <C-o>, you wind up
    with '/' as a starting point:

        1. //.editorconfig
        2. [goto 1]

2 years agofix(corpus): make sure we autocommit changes to new files
Greg Hurrell [Thu, 11 Jun 2020 10:10:03 +0000 (12:10 +0200)] 
fix(corpus): make sure we autocommit changes to new files

2 years agofeat(portool): also update "temp" branch during daily update
Greg Hurrell [Tue, 9 Jun 2020 10:24:17 +0000 (12:24 +0200)] 
feat(portool): also update "temp" branch during daily update

I use this branch to force the GitHub UI to update for long-lived PRs
(ie. if they spuriously show commits that are already merged, you set
the "base" to `temp` and then back to `master`, and the UI stops showing
those commits).

2 years agofeat(vim): don't highlight yank if in VISUAL mode
Greg Hurrell [Wed, 3 Jun 2020 17:39:12 +0000 (19:39 +0200)] 
feat(vim): don't highlight yank if in VISUAL mode

Depends on Neovim `master` branch:


2 years agochore(brew): don't use iTerm2 nightly any more
Greg Hurrell [Sun, 31 May 2020 14:04:42 +0000 (16:04 +0200)] 
chore(brew): don't use iTerm2 nightly any more

Not because of stability concerns (it's generally super stable), but
rather because I tire of the frequent update dialogs.

2 years agochore(homebrew): temporarily deactivate iStat Menus cask
Greg Hurrell [Fri, 29 May 2020 15:57:36 +0000 (17:57 +0200)] 
chore(homebrew): temporarily deactivate iStat Menus cask

Because it installs for all users by default and I want to do a manual
single-user install instead.

2 years agostyle: format
Greg Hurrell [Fri, 29 May 2020 15:27:18 +0000 (17:27 +0200)] 
style: format

2 years agofeat(lf): implement fake jump list
Greg Hurrell [Fri, 29 May 2020 15:16:30 +0000 (17:16 +0200)] 
feat(lf): implement fake jump list

No stack functionality actually exists in `lf`, but we can pretend that
it almost does (as a size-limited stack with capacity 1...) via this


2 years agofeat(lf): add skim-based "goto" shortcut
Greg Hurrell [Fri, 29 May 2020 15:11:05 +0000 (17:11 +0200)] 
feat(lf): add skim-based "goto" shortcut

Because as pretty as "broot" is, it doesn't cut it for very big
hierarchies (too slow). So I am going to make "gt" (the "default",
because it is easier to type) invoke skim, and "gT" (the "special" mode)
invoke broot.

2 years agofeat(lf): set up custom broot bindings
Greg Hurrell [Fri, 29 May 2020 13:47:48 +0000 (15:47 +0200)] 
feat(lf): set up custom broot bindings

2 years agochore(lf): add a copy of the vanilla broot conf.toml file
Greg Hurrell [Fri, 29 May 2020 13:43:57 +0000 (15:43 +0200)] 
chore(lf): add a copy of the vanilla broot conf.toml file

Will customize this for use from inside `lf`, but for now, this is just
what you get on first run of broot on macOS (it installs this to

2 years agochore(vim): add "IDE" to spell file
Greg Hurrell [Fri, 29 May 2020 13:43:29 +0000 (15:43 +0200)] 
chore(vim): add "IDE" to spell file

2 years agofix(iterm): make Option-Enter work in Broot
Greg Hurrell [Fri, 29 May 2020 13:38:54 +0000 (15:38 +0200)] 
fix(iterm): make Option-Enter work in Broot

As described here:


We don't want to treat Option as Escape across the board (because it
breaks typing things like "é" and so on), but we can special case it
just for Option + Enter.

2 years agofeat(portool): make non-project-local deploy work in commerce etc
Greg Hurrell [Fri, 29 May 2020 11:28:29 +0000 (13:28 +0200)] 
feat(portool): make non-project-local deploy work in commerce etc

- Move location detection from `nuke` into `.common.sh`
- Use it in `deploy` so that we can use it outside of project
  directories in the non-main repo; eg. in "modules" of "commerce",
  `deploy frontend-js-react-web commerce-frontend-js` works (previously
  you could only use it inside the individual project directories).

2 years agotest(tampermonkey): show that update mechanism works
Greg Hurrell [Fri, 29 May 2020 09:16:01 +0000 (11:16 +0200)] 
test(tampermonkey): show that update mechanism works

Just a version number bump to show that it actually works (it does).

2 years agofix(tampermonkey): fix bad UserScripts links
Greg Hurrell [Fri, 29 May 2020 09:10:57 +0000 (11:10 +0200)] 
fix(tampermonkey): fix bad UserScripts links

These were preventing auto-updates.

2 years agofix(tampermonkey): make rendered font size match more closely
Greg Hurrell [Fri, 29 May 2020 08:58:52 +0000 (10:58 +0200)] 
fix(tampermonkey): make rendered font size match more closely

Monospace font is bigger, which makes it harder to see hard linebreaks
(ie. they tend to line up with right edge of text area). So tweak the
font size to roughly match the non-monospace version's size.

2 years agofeat(lf): use broot to jump to directories
Greg Hurrell [Fri, 29 May 2020 00:57:07 +0000 (02:57 +0200)] 
feat(lf): use broot to jump to directories

Mapping "gt" (mnemonic, "go to"). Alt-Enter cds to the selected item;
needs tweak in iTerm as noted here:


2 years agofeat(lf): select file in Finder instead of just opening containing folder
Greg Hurrell [Fri, 29 May 2020 00:05:56 +0000 (02:05 +0200)] 
feat(lf): select file in Finder instead of just opening containing folder

Obviously, only works on macOS at this point.

2 years agofeat(tampermonkey): use monospace font in GitHub text areas
Greg Hurrell [Thu, 28 May 2020 12:27:04 +0000 (14:27 +0200)] 
feat(tampermonkey): use monospace font in GitHub text areas

Note that despite the class name which contains "comment-form", this
also gives us a fixed width font in PR and issue descriptions.

2 years agofeat(lf): add "gr" mapping (go root)
Greg Hurrell [Wed, 27 May 2020 23:38:53 +0000 (01:38 +0200)] 
feat(lf): add "gr" mapping (go root)

Ranger uses "g/" for this, but I think I like this better.

2 years agofeat(lf): special-case "gf" when current file is already a directory
Greg Hurrell [Wed, 27 May 2020 23:37:56 +0000 (01:37 +0200)] 
feat(lf): special-case "gf" when current file is already a directory

If it is, open that in the Finder instead of the directory containing
it. For normal files, the containing directory is opened.

2 years agofeat(lf): add "gf" mapping to open current directory in Finder
Greg Hurrell [Wed, 27 May 2020 23:36:21 +0000 (01:36 +0200)] 
feat(lf): add "gf" mapping to open current directory in Finder

2 years agofeat(lf): set up some shortcuts
Greg Hurrell [Wed, 27 May 2020 23:11:01 +0000 (01:11 +0200)] 
feat(lf): set up some shortcuts

2 years agofeat(zsh): override a couple of $LSCOLORS defaults
Greg Hurrell [Wed, 27 May 2020 22:57:59 +0000 (00:57 +0200)] 
feat(zsh): override a couple of $LSCOLORS defaults

2 years agorefactor(zsh): prepare to override LSCOLORS
Greg Hurrell [Wed, 27 May 2020 22:53:30 +0000 (00:53 +0200)] 
refactor(zsh): prepare to override LSCOLORS

So I can customize the color scheme used in `lf`. Will work on macOS
(BSD `ls`); won't have an effect on Linux (GNU `ls`).

2 years agofeat(lf): use MIME types in preview script as well
Greg Hurrell [Wed, 27 May 2020 00:20:20 +0000 (02:20 +0200)] 
feat(lf): use MIME types in preview script as well

2 years agochore(lf): do some more setup
Greg Hurrell [Wed, 27 May 2020 00:14:11 +0000 (02:14 +0200)] 
chore(lf): do some more setup

Image preview is actually working decently (well, less horribly):


2 years agofix(vim): make g:UltiSnipsSnippetDirectories work again
Greg Hurrell [Tue, 26 May 2020 23:06:30 +0000 (01:06 +0200)] 
fix(vim): make g:UltiSnipsSnippetDirectories work again

According to the docs, it is now supposed to be a single absolute path,
or multiple relative paths.

And g:UltiSnipsSnippetsDir no longer exists.

So be it. This unbreaks both `:UltiSnipsEdit` as well as moving between
tabstops (which was a super annoying breakage).

2 years agofeat(brew, dotfiles): prepare to set up lf
Greg Hurrell [Tue, 26 May 2020 22:48:31 +0000 (00:48 +0200)] 
feat(brew, dotfiles): prepare to set up lf

Much faster than Ranger, although it is definitely more barebones.

2 years agofeat(vim): improve "time" snippet
Greg Hurrell [Tue, 26 May 2020 22:48:04 +0000 (00:48 +0200)] 
feat(vim): improve "time" snippet

Closes: https://github.com/wincent/wincent/issues/13
2 years agochore(vim): remove bindings that I never use
Greg Hurrell [Tue, 26 May 2020 08:36:34 +0000 (10:36 +0200)] 
chore(vim): remove bindings that I never use

2 years agofix(vim): make Esc key quit Command-T outside of tmux
Greg Hurrell [Tue, 26 May 2020 08:35:21 +0000 (10:35 +0200)] 
fix(vim): make Esc key quit Command-T outside of tmux

Not sure whether something broke with my recent update to a new build of
Neovim, or I simply don't use Vim outside of tmux often enough to
notice, but Esc wasn't closing the Command-T match listing unless I was
in tmux.

2 years agofix(vim): disable unwanted code fence conceal in Markdown
Greg Hurrell [Mon, 25 May 2020 14:18:20 +0000 (16:18 +0200)] 
fix(vim): disable unwanted code fence conceal in Markdown

Just stopped working. Maybe this is fallout from recent changes related
to indentLine (ie. removing it in a90b52b0cbfe6c296aa2e18e72bc743742f;
we used to `set conceallevel=1` on focusing a window, but only if
filetype wasn't corpus/help/markdown/markdown.corpus/reason).

2 years agofix(vim): add missing scriptencoding
Greg Hurrell [Sun, 24 May 2020 11:11:57 +0000 (13:11 +0200)] 
fix(vim): add missing scriptencoding

Because this file has a non-breaking space in it now (c2 a0).

2 years agofix(vim): restore gray overwrite of Conceal highlight group
Greg Hurrell [Sun, 24 May 2020 00:12:13 +0000 (02:12 +0200)] 
fix(vim): restore gray overwrite of Conceal highlight group

Very used to this from indentLine, so want to keep it even though we got
rid of indentLine itself.

2 years agochore(vim): remove indentLine plugin
Greg Hurrell [Sat, 23 May 2020 23:54:55 +0000 (01:54 +0200)] 
chore(vim): remove indentLine plugin

It just causes too many annoying visual issues in conjunction with,
among other things, the highlighting shown via the TextYankPost autocmd.

2 years agofeat(vim): set up TextYankPost
Greg Hurrell [Sat, 23 May 2020 23:42:32 +0000 (01:42 +0200)] 
feat(vim): set up TextYankPost

This is going to be a great little speed-up. Instead of visually
selecting things and then yanking them (to be sure you got he right
thing), you can just blindly yank with the same level of confidence
because if you get it wrong, you'll see it in the highlighting.

Thanks to: https://github.com/neovim/neovim/pull/12279

Screenshot: https://twitter.com/wincent/status/1264340870322675713

2 years agofeat(vim): highlight nonbreaking space in Goyo buffers
Greg Hurrell [Sat, 23 May 2020 14:52:01 +0000 (16:52 +0200)] 
feat(vim): highlight nonbreaking space in Goyo buffers

Trailing whitespace still gets highlighted (once you leave the line), so
no worries about that, but nonbreaking spaces are notoriously frequent
in the kinds of buffers that I use Goyo in (ie. blog posts etc, where it
is super easy to type "option-hyphen" to get an emdash, and then
accidentally follow it with "option-space", which produces a nonbreaking
space), and worst of all, the error isn't visible in the Git diff

2 years agorefactor(vim): remove unnecessary NonText override for Goyo
Greg Hurrell [Sat, 23 May 2020 14:46:05 +0000 (16:46 +0200)] 
refactor(vim): remove unnecessary NonText override for Goyo

I don't think we need this as Goyo is already setting NonText to be:

    fg == bg == Normal bg:



2 years agofix(ranger): don't try to preview gifs
Greg Hurrell [Fri, 22 May 2020 22:58:05 +0000 (00:58 +0200)] 
fix(ranger): don't try to preview gifs

They seem to make ranger hang horrendously.

Not sure if related to:


2 years agodocs: update aspects list in README
Greg Hurrell [Thu, 21 May 2020 22:00:59 +0000 (00:00 +0200)] 
docs: update aspects list in README

2 years agochore: update dependencies
Greg Hurrell [Thu, 21 May 2020 21:58:43 +0000 (23:58 +0200)] 
chore: update dependencies

Note that the type for fs.promises.readFile got a bit narrower in the
new version of the `@types/node` package.

2 years agostyle: run `yarn format`
Greg Hurrell [Thu, 21 May 2020 21:52:57 +0000 (23:52 +0200)] 
style: run `yarn format`

2 years agorefactor(fig): gate more things on being me
Greg Hurrell [Thu, 21 May 2020 21:52:17 +0000 (23:52 +0200)] 
refactor(fig): gate more things on being me

Stuff that non-forkers of this repo are less likely to want.

2 years agofeat(automount): fix incredibly annoying macOS beachball
Greg Hurrell [Thu, 21 May 2020 19:51:57 +0000 (21:51 +0200)] 
feat(automount): fix incredibly annoying macOS beachball

2 years agochore(vim): update spell file
Greg Hurrell [Thu, 21 May 2020 15:55:58 +0000 (17:55 +0200)] 
chore(vim): update spell file

2 years agochore(portool): add config for testing LPS-112988
Greg Hurrell [Thu, 21 May 2020 15:55:21 +0000 (17:55 +0200)] 
chore(portool): add config for testing LPS-112988

See: https://issues.liferay.com/browse/LPS-112988

2 years agoperf(git): always flush after every line
Greg Hurrell [Thu, 21 May 2020 15:14:51 +0000 (17:14 +0200)] 
perf(git): always flush after every line

This addresses the problem described in the parent commit. Note that
despite what the comment here says, flushing on every line is plenty
fast (tested with `git log -p`; it's fine...).

So "perf" here means perceived perf (responsiveness).

2 years agorefactor(menos): dramatically simplify, removing buffering
Greg Hurrell [Thu, 21 May 2020 14:46:22 +0000 (16:46 +0200)] 
refactor(menos): dramatically simplify, removing buffering

If you look at the history of this script you'll see that it was built
up incrementally to address a bunch of specific issues: intercepting
`--pattern`/`+r` to catch redraw issues, handling interrupts specially,
responding specially if output fits on one screen etc.

Today, I noticed one remaining issue: when running a command like
`git log -Gblah` on a huge repo that might take a while to produce a
screenful of results, no visible progress is apparent until the whole
screen is buffered. And then the subsequent buffering after the first
screenful probably doesn't help much either.

Looking at all this, I realized I no longer need most of the code in the
script because it was the product of iterative mutations that don't make
sense any more. We can just fork and run `less` after manipulating the
history file.

With a reduced test case I was able to determine that there is still
some unwanted buffering going on even in the case when Git can start
producing output immediately (about four seconds), because I still see a
difference between:

    # Uses `less`: prints first lines immediately, 4 seconds overall.
    git --paginate log -SFieldBase.scss --since=2.weeks.ago

    # Uses nothing: prints first lines immediately, 4 seconds overall.
    git --no-pager log -SFieldBase.scss --since=2.weeks.ago

    # Uses `menos`: prints nothing for 4 seconds, then prints all at once.
    git log -SFieldBase.scss --since=2.weeks.ago

    # No difference.
    env GIT_FLUSH=1 !!

But even if `menos` is reduced to:

    #!/usr/bin/env ruby

    exec 'less', *ARGV

you still see the lag. I believe it's because it is going through the
`diff-highlight` Perl script, which is doing its own buffering. The
real fix, then, is to fix that script to flush immediately. But in the
meantime, simplifying the script here is a win, so going to do that.

2 years agofix(vim): make hover window highlighting overrides work
Greg Hurrell [Thu, 21 May 2020 12:33:37 +0000 (14:33 +0200)] 
fix(vim): make hover window highlighting overrides work

The Lua-based trick wasn't working because the hover callback doesn't
return `winnr` and `bufnr` (they end up being `nil`). Have to search for
the hover window instead.

2 years agochore(vim): document some bogus attempts at improving popup windows
Greg Hurrell [Wed, 20 May 2020 23:36:43 +0000 (01:36 +0200)] 
chore(vim): document some bogus attempts at improving popup windows

Too tired to sort this out now, so leaving some evidence for later

When we show the popup, it is #303030 (basically, same as NormalNC,
ColorColumn etc).  When we focus into it, it gets brighter (#505050,
basically, same as Visual, NormalFloat, Pmenu etc) and the window you
came from is now non-current so goes to NormalNC.

This is all a bit distracting. I can't for the life of me make up my
mind how I'd like this to work. This effectively inverts the colors when
you switch focus, which seems a bit too extreme:

    highlight clear NormalFloat
    highlight link NormalFloat Normal

The commented out code here represents a couple of failed experiments at
setting 'winhighlight' on window creation. I think these are getting
clobbers by my other autocmd fanciness... Will have to look into this
again with fresh eyes tomorrow or later.

2 years agofeat(vim): improve LSP textDocument/hover appearance
Greg Hurrell [Wed, 20 May 2020 23:35:50 +0000 (01:35 +0200)] 
feat(vim): improve LSP textDocument/hover appearance

'cursorline' is distracting, and 'nomodifiable' isn't being set properly
for some reason, so set it manually.

2 years agofix(homebrew): fix bad `homebrew tap` invocation
Greg Hurrell [Wed, 20 May 2020 07:29:11 +0000 (09:29 +0200)] 
fix(homebrew): fix bad `homebrew tap` invocation

This was a misport (see b0d5ca3f0fcb20d69277b476d2a94b91cbe9161c) which
you'd only catch on a fresh install; I didn't see it because I obviously
already had the tap.

Closes: https://github.com/wincent/wincent/issues/88
2 years agofeat(ranger): set confirm_on_delete to "always"
Greg Hurrell [Tue, 19 May 2020 23:04:21 +0000 (01:04 +0200)] 
feat(ranger): set confirm_on_delete to "always"

Seeing as I am a ranger newbie and don't want to get burnt by any

2 years agofeat(ranger): set some mappings for benefit of muscle memory
Greg Hurrell [Tue, 19 May 2020 22:53:12 +0000 (00:53 +0200)] 
feat(ranger): set some mappings for benefit of muscle memory

2 years agochore(ranger): tweak some settings
Greg Hurrell [Tue, 19 May 2020 22:40:42 +0000 (00:40 +0200)] 
chore(ranger): tweak some settings

2 years agochore(ranger): update config files
Greg Hurrell [Tue, 19 May 2020 22:24:09 +0000 (00:24 +0200)] 
chore(ranger): update config files


    ranger --copy-config=all -r .
    mv rifle.conf commands.py rc.conf scope.sh commands_full.py ~/.config/ranger/

And then staging/editing with `git add -p`.

2 years agochore(ranger): swap "zf" and "f" ("filter" and "find")
Greg Hurrell [Tue, 19 May 2020 22:08:45 +0000 (00:08 +0200)] 
chore(ranger): swap "zf" and "f" ("filter" and "find")

"find" is way too potent to be the shorter option. It will run the
selection as soon as it finds an unambiguous match. ie. if you type "z"
and there is a file in the current directly that uniquely has it, it
will open it. I'd rather use "f" for "filter", and I don't think I'll
ever use "zf" to be honest.

2 years agofeat(ranger): use catimg for image previews
Greg Hurrell [Mon, 18 May 2020 23:35:34 +0000 (01:35 +0200)] 
feat(ranger): use catimg for image previews

Although as per this issue here, the color kind of sucks:


2 years agochore(ranger): tweak some settings
Greg Hurrell [Mon, 18 May 2020 23:13:25 +0000 (01:13 +0200)] 
chore(ranger): tweak some settings

- Reduce number of columns from 3 to 2.
- Make / do incremental search by default.

2 years agofeat(portool): add support for nuking commerce database
Greg Hurrell [Mon, 18 May 2020 12:28:22 +0000 (14:28 +0200)] 
feat(portool): add support for nuking commerce database

If you try to do it inside the "ee" checkout it will skip. If you are in
"commerce" or "master" it will target the corresponding database.
Anywhere else, it just targets the main database.

2 years agorefactor(vim): use simpler workaround for `--noEmit` vs `incremental`
Greg Hurrell [Sun, 17 May 2020 18:55:43 +0000 (20:55 +0200)] 
refactor(vim): use simpler workaround for `--noEmit` vs `incremental`

There is no `--noIncremental`, but there is `--incremental false`.

2 years agofix(vim): make :Typecheck work in presence of `"incremental": true`
Greg Hurrell [Sun, 17 May 2020 11:35:41 +0000 (13:35 +0200)] 
fix(vim): make :Typecheck work in presence of `"incremental": true`

As per:


2 years agochore(portool): remove a stale TODO
Greg Hurrell [Sun, 17 May 2020 10:51:00 +0000 (12:51 +0200)] 
chore(portool): remove a stale TODO

DXP builds now happen by default in the main checkout. Nothing really to
build on a routine basis in the "-ee" checkout.

2 years agostyle(zsh): kill off some excess blank lines
Greg Hurrell [Sun, 17 May 2020 10:39:58 +0000 (12:39 +0200)] 
style(zsh): kill off some excess blank lines

2 years agofix(tampermonkey): avoid TypeScript warning about unused variable
Greg Hurrell [Sat, 16 May 2020 15:14:49 +0000 (17:14 +0200)] 
fix(tampermonkey): avoid TypeScript warning about unused variable

2 years agochore(vim): update bundle
Greg Hurrell [Sat, 16 May 2020 14:12:15 +0000 (16:12 +0200)] 
chore(vim): update bundle

Just a routine update to make sure my update script does the right

* aspects/vim/files/.vim/pack/bundle/opt/deoplete bbec852...cb9212d (8):
  > Fix #1099 cpoptions '$' redraw
  > Fix a bit
  > Update the documentation
  > Fix <C-y> regression
  > Add deprecated variables warnings
  > Fix initialize
  > Merge pull request #1096 from ricmatsui/rm-complete-suffix-option
  > Fix #1095 skip text problem

* aspects/vim/files/.vim/pack/bundle/opt/tcomment_vim a20a34b...22f3707 (2):
  > Merge pull request #267 from pylipp/patch-1
  > Merge pull request #264 from akiomik/patch-1

* aspects/vim/files/.vim/pack/bundle/opt/ultisnips ee31ea1...e35158d (2):
  > Reestablish compatibility for python 3.5 (#1208)
  > Enable spell checking in comments (#1216)

* aspects/vim/files/.vim/pack/bundle/opt/vim-fugitive 85e2c73...caf3b1d (5):
  > Don't default :Git grep to --column
  > Provide completion relative to working directory
  > Extract :Ggrep/:Glgrep wrapper function
  > Use parameterized Git dir when completing heads
  > Remove commit entry from :{range}Glog

* aspects/vim/files/.vim/pack/bundle/opt/vim-javascript c396615...3c90d0c (2):
  > Add `.cjs` file extension support (#1207)
  > Disable spelling in basically everything except comments

* aspects/vim/files/.vim/pack/bundle/opt/vim-projectionist 17a8b20...1d95458 (1):
  > Drop support for :A filename+jump

2 years agofix(vim): make sure LSP client can find root
Greg Hurrell [Fri, 15 May 2020 22:41:58 +0000 (00:41 +0200)] 
fix(vim): make sure LSP client can find root

Opening a file in "fig/" was causing the root to be misidentified as
"fig/" because of "fig/package.json" being a root marker. This would
lead to spurious errors (eg. inability to see root tsconfig.json, which
would cause things like "target" to be misdetected).

I think we don't need the package.json at edit time (under "src/"), but
we do need it at runtime (under "lib/") so let's just move it.

2 years agofix(vim): replace deprecated Fugitive command
Greg Hurrell [Fri, 15 May 2020 19:24:11 +0000 (21:24 +0200)] 
fix(vim): replace deprecated Fugitive command

One more time; maybe if I repeat this enough I'll actually remember it:

- <LocalLeader>dd: start resolving a conflict
- <LocalLeader>dh: pull hunk from left
- <LocalLeader>dl: pull hunk from right

2 years agofix(vim): make sure we never fail to restore tmux status
Greg Hurrell [Fri, 15 May 2020 18:51:54 +0000 (20:51 +0200)] 
fix(vim): make sure we never fail to restore tmux status

On exiting Vim from Goyo.

2 years agofix(vim): update Ferret submodule
Greg Hurrell [Fri, 15 May 2020 14:55:39 +0000 (16:55 +0200)] 
fix(vim): update Ferret submodule

To get small fix:

* aspects/vim/files/.vim/pack/bundle/opt/ferret ea59ba1...6218891 (1):
  > fix: correct failure to detect pre-existing mapping to <Plug>(FerretLack)

2 years agofix(vim): make popup menu have higher contrast
Greg Hurrell [Fri, 15 May 2020 14:17:20 +0000 (16:17 +0200)] 
fix(vim): make popup menu have higher contrast

So that it stands out more whether it is in the "normal" or
"ColorColumn" regions of the window.


2 years agofix(vim): significantly improve appearance of floating windows
Greg Hurrell [Fri, 15 May 2020 14:15:51 +0000 (16:15 +0200)] 
fix(vim): significantly improve appearance of floating windows

Because otherwise our autocmds end up blowing away syntax highlighting
and adding unwanted ColorColumn background.

2 years agofeat(vim): add binding for show_line_diagnostics
Greg Hurrell [Fri, 15 May 2020 12:54:25 +0000 (14:54 +0200)] 
feat(vim): add binding for show_line_diagnostics

Seeing as they are often too crammed to fit properly into virtual text
on the right edge.

Still might be nice to wrap them though, as recommended here:


And may want to keep an eye on this one too:


And related LSP plug-in by the same author:


Closes: https://github.com/wincent/wincent/issues/86
2 years agorefactor(fig): extract getAspectFromCaller to DRY up DSL
Greg Hurrell [Fri, 15 May 2020 12:18:23 +0000 (14:18 +0200)] 
refactor(fig): extract getAspectFromCaller to DRY up DSL

Seeing as `handler`, `task`, and `variables` are all basically the same.

2 years agorefactor(fig): use `fail` in handler test
Greg Hurrell [Fri, 15 May 2020 11:57:34 +0000 (13:57 +0200)] 
refactor(fig): use `fail` in handler test

2 years agotest(fig): add basic handler demo to "meta" aspect
Greg Hurrell [Fri, 15 May 2020 11:51:33 +0000 (13:51 +0200)] 
test(fig): add basic handler demo to "meta" aspect

2 years agofeat(fig): add handler functionality
Greg Hurrell [Fri, 15 May 2020 10:28:35 +0000 (12:28 +0200)] 
feat(fig): add handler functionality

This is a quick-and-dirty implementation that uses a lot of copy-paste
because I am lazy. As noted inline in a couple of places, this could
definitely be DRY-ed up a bit. Could also benefit from some tests (I
only manually tested it).

2 years agorefactor(fig): downgrade encrypted file check
Greg Hurrell [Thu, 14 May 2020 16:36:37 +0000 (18:36 +0200)] 
refactor(fig): downgrade encrypted file check

Instead of instant failure, prompt.

Seeing as my `.npmrc` seems to be different on each machine, cause one
machine to be out of sync all the time.

2 years agostyle: fix formatting
Greg Hurrell [Thu, 14 May 2020 16:26:41 +0000 (18:26 +0200)] 
style: fix formatting

2 years agorefactor(fig): export some non-DSL things from main index
Greg Hurrell [Thu, 14 May 2020 16:25:43 +0000 (18:25 +0200)] 
refactor(fig): export some non-DSL things from main index

Because these are DSL-ish even though they aren't in the dsl/ subfolder.

2 years agodocs: apply proofreading fixes
Greg Hurrell [Thu, 14 May 2020 15:44:52 +0000 (17:44 +0200)] 
docs: apply proofreading fixes

2 years agochore: update typescript from 3.8.3 to 3.9.2
Greg Hurrell [Tue, 12 May 2020 23:26:46 +0000 (01:26 +0200)] 
chore: update typescript from 3.8.3 to 3.9.2

Done using:

    yarn add typescript --latest --exact

2 years agostyle: format source
Greg Hurrell [Tue, 12 May 2020 22:55:36 +0000 (00:55 +0200)] 
style: format source

2 years agorefactor(tampermonkey): mitigate concerns with GitHub security
Greg Hurrell [Tue, 12 May 2020 22:47:01 +0000 (00:47 +0200)] 
refactor(tampermonkey): mitigate concerns with GitHub security

This is funny. macOS has a built-in Apache webserver, so we can
configure it file up our user scripts locally, mitigating concerns with
GitHub security mentioned in e8f40653, and giving us file-system access
without actually elevating extension privileges, so we can add one more
row (level 5) to our risk-impact matrix:

    | Level | Description    | Risk   | Impact |
    | ----- | -------------- | ------ |
    | 0     | Don't use      | None   | None   |
    | 1     | Copy-paste     | Low    | Medium |
    | 2     | Full FS access | Low    | High   |
    | 3     | Remote URL     | Low    | Medium |
    | 4     | Browser sync   | Low    | Medium |
    | 5     | Local URL      | Low    | Medium |

Effectively, we have the power/flexibility/immediacy of level 2 now,
while maintaining the risk that we used to have at level 1.

2 years agofix(tampermonkey): add ".user" pre-extension
Greg Hurrell [Tue, 12 May 2020 19:28:39 +0000 (21:28 +0200)] 
fix(tampermonkey): add ".user" pre-extension

Not sure if it matters, but I can't get Tampermonkey to "see" updates to
these scripts, and this might help.

2 years agofix(tampermonkey): provide downloadURL as well
Greg Hurrell [Tue, 12 May 2020 19:22:52 +0000 (21:22 +0200)] 
fix(tampermonkey): provide downloadURL as well

Not sure if GitHub is caching aggressively, but Tampermonkey doesn't
seem to be picking up updates.

2 years agofeat(tampermonkey): add updateURLs to scripts
Greg Hurrell [Tue, 12 May 2020 19:14:35 +0000 (21:14 +0200)] 
feat(tampermonkey): add updateURLs to scripts

Despite the misgivings expressed in e8f40653, going to give this a try.
If it works out ok and I feel comfortable with it, may end up deleting
or modifying the tasks in this aspect, as I have pretty much ruled out
granting filesystem access at this point.

2 years agochore(vim): update Command-T submodule
Greg Hurrell [Tue, 12 May 2020 19:05:11 +0000 (21:05 +0200)] 
chore(vim): update Command-T submodule

* aspects/vim/files/.vim/pack/bundle/opt/command-t d044bac...9c7f812 (1):
  > chore: battle bit-rot in gem dependency graph

2 years agofeat(portool): add shortcut for running ci:bundle bundles
Greg Hurrell [Tue, 12 May 2020 16:24:21 +0000 (18:24 +0200)] 
feat(portool): add shortcut for running ci:bundle bundles

Unpack the bundle and in the unpacked directory run `portool run

Assumes you have a DB created with:


Ghastly hacky. Will eventually clean all this up one day.

2 years agochore(tampermonkey): update script headers
Greg Hurrell [Tue, 12 May 2020 14:25:25 +0000 (16:25 +0200)] 
chore(tampermonkey): update script headers

Preparing to potentially move these somewhere I can have them
auto-update. I probably won't though, because I don't really like the
security implications:

0.  Don't use Tampermonkey

    This is the baseline, with no additional risks.

1.  Install via copy-paste (ie. current set-up)

    You have to trust the extension itself not to do anything malicious.
    It has access to every page you visit, and can run arbitrary code.
    Millions use it, but ultimately unless you're auditing the source
    every time you install and update it, you are trusting the developer
    to be competent and non-evil.

2.  Grant access to local file system and pull in script using

    Same security profile as above, but you're additionally now trusting
    the developer not to do anything malicious involving accessing
    arbitrary files on your filesystem. If you trust the developer not
    at level 1, you can probably trust them at level 2, but there are no
    guarantees at either level, and there is a reason why browsers try
    to sandbox access to the local filesystem.

3.  Update script from GitHub (or similar) URL.

    Instead of worrying about the filesystem, you now have to worry
    about the integrity of GitHub's web servers and Git storage. If
    somebody can push to your repo, or otherwise fake a response from
    you, they can arbitrarily substitute their own malicious userscript
    for your own.

4.  Via Browser Sync.



    > Please note that you have to be signed in to your browser and that
    > the amount of data that can be synced is very limited. That's
    > why Tampermonkey needs a publicly accessible URL to sync your
    > scripts. To be clear on that: only scripts that are downloaded
    > from a web server or that contain a valid @downloadURL tag are
    > processed.

    So, basically same threat model as level 3, as far as I can tell.

Summarizing relative risk/impact:

    | Level | Risk   | Impact |
    | ----- | ------ | ------ |
    | 0     | None   | None   |
    | 1     | Low    | Medium |
    | 2     | Low    | High   |
    | 3     | Low    | Medium |
    | 4     | Low    | Medium |

Overall, I think I'm going to sit on it for a bit before making a final
decision, but based on the table above we can probably rule out level 2