Giter Site home page Giter Site logo

wincent / wincent Goto Github PK

View Code? Open in Web Editor NEW
1.1K 53.0 101.0 57.38 MB

πŸ’Ύ Dot-files

License: The Unlicense

Shell 15.95% Ruby 0.32% JavaScript 0.97% Perl 0.10% Lua 2.48% Python 1.25% Makefile 0.01% C 0.42% TypeScript 5.24% AppleScript 0.01% HTML 1.91% CMake 0.01% Vim Script 71.33% Nix 0.01%
vim tmux dotfiles macos iterm2 clipper

wincent's Introduction

"dotfiles" and system configuration

These dotfiles are affectionately dedicated to the vi editor originally created by Bill Joy, with whom I have spent many pleasant evenings1

β€” Greg Hurrell, paraphrasing Donald Knuth

Overview

Features

Dotfiles

A set of dotfiles that I've been tweaking and twiddling since the early 2000s (under version control since 2009). Characteristics include:

  • Sane Vim pasting via bracketed paste mode.
  • Write access to local clipboard from local and remote hosts, inside and outside of tmux (via Clipper).
  • Full mouse support (pane/split resizing, scrolling, text selection) in Vim and tmux.
  • Focus/lost events for Vim inside tmux.
  • Cursor shape toggles on entering Vim.
  • Italics in the terminal.
  • Bundles a (not-excessive) number of useful Vim plug-ins.
  • Conservative Vim configuration (very few overrides of core functionality; most changes are unobtrusive enhancements; some additional functionality exposed via <Leader> and <LocalLeader> mappings.
  • Relatively restrained Zsh config, Bash-like but with a few Zsh perks, such as right-side prompt, auto-cd hooks, command elapsed time printing and such.
  • Unified color-handling (across iTerm2 and Vim) via Base16 Shell.
  • Encrypted versioning of files with sensitive content (via git-cipher).
  • Comprehensive Hammerspoon config.

Homebrew

On macOS, the "homebrew" aspect installs a bunch of useful software.

Keyboard customization

On macOS, we use Karabiner-Elements, and on Linux, we use Interception Tools and a few other pieces to make the following changes:

  • Make Caps Lock serve as Backspace (when tapped) and Left Control (when chorded with another key). When held down alone, Caps Lock fires repeated Backspace events.
  • Make Return serve as Return (when tapped) and Right Control (when chorded with another key). When held down alone, Return fires repeated Return events.
  • Toggle Caps Lock on by tapping both Shift keys simultaneously.
  • Makes the function keys on my external Realforce keyboard behave like the "media" keys on Apple's keyboards.

And these only on macOS:

  • Swap Option and Command keys on my external Realforce keyboard.
  • Make the "application" key (extra modifier key on right-hand side) behave as "fn" on Realforce keyboard.
  • Map Control-I to F6 (only in the terminal) so that it can be mapped independently from Tab in Vim2.
  • Make "pause" (at far-right of function key row) behave as "power" (effectively, sleep) on Realforce keyboard.
  • Adds a "SpaceFN" layer that can be activated by holding down Space while hitting other keys; I use this to make the cursor keys available on or near the home row in any app.

Zsh

Functions

  • ag: Transparently wraps the ag executable so as to provide a centralized place to set defaults for that command (seeing as it has no "rc" file).
  • bounce: bounce the macOS Dock icon if the terminal is not in the foreground.
  • color: change terminal and Vim color scheme.
  • fd: "find directory" using fast bfs and sk; automatically cds into the selected directory.
  • fh: "find [in] history"; selecting a history item inserts it into the command line but does not execute it.
  • history: overrides the (tiny) default history count.
  • jump (aliased to j): to jump to hashed directories.
  • regmv: bulk-rename files (eg. regmv '/\.tif$/.tiff/' *).
  • scratch: create a random temporary scratch directory and cd into it.
  • tick: moves an existing time warp (eg. tick +1h); see tw below for a description of time warp.
  • tmux: wrapper that reattches to pre-existing sessions, or creates new ones based on the current directory name; additionally, looks for a .tmux file to set up windows and panes (note that the first time a given .tmux file is encountered the wrapper asks the user whether to trust or skip it).
  • tw ("time warp"): overrides GIT_AUTHOR_DATE and GIT_COMMITTER_DATE (eg. tw -1d).

Prompt

Zsh is configured with the following prompt:

Visible here are:

  • Concise left-hand prompt consisting of:
  • Extended right-hand size prompt which auto-hides when necessary to make room for long commands and contains:
    • Duration of previous command in adaptive units (seconds, minutes, hours, days, depending on duration).
    • Current version control branch name.
    • Current version control worktree status using colors that match those used in git status:
      • Green dot indicates staged changes.
      • Red dot indicates unstaged changes.
      • Blue dot indicates untracked files.
    • Full version of current working directory (again, abbreviating $HOME to ~).

Nested shells are indicated with additional prompt characters. For example, one nested shell:

Two nested shells:

Root shells are indicated with a different color prompt character and the word "root":

Nesting within a root shell is indicated like this:

Two nested shells:

If the last command exited with a non-zero status (usually indicative of an error), a yellow exclamation is shown:

If there are background processes, a yellow asterisk is shown:

Dependencies

  • tmux 3.2 or later.
  • Neovim v0.5.0 or later.
  • Relatively recent Zsh.
  • Relatively recent Git.
  • Clipper for transparent access to the local system clipboard.
  • On macOS, iTerm2 or Kitty. Additionally, only the latest one or two versions of macOS (at the time of writing, that means Sonoma) get actively tested.
  • Ruby.
  • Adobe Source Code Pro or any other fixed-width font that includes the Powerline glyphs.

Platform status

Platform Status
macOS πŸ₯‡ Currently the most tested platform, as well as the one with most aspects (because my daily driver is macOS 13 "Sonoma")
Debian(-ish) Linux πŸ₯ˆ I use this heavily at work, but in the somewhat odd Codespaces VM environment, so there are some weird assumptions at play
Arch Linux πŸ₯‰ Less tested, fewer aspects involved, but likely to evolve in the future as I'm using Arch Linux on my "leisure" desktop machine
Red Hat Linux and related (eg. CentOS) πŸ’€ Abandoned, but in the past (2011-2018) this was the distro I used full-time at work

Installation

Clone

Development occurs on the main branch, but to avoid inconvenience for people who previously cloned the repo when the master branch was the main line, the legacy branch is kept up-to-date via a pre-push hook (which updates the local branch) and a post-receive hook (which updates the remote).

macOS

git clone --recursive https://github.com/wincent/wincent.git

Arch Linux

sudo pacman -Syu
sudo pacman -S git ruby tmux vim
git clone --recursive https://github.com/wincent/wincent.git
  • git: In order to clone the repo.
  • ruby: So that git-cipher can run (also used to build Command-T).
  • tmux: Just for comfort (eg. so you can see scrollback).
  • vim: Because the nvim aspect needs Vim (it runs vim to do a :helptags update).

Install

⚠️ WARNING: There are lots of different things that can be installed or configured (see the aspects/ directory). Unless you want your machine to be exactly like mine β€” which is unlikely β€” you probably don't want to install everything. Maybe you don't even want everything in the "dotfiles" and "nvim" aspects. Please inspect the contents of each aspect before proceeding to install it; you may even be better off just looking at the configuration files and stealing the bits that you find interesting or useful (everything is in the public domain, unless otherwise indicated).

At the time of writing, these are the aspects, which you can expect to change over time (see the aspects/ directory for an up-to-date listing):

  • On macOS only:
    • automator: Scripts for use with Automator
    • automount: Sets up macOS's automount facility
    • backup: Backup scripts
    • cron: Sets up cron files
    • defaults: Sets up defaults (ie. preferences) on macOS
    • fonts: Installs Source Code Pro font files
    • homebrew: Installs and updates Homebrew
    • iterm: Dynamic profiles for iTerm
    • karabiner: Configures Karabiner-Elements (keyboard customization).
    • launchd: Configures launchd
    • nix: Installs packages via the Nix package manager.
    • node: Installs Node.js
    • ruby: Installs Ruby gems
    • ssh: Manages local SSH config
    • tampermonkey: Sets up UserScripts
  • On Linux only:
    • apt: Installs packages using apt-get.
    • aur: Installs packages from the Arch User Repository.
    • avahi: Manages the Avahi zeroconf ("Bonjour") networking daemon.
    • codespaces: Custom tweaks for GitHub Codespaces environments.
    • interception: Sets up Interceptions Tools (keyboard customization).
    • locale: Sets up /etc/locale.conf
    • pacman: Installs packages via the Pacman package manager
    • sshd: Manages sshd.
    • systemd: Set up services that run from systemd
  • On both macOS and Linux:
    • dotfiles: Creates symlinks in $HOME to the dotfiles in this repo
    • meta: Tests the configuration framework
    • shell: Sets the use shell to zsh
    • terminfo: Sets up terminfo database entries for italics and 256-color support
    • nvim: Configures Neovim and Vim

Examples

./install dotfiles nvim     # Just install "dotfiles" and "nvim" stuff.
./install dotfiles          # Just install "dotfiles".
./install dotfiles --step   # Prompt for confirmation at each step.
./install dotfiles --check  # Do a dry-run, showing what would be changed.
./install                   # Install everything.
./install ^homebrew         # Install everything except for the "homebrew" aspect.
./install --help            # Lists all aspects, descriptions, options.

This sets up a local Node environment using n, and then uses Fig to copy the dotfiles and configure the machine.

Note: Given that ~/.config/git/config is included with these dotfiles, any local modifications or overrides that you apply should be added to ~/.config/git/config.local instead; for example:

git config --file ~/.config/git/config.local user.name "John Doe"
git config --file ~/.config/git/config.local user.email [email protected]

Manual steps

As much as I would love this thing to be entirely automated, there are some manual steps that must typically be performed.

macOS
  • In iTerm, mark the "Wincent" dynamic profile as the default: Preferences β†’ Profiles β†’ Other actions... β†’ Set as Default
  • Set up full-disk access for iTerm: As described here, System Preferences β†’ Security & Privacy β†’ Privacy β†’ Full Disk Access (and make sure that iTerm.app is in the list with the checkbox checked).

Troubleshooting

General troubleshooting

There are a few useful ./install options:

# Run in "check" (dry-run) mode.
./install --check

# Show debugging information during the run.
./install --debug

# Confirm each task before running it (--step), and begin
# execution from a specific task (--start-at-task) in a
# specific aspect ("dotfiles").
./install --step --start='make directories' dotfiles

./install hangs on the first run

If running on a brand new OS install where you have never used sudo before, ./install may appear to hang after requesting your password. This is because sudo may show a "lecture"3 on first run that requires you to respond to a prompt. When running in the context of ./install, you never see this prompt, because sudo is running in a subprocess, which causes the run to hang.

To avoid this, one time only, run sudo -v before running ./install.

License

Unless otherwise noted, the contents of this repo are in the public domain. See the LICENSE for details.

Authors

The repo is written and maintained by Greg Hurrell <[email protected]>. Other contributors that have submitted patches include, in alphabetical order:

  • Anton Kastritskiy
  • Hashem A. Damrah
  • Joe Lencioni
  • Jonathan Wilkins
  • Keng Kiat Lim
  • Mark Stenglein
  • Matthew Byrne
  • Michael Lohmann
  • Stone C. Lasley
  • Victor Igor
  • Zac Collier

This list produced with:

:read !git shortlog -s HEAD | grep -v 'Greg Hurrell' | cut -f 2-3 | sed -e 's/^/- /'

Security

As of commit ec49be762ff3 ("feat(dotfiles): automatically sign commits on personal machines", 2022-06-19) and commit 97143b5d7635 ("feat(dotfiles): sign commits everywhere except codespaces", 2022-06-20), I started signing most commits in this and other repos with GPG keys corresponding to my work and personal email addresses.

GitHub will label such commits with a "Verified" badge. In order to see signature information using the git commandline executable, you would run commands such as git show --show-signature and git log --show-signature. Note that in order to be able to actually verify these signatures you need a copy of the corresponding public keys, otherwise Git will show:

gpg: Signature made Mon 11 Jul 2022 11:50:35 CEST
gpg:                using RSA key B0C9C204D656540BDCDA86229F6B84B5B1E9955E
gpg:                issuer "[email protected]"
gpg: Can't check signature: No public key

You can obtain the public keys with the following:

# Either, download directly given the key fingerprint as shown by Git:
gpg --keyserver pgp.mit.edu --recv-key C7C225A18975180C4485A1E070516DBB88E4F779
gpg --keyserver pgp.mit.edu --recv-key B0C9C204D656540BDCDA86229F6B84B5B1E9955E

# Or, chose from a list of possible matches returned by searching for an email address:
gpg --keyserver https://pgp.mit.edu/ --search-keys [email protected]
gpg --keyserver https://pgp.mit.edu/ --search-keys [email protected]

You can also grab the keys from GitHub, if you trust GitHub:

curl https://github.com/wincent.gpg | gpg --import

Once you have those, Git will instead show:

gpg: Signature made Mon 11 Jul 2022 12:28:32 CEST
gpg:                using RSA key B0C9C204D656540BDCDA86229F6B84B5B1E9955E
gpg:                issuer "[email protected]"
gpg: Good signature from "Greg Hurrell <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2F44 69E0 C1FA 72AA C0A5  60C9 6210 6B56 923F 3481
     Subkey fingerprint: B0C9 C204 D656 540B DCDA  8622 9F6B 84B5 B1E9 955E

What's going on here, cryptographically speaking?

  • GPG keys consist of public and private parts, often referred to as public keys and private keys (together, a "key pair"). As the names suggest, the owner of the key must keep the private part secret, but the public part can be freely shared.
  • Roughly speaking, "signing" something means using the private key to encrypt a hash of the contents of the document that is being signed (in this case, the "document" is a commit).
  • The public key can be used to decrypt the hash, which can then be compared against the contents to confirm that they match. This is what is happening when we see gpg: Good signature above; it means that the public key for Greg Hurrell <[email protected]> verifies that the signature was indeed created with the corresponding private key belonging to that address.
  • Because only the owner has access to the private key, only the owner can make signatures with it; but conversely, because everybody has access to the public key, anybody can verify those signatures.
  • GPG keys have two additional concepts: "subkeys" are keys associated with a primary key; and "usages" describe what role those keys each play (eg. "signing", "encryption").
  • In practice, the primary key is always a "signing" key, and GPG will create one "encryption" subkey by default. Users can add/remove additional subkeys and assign them usages.
  • I create "signing" subkeys for making signatures and I rotate them once per year (I keep my primary key "offline" so that it can't be hacked if my machine is compromised).

So those are the cryptographic primitives. The signature is "Good" in the cryptographic sense, but why the scary "WARNING"? It's because there's a whole other layer on top of this called the "web of trust". A good signature gives us the mathematical certainty that a particular private key was used to produce a given signature, but that tells us nothing about the human world that exists above and around that crypto. That is, the key was used to make the signature, but was it me who used the key? Am I really the handsome Australian man living in Madrid claiming to be Greg Hurrell, or am I in fact part of a clandestine criminal organization operating from a satellite-connected submarine in the Arctic sea?

The web of trust serves to link your human-level trust relationships to the underlying digital entities. By running gpg --edit-key $KEY and hitting trust, you can explicitly record your level of trust in any given key, and you can do things like going to "key signing parties" and such where you can physically meet people, verify their identity by whatever means you deem appropriate, and then sign one another's public keys. The accrued effect of these actions over time is to establish a web of connections where trust is transitively applied: if you trust A and A trusts B, then you in turn can also trust B. Having said all that, how to actually go about building a useful web of trust is beyond the scope of this README, and in all my long years on the internet, I've never once gone to a key signing event or otherwise engaged in activity that would help me integrate my keys into a useful web of trust.

Footnotes

  1. The evenings were spent with vi derivatives, not with Bill Joy. ↩

  2. This isn't needed on Linux because we can achieve the same via a Kitty configuration. ↩

  3. See man sudoers. ↩

wincent's People

Contributors

antonk52 avatar kengkiat avatar lencioni avatar matthewpbyrne avatar miallo avatar ocelotsloth avatar rv-vmartins avatar singularisart avatar stonelasley avatar wincent avatar zacacollier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wincent's Issues

Mixed behavior when holding down Caps Lock (Backspace/Control) and chording

The most obvious way to repro this visually is in tmux copy mode with a long scrollback buffer:

  1. Hold Caps Lock until repeating backspace kicks in.
  2. See cursor move backwards.
  3. Hit "u" periodically.
  4. See cursor continue to move backwards, but "page up" occurs whenever "u" is chorded.

I am not even sure what the behavior should be in this case. Either the "u" should be inserted literally, or the backspace repeat should stop and we should enter chorded mode.

Issues installing dotfiles etc

Hi Greg

Thank you for providing a comprehensive install.

I have a few problems on the install:

  1. the homebrew install failed with the following error:

TASK [homebrew : homebrew | bundle] ********************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["brew", "bundle"], "delta": "0:00:08.428571", "end": "2017-01-05 10:45:30.973068", "failed": true, "rc": 1, "start": "2017-01-05 10:45:22.544497", "stderr": "Error: No such file or directory - /usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions", "stdout": "Using caskroom/cask\nUsing caskroom/versions\nUsing homebrew/bundle\nUsing homebrew/core\nTapping homebrew/services\nUsing homebrew/versions\nUsing neovim/neovim", "stdout_lines": ["Using caskroom/cask", "Using caskroom/versions", "Using homebrew/bundle", "Using homebrew/core", "Tapping homebrew/services", "Using homebrew/versions", "Using neovim/neovim"], "warnings": []}
to retry, use: --limit @/Users/xxx/.ansible/darwin.retry

  1. the system preference failed at this point:

TASK [defaults : defaults | System Preferences -> General -> [Don't] Close windows when quitting an app] ***
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Type mismatch. Type in defaults: bool"}
to retry, use: --limit @/Users/xxx/.ansible/darwin.retry

  1. zsh error

/Users/xxx/.zshenv.d//maxfiles.zsh:ulimit:1: setrlimit failed: invalid argument

  1. Vim initialize error

Invalid expression: l:pair[1] in function variables#init

If you could help me with any of those, it would be much appreciated.

Many Thanks

Paul

Ansible failed

I tried the install, and it failed on this particular error.

TASK[homebrew: homebrew | bundle] ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
	fatal: [localhost]: FAILED! => {
		"changed": true,
		"cmd": ["brew", "bundle"],
		"delta": "0:00:18.502421",
		"end": "2017-09-21 22:12:43.861571",
		"failed": true,
		"msg": "non-zero return code",
		"rc": 1,
		"start": "2017-09-21 22:12:25.359150",
		"stderr": "Warning: Use neovim instead of deprecated neovim/neovim/neovim\nError: No available formula with the name \"srm\" ",
		"stderr_lines": ["Warning: Use neovim instead of deprecated neovim/neovim/neovim", "Error: No available formula with the name \"srm\" "],
		"stdout": "Using caskroom/cask\nUsing caskroom/versions\nUsing homebrew/bundle\nUsing homebrew/core\nUsing homebrew/dupes\nUsing homebrew/services\nUsing homebrew/versions\nUsing neovim/neovim\nUsing abook\nUsing ack\nUsing ant\nUsing aspcud\nUsing autoconf\nUsing automake\nUsing awscli\nUsing bdw-gc\nUsing berkeley-db\nUsing cabal-install\nUsing cairo\nUsing camlp4\nUsing chruby\nUsing clasp\nUsing clipper\nUsing cloc\nUsing cloog\nUsing closure-compiler\nUsing cmake\nUsing coreutils\nUsing cscope\nUsing ctags\nUsing dirmngr\nUsing elinks\nUsing emacs\nUsing ffmpeg\nUsing fontconfig\nUsing freetype\nUsing fswatch\nUsing fzf\nUsing gcc\nUsing gd\nUsing gdb\nUsing gdbm\nUsing gdk-pixbuf\nUsing gettext\nUsing ghc\nUsing gifsicle\nUsing git\nUsing glib\nUsing gmime\nUsing gmp\nUsing gnu-sed\nUsing gnupg\nUsing gnupg2\nUsing gnutls\nUsing go\nUsing gobject-introspection\nUsing gpg-agent\nUsing gringo\nUsing harfbuzz\nUsing highlight\nUsing htop-osx\nUsing httping\nUsing httrack\nUsing hub\nUsing icu4c\nUsing ievms\nUsing iftop\nUsing imagemagick\nUsing imapfilter\nUsing isl\nUsing isync\nUsing jemalloc\nUsing jpeg\nUsing jq\nUsing json-c\nUsing lame\nUsing less\nUsing lbdb\nUsing libassuan\nUsing libcroco\nUsing libevent\nUsing libffi\nUsing libgcrypt\nUsing libgpg-error\nUsing libksba\nUsing libmpc\nUsing libpng\nUsing librsvg\nUsing libtasn1\nUsing libtermkey\nUsing libtiff\nUsing libtool\nUsing libusb\nUsing libusb-compat\nUsing libuv\nUsing libvo-aacenc\nUsing libvterm\nUsing libyaml\nUsing libyubikey\nUsing links\nUsing lockrun\nUsing lua\nUsing macvim\nUsing makedepend\nUsing mariadb\nUsing memcached\nUsing mldonkey\nUsing mobile-shell\nUsing mpfr\nUsing msgpack\nUsing msmtp\nUsing mutt\nUsing neovim/neovim/neovim\nUsing nettle\nUsing nginx\nUsing node\nUsing notmuch\nUsing ocaml\nUsing ocamlbuild\nUsing openssl\nUsing [email protected]\nUsing optipng\nUsing ossp-uuid\nUsing pandoc\nUsing pango\nUsing par\nUsing pcre\nUsing perl\nUsing pinentry\nUsing pixman\nUsing pkg-config\nUsing pngquant\nUsing postgresql\nUsing potrace\nUsing protobuf\nUsing pstree\nUsing pth\nUsing pwgen\nUsing python\nUsing python3\nUsing qemu\nUsing qt\nUsing ragel\nUsing ranger\nUsing readline\nUsing reattach-to-user-namespace\nUsing redis\nUsing rhino\nUsing ripgrep\nUsing ruby-install\nUsing s3cmd\nUsing shared-mime-info\nUsing shellcheck\nUsing sqlite",
		"stdout_lines": ["Using caskroom/cask", "Using caskroom/versions", "Using homebrew/bundle", "Using homebrew/core", "Using homebrew/dupes", "Using homebrew/services", "Using homebrew/versions", "Using neovim/neovim", "Using abook", "Using ack", "Using ant", "Using aspcud", "Using autoconf", "Using automake", "Using awscli", "Using bdw-gc", "Using berkeley-db", "Using cabal-install", "Using cairo", "Using camlp4", "Using chruby", "Using clasp", "Using clipper", "Using cloc", "Using cloog", "Using closure-compiler", "Using cmake", "Using coreutils", "Using cscope", "Using ctags", "Using dirmngr", "Using elinks", "Using emacs", "Using ffmpeg", "Using fontconfig", "Using freetype", "Using fswatch", "Using fzf", "Using gcc", "Using gd", "Using gdb", "Using gdbm", "Using gdk-pixbuf", "Using gettext", "Using ghc", "Using gifsicle", "Using git", "Using glib", "Using gmime", "Using gmp", "Using gnu-sed", "Using gnupg", "Using gnupg2", "Using gnutls", "Using go", "Using gobject-introspection", "Using gpg-agent", "Using gringo", "Using harfbuzz", "Using highlight", "Using htop-osx", "Using httping", "Using httrack", "Using hub", "Using icu4c", "Using ievms", "Using iftop", "Using imagemagick", "Using imapfilter", "Using isl", "Using isync", "Using jemalloc", "Using jpeg", "Using jq", "Using json-c", "Using lame", "Using less", "Using lbdb", "Using libassuan", "Using libcroco", "Using libevent", "Using libffi", "Using libgcrypt", "Using libgpg-error", "Using libksba", "Using libmpc", "Using libpng", "Using librsvg", "Using libtasn1", "Using libtermkey", "Using libtiff", "Using libtool", "Using libusb", "Using libusb-compat", "Using libuv", "Using libvo-aacenc", "Using libvterm", "Using libyaml", "Using libyubikey", "Using links", "Using lockrun", "Using lua", "Using macvim", "Using makedepend", "Using mariadb", "Using memcached", "Using mldonkey", "Using mobile-shell", "Using mpfr", "Using msgpack", "Using msmtp", "Using mutt", "Using neovim/neovim/neovim", "Using nettle", "Using nginx", "Using node", "Using notmuch", "Using ocaml", "Using ocamlbuild", "Using openssl", "Using [email protected]", "Using optipng", "Using ossp-uuid", "Using pandoc", "Using pango", "Using par", "Using pcre", "Using perl", "Using pinentry", "Using pixman", "Using pkg-config", "Using pngquant", "Using postgresql", "Using potrace", "Using protobuf", "Using pstree", "Using pth", "Using pwgen", "Using python", "Using python3", "Using qemu", "Using qt", "Using ragel", "Using ranger", "Using readline", "Using reattach-to-user-namespace", "Using redis", "Using rhino", "Using ripgrep", "Using ruby-install", "Using s3cmd", "Using shared-mime-info", "Using shellcheck", "Using sqlite"]
	}
to retry, use: --limit @ / Users / priyankkapadia / .ansible / darwin.retry

PLAY RECAP ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
	localhost: ok = 18 changed = 1 unreachable = 0 failed = 1

Any ideas on this ?
After this i tried ./install again and it failed with "too many symlinks: bad interpreter error"

Ctrl-I stopped working as 'back' in vim

After the latest merge with upstream/master the Ctrl-I mapping stopped working as it was. Now it's acting as the TAB key again in vim.
How can I diagnose this issue?
I've got Hammerspoon launched, btw.

Ansible error after merging with upstream

Hello!

I've merged upstream/master today and running install or install -f immediately after sudo password gives the following output:

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/Users/macbook/wincent/roles/vim/tasks/main.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- import_tasks: bundle.yml
  ^ here


The error appears to have been in '/Users/macbook/wincent/roles/vim/tasks/main.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- import_tasks: bundle.yml
  ^ here

How can I fix this?

Spontaneous cd

Sometimes, Vim's :pwd mysteriously sets itself to ~/code/masochist/app.

When this happens, :echo $PWD still prints the old (expected working directory).

No idea what's happening here, but it's always that Masochist directory. Can't see how it could be an interaction with tmux, as this is a running Vim process that started off in the right place and later switched (ie. not associated with a new pane being created).

how could i change the vim color when the shell changed

i use your colors shell script and it works well.i saw your youtube video that show it can change both of vim and shell color.i find that color.vim in after/plugin and move it to my .vim/after/plugin.so when i type 'color dark tomorrow' in the iterm2 shell and it works in the shell.but the vim didn't change its color.
finally,i reopen the vim with 'vim' in the shell and the vim changed to the dark tomorrow.

so,how can i make it like the video you have done? many thanx.

Suggestion for toggling trailing whitespace listchar

I'm not sure if you would like this but I took your listchar setup and added this:

autocmd InsertEnter * set listchars-=trail:β€’
autocmd InsertLeave * set listchars+=trail:β€’

You're probably used to them showing up in insert mode now but I found it very unintuitive. I don't really think of a space as "trailing" until it's sitting there in normal mode.

Return events get eaten after a while

I don't know exactly when this started β€”Β it was either a Hammerspoon or a macOS upgrade β€” but I started seeing "return" keypresses get eaten a while back (some time within the last couple of months).

I wanted to add some logging to Hammerspoon to troubleshoot it, but β€”Β you guessed it β€”Β restarting Hammerspoon in order to activate the logging also fixed the issue. I had this happening reliably whenever I did a fast rollover like git st<CR>; basically that <CR> would get eaten and I'd have to do a separate <CR> down and up in order to run the command. I could repro it with 100% success. Added the logging, reloaded the Hammerspoon config (didn't even restart it) and the problem was gone.

So I may have to try and solve this by sheer logic and reasoning alone. Or I can add logging specific to the return key and just let it log for hours until the issue starts to manifest alone.

It is possible that there is no bug in the eventtap.lua module and it's the OS itself that is swallowing events. (For example, there could be some kind of queue or something that is getting full, and reloading the Hammerspoon process ends up freeing some port and draining or resetting the queue.) But regardless of where the bug lies, I need to come up with a mitigation because this is so darn annoying.

Trouble with tmux-256color when ssh'ing into remote hosts.

Any suggestions for how to workaround having an unrecognized terminal when ssh'ing into remote hosts? General consensus seems to be to copy and compile terminfo files on the remote host or setup an ssh alias along the lines of 'TERM=screen ssh'. Wondering if you have come upon any other options with your setup.

lbdbq produces lots of console spam

CoreData: warning: dynamic accessors failed to find @property implementation for 'uniqueId' for entity ABCDInfo while resolving selector 'uniqueId' on class 'ABCDInfo'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
CoreData: warning: dynamic accessors failed to find @property implementation for 'uniqueId' for entity ABCDContact while resolving selector 'uniqueId' on class 'ABCDContact'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
CoreData: warning: dynamic accessors failed to find @property implementation for 'uniqueId' for entity ABCDEmailAddress while resolving selector 'uniqueId' on class 'ABCDEmailAddress'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
CoreData: warning: dynamic accessors failed to find @property implementation for 'orderingIndex' for entity ABCDEmailAddress while resolving selector 'orderingIndex' on class 'ABCDEmailAddress'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
CoreData: warning: dynamic accessors failed to find @property implementation for 'address' for entity ABCDEmailAddress while resolving selector 'address' on class 'ABCDEmailAddress'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
CoreData: warning: dynamic accessors failed to find @property implementation for 'label' for entity ABCDEmailAddress while resolving selector 'label' on class 'ABCDEmailAddress'.  Did you remember to declare it @dynamic or @synthesized in the @implementation ?
CoreData: warning: dynamic accessors failed to find @property implementation for 'isPrimary' for entity ABCDEmailAddress while resolving selector 'isPrimary' on class 'ABCDEmailAddress'.  Did you remember to declare it @dynamic or @synthes

Search turns up these leads:

My attempts to repro:

  • Does repro with reattach-to-user-namespace lbdbq . in the terminal in tmux.
  • Does not repro with lbdbq . in the terminal in tmux (presumably because it is not getting far enough to talk to the address book API).
  • Does repro with lbdbq . in the terminal outside of tmux.
  • Does not repro in the YCM-powered autocomplete menu (it's true that stderr console messages would likely get swallowed and I wouldn't see them, but it is working, because I can see address book entries in the autocomplete); this works even in tmux.

Workaround for mutt to at least silence the log spew β€” pretty important, seeing as the log spew corrupts the display enough to actually interfere with the operation of the menu β€” is to apply this diff:

diff --git a/roles/dotfiles/files/.mutt/config/settings.mutt b/roles/dotfiles/files/.mutt/config/settings.mutt
index cdd55bf..bf3e6f6 100644
--- a/roles/dotfiles/files/.mutt/config/settings.mutt
+++ b/roles/dotfiles/files/.mutt/config/settings.mutt
@@ -42,7 +43,7 @@ set pager_format = '=%b %C/%m: %-20.20F   %s%*β€”(%P)'

 set pager_index_lines = 12
 set pager_stop = yes # Don't move to the next message when paging past the bottom of a message.
-set query_command="reattach-to-user-namespace lbdbq %s"
+set query_command="reattach-to-user-namespace lbdbq %s 2> /dev/null"
 set realname = 'Greg Hurrell'
 set reply_to = yes # Instead of asking, always reply to Reply-to:
 set resolve = no # Don't auto-advance to the next message after every single op.

Still doesn't get us address book entries in the menu, however.

Attempts at solving the issue with an ad hoc signing certificate didn't work. Haven't tried with a real (self-signed cert) as I suspect it is likely to be the same:

# Sign both executables:
# `-s -` uses an ad hoc signing certificate
codesign -f -s - --entitlements=lbdbq-entitlements.plist $(which reattach-to-user-namespace)
sudo codesign -f -s - --entitlements=lbdbq-entitlements.plist $(which lbdbq)

# Confirm entitlements are present:
# `-d` to display
# `--entitlements -` specifies the operation we want
codesign -d --entitlements - $(which lbdbq)

# Repro attempts:
reattach-to-user-namespace lbdbq $QUERY
lbdbq $QUERY

# Undo our shenanigans:
codesign --remove-signature $(which lbdbq)
sudo codesign --remove-signature $(which lbdbq)

I was using this entitlements file; not sure if it is even legit with so few fields (tool didn't complain at least):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.app-sandbox</key>
	<false/>
	<key>com.apple.security.personal-information.addressbook</key>
	<true/>
	<key>com.apple.security.personal-information.calendars</key>
	<true/>
</dict>
</plist>

Note I tried with and with sandbox, and with and without the calendars property.

Getting E254: Cannot allocate color

Installed with ./install in fresh macos sierra virtual machine.

Starting vim from iTerm gives the following error:

Error detected while processing function statusline#update_highlight:
line 27:
E254: Cannot allocate color guibg=#a7adba
E254: Cannot allocate color guibg=#a7adba

The color code depends on the color scheme loaded, which here corresponds to the base16-ocean
let g:terminal_color_12 = "#a7adba".

I am using the newest stable iTerm2 where "echo $TERM" gives "xterm-256color".

Recommend optimal locale settings for Linux in README?

I recently tried to pull down these configs on a fresh Arch Linux install but I experienced some erratic behavior / artifacts in my terminal. Tab-completion of files directories would cut into the prompt and corrupt the contents on the command line.

I gathered from reading this StackOverflow answer that it had to do with a bad locale.conf on my part - improperly setting LC_CTYPE=C - as I experienced issues elsewhere with Powerline, and ended up working around it by explicitly setting UTF-8 in my .zshrc.

I'm going to give it another shot after I update all LC_* variables to UTF-8 and report back with my results. Assuming that was the culprit, might be worth a mention in the README (I'd be happy to submit it if so). Also possibly a due consideration going forward in #7.

Make Vim command for inserting and updating discussion links

Given content in the header of a Markdown document like:


---
title: Betting on the wrong horse
tags: 1password lastpass
fb: https://www.facebook.com/glh/posts/10153077211406307
hn: https://news.ycombinator.com/item?id=10718146
reddit: https://www.reddit.com/r/programming/comments/3we95k/betting_on_the_wrong_horse/
twitter: https://twitter.com/wincent/status/675356737134694400

---

Produce or update the markup down the bottom of the document:

<small><em>Discuss: [Facebook](https://www.facebook.com/glh/posts/10153077211406307) - [Hacker News](https://news.ycombinator.com/item?id=10718146) - [Reddit](https://www.reddit.com/r/programming/comments/3we95k/betting_on_the_wrong_horse/) - [Twitter](https://twitter.com/wincent/status/675356737134694400)</em></small>

Make a mapping to open the current file in Diffusion

I already have one to open the module under the cursor. But if anything, a more common operation is to want to open the current file.

Related: may want a mapping to copy the Diffusion link to the clipboard (or when running on a remote host when open is not available).

Fix diff highlighting

This using Paul Irish's original colors (red bold 52/green bold 22):

diff-highlight-paul-irish

My subtle version, which got busted on the new machine and became too subtle (red 236 dim/green 236 dim):

diff-highlight-broken-on-el-capitan

Fixed to roughly match what I had prior to the new machine (red 238/green 238):

diff-highlight-fixed-on-el-capitan

Made a little more obvious with the use of bold (red bold 238/green bold 238):

diff-highlight-enhanced-on-el-capitan

Error when using tmux

Setting unbind-key -t vi-copy MouseDragEnd1Pane line 86 in .tmux.conf it look like not working on Linux environment (Ubuntu 16.04).

Handle non-existent downstreams in ds script

We'll fail in the update method if the downstream doesn't already exist. Should be able to detect that with this:

$ fjs status some-project --site=some-site
[Error: Not an fjs project]
zsh: exit 1

runtimepath order is different in nvim

In Vim, we have (truncated):

/Users/glh/.vim
/Users/glh/code/wincent/roles/dotfiles/files/.vim/pack/bundle/start/vim-textobj-user
/usr/local/share/vim/vimfiles
/usr/local/share/vim/vim80
/usr/local/share/vim/vimfiles/after
/Users/glh/.vim/after
/Users/glh/code/wincent/roles/dotfiles/files/.vim/pack/bundle/start/indentLine/after

In Neovim:

/Users/glh/.config/nvim
/etc/xdg/nvim
/Users/glh/.local/share/nvim/site
/usr/local/share/nvim/site
/usr/share/nvim/site
/usr/local/Cellar/neovim/0.2.0/share/nvim/runtime
/usr/share/nvim/site/after
/usr/local/share/nvim/site/after
/Users/glh/.local/share/nvim/site/after
/etc/xdg/nvim/after
/Users/glh/.config/nvim/after
/Users/glh/code/wincent/roles/dotfiles/files/.vim/pack/bundle/start/base16-vim
/Users/glh/code/wincent/roles/dotfiles/files/.vim/pack/bundle/start/indentLine/after

Which means that:

  • System files are coming before bundled files.
  • The vim-json plug-in runs after the runtime version from $VIMRUNTIME.
  • It therefore does nothing (only the first one to run wins), and the $VIMRUNTIME one is broken with respect to conceal.

Works fine in Vim.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.