Permalink
Branch: master
Commits on Feb 6, 2019
  1. vim: add shortcut for replacing in all files in quickfix list

    gibfahn committed Feb 6, 2019
    Makes interactive find/replace much easier.
  2. gibrc: use notion for node, add <Alt>-. shortcut

    gibfahn committed Feb 6, 2019
    Alt-. shortcut is the bash default for `!$`.
    
    Notion is an interesting new cli tool for managing node installs.
Commits on Feb 4, 2019
  1. vim: improve ripgrep function, add cfdo shortcut

    gibfahn committed Feb 3, 2019
    An easier way to do find/replace interactively in projects.
    
    Refs: https://www.tandrewnichols.me/fzf-ripgrep-cfdo-magic/
Commits on Feb 3, 2019
  1. vim: add yaml LSP settings and <Leader>f visual search

    gibfahn committed Feb 3, 2019
    <Space>f to recursive grep word under cursor is rather nice, especially
    with <C-a> to select all matches (and populate Quickfix from them).
Commits on Feb 2, 2019
  1. git: clean up submodule commands

    gibfahn committed Feb 2, 2019
    Remove "nuke" command, instead have shortcuts for the standard submodule
    commands.
  2. kakoune: update kakrc for v2019.01.20, add plugins

    gibfahn committed Feb 2, 2019
    - Easymotion plugin is currently not working.
    - LSP works well for Rust, haven't tried it for other things.
    - Slow to startup compared with current kakrc:
      ```console
      $ time kak -e q
      kak -e q  0.24s user 0.23s system 105% cpu 0.448 total
      $ time kak -n -e q
      kak -n -e q  0.01s user 0.00s system 78% cpu 0.013 total
      ```
Commits on Jan 22, 2019
Commits on Jan 21, 2019
  1. gibrc,git: make fzf C-g shortcuts full height, fix git smh and cn

    gibfahn committed Jan 21, 2019
    - `g smh` had a problem where the while loop runs once even if there is
      no output, as the herestring appends a newline. Fix that and also
      clean submodules.
    - Previous change to `g cn` was totally wrong.
    - fzf shortcuts are nicer when you have more room to work with them.
  2. cargo: add more aliases to cargo config

    gibfahn committed Jan 21, 2019
    Might as well alias everything I use.
Commits on Jan 20, 2019
  1. cargo,gibrc: add `c ta` and `c tar` commands

    gibfahn committed Jan 20, 2019
    Add an easy way to run all tests (even ignored ones).
    
    Also documents the keyboard shortcuts to fzf.
  2. git: submodule, stash, clean, remoteOrg fixups

    gibfahn committed Jan 20, 2019
    - Make remoteOrg handle ssh urls as well as https ones.
    - Clean up quote-string a little.
    - Remove unneeded -d from `g cn` (implied by -ff).
    - Add cnm to only clean submodules.
    - Remove --recurse-submodules from `g co` as it sometimes causes the
      checkout to fail (possible git bug). Add explicit `g com` instead.
    - Fix typo in `g pa` commands.
    - Add `g sm` for submodule shortcuts.
    - Improve `g smh to cover more cases.
    - Add a `g smn` to nuke submodules completely.
    - Add `g sms` for syncing submodule updates.
    - Make `git stash show` show the diffs like `git show`.
  3. gibrc: remove colour variables from `env` output

    gibfahn committed Jan 20, 2019
    - Don't export `$LS_COLORS` and `$LSCOLORS` for ls, just have them as
      local variables (visible with `set`) and pass them to ls in the alias.
    - Don't export the `$LESS_TERMCAP_*` variables, as they color the output
      of `env`. Instead generate a lesskey file and write them there in a
      setup script. Don't do this for the `$LESS` variable, because it's
      worth having those settings visible in the environment (IMO).
    - Remove the BLUEMIX_HOME setting as I'm unlikely to use that again.
    - Remove the nvm special-casing for non-x86 platforms.
    
    Refs: https://unix.stackexchange.com/questions/328597/how-to-make-lesskey-terminal-independent
    Refs: https://unix.stackexchange.com/questions/108699/documentation-on-less-termcap-variables
    Refs: https://linux.die.net/man/1/lesskey
Commits on Jan 17, 2019
  1. gibrc: make c alias cargo, add cargo config

    gibfahn committed Jan 17, 2019
    `alias c=clear` is a bit pointless, as Ctrl-L works for clear already.
    
    Given the built-in aliases, this gives you:
    - `c b` -> `cargo build`
    - `c r` -> `cargo run`
    - `c t` -> `cargo test`
    - `c br` -> `cargo build --release`
    - `c rr` -> `cargo run --release`
    - `c tr` -> `cargo test --release`
    - `c c` -> `cargo check`
    - `c h` -> `cargo help`
Commits on Jan 16, 2019
  1. mac: add dark theme for slack

    gibfahn committed Jan 16, 2019
  2. Add tab numbers to tabs, add ⌘-e to open scrollback in nvim

    gibfahn committed Jan 16, 2019
    Need to sort out parsing the ansi escapes in nvim before the latter is
    particularly useful.
  3. git add hooksPath, update submodules on `g co`

    gibfahn committed Jan 16, 2019
    Adds a post-commit hook to look for TODO(`uname`): lines in the source.
  4. gibrc/vimrc: update fzf and python3_host_prog

    gibfahn committed Jan 16, 2019
    Make Alt-c work the same way as the other fzf commands.
    
    Adding the python3_host_prog saves a fair amount of startup time.
Commits on Jan 6, 2019
  1. vimrc: update statusline, undo, surround, indentation

    gibfahn committed Jan 6, 2019
    - Add lightline (pretty statusbar)
    - Change Gundo to Mundo (updated fork).
    - Add vim-textobj-line (`il` and `al` line motions).
    - Add vim-sleuth to automatically work out file indentation.
    - Improve surround workaround [0][].
    - Delay enabling deoplete as nvim startup is slow [1][]
    - Fix $MYVIMRC sourcing with lightline [2][].
    
    [0]: https://vi.stackexchange.com/questions/16565/reclaim-cursor-shape-in-operator-pending-mode-neovim-while-using-vim-surround
    [1]: neovim/neovim#5728
    [2]: https://github.com/itchyny/lightline.vim/pull/103/files
  2. git: add useful commands and fix `g fp`

    gibfahn committed Jan 6, 2019
    Sometimes `git branch -u up` works, sometimes it fails. Either way we
    really mean `git branch -u up/HEAD` (resolving HEAD to the default
    upstream branch).
    
    Add commands:
    - `remoteOrg`: get the GitHub org for a remote.
    - `defaultBranch`: get the default branch for a remote.
Commits on Jan 2, 2019
  1. gibrc: fix ^-r fzf history shortcuts

    gibfahn committed Jan 2, 2019
    The shortcut got overwritten by my vim zsh setup.
    
    Now all the shortcuts are working, including ^-t for file search and ⌥-c
    to cd to dir.
  2. setup: reduce logging on update

    gibfahn committed Jan 2, 2019
    Also fix bug in update() function.
Commits on Jan 1, 2019
  1. gibrc,setup: run shellcheck, refactor, cleanup

    gibfahn committed Jan 1, 2019
    Lots of small cleanups.
    
    Gibrc:
    
    - Unset variables that were accidentally passed through to the user's
      shell.
    - Check that it works with ksh (macOS ksh93).
    - Fix completion scripts that weren't working (except fzf, IDK what's up
      With that).
    - Fix `rv` function for both zsh (including quoted arguments, see [0][])
      and bash.
    - Return early for unsupported shells.
    - Add a common way to bulk-source files.
    - Group aliases by function.
    - Remove things I haven't used for ages (e.g. ancient ksh workarounds
      and AIX/s390 stuff).
    
    Other:
    
    - Run shellcheck on all the files changed in this commit.
    - Use an array for apt_list in ubu.sh
    
    [0]: http://mywiki.wooledge.org/BashFAQ/050
  2. vimrc: add custom snippet for todos

    gibfahn committed Jan 1, 2019
    Minor tweaks to vimrc.
Commits on Dec 31, 2018
  1. vimrc: add UltiSnips and vim-snippets

    gibfahn committed Dec 31, 2018
    Adds plugins to enable code snippet insertion.
    
    Currently mapped to:
    - <CR>: Use enter to insert a snippet
    - <Down>/<Up>: Use the arrow keys to cycle between snippet insertion
      points.
    
    Refs: SirVer/ultisnips#376
Commits on Dec 30, 2018
  1. vimrc, zsh: improve plugin handling, reinstate kj

    gibfahn committed Dec 30, 2018
    - Automatically install vim-plug if it isn't already installed [0][].
    - Have vim check the nvim autoload directory (avoids symlinks).
    - Always load all the plugins, just don't enable vim ones on nvim (and
      vice-versa). This means `:PlugClean` doesn't try to remove them [1][].
    - Make <Tab> toggle the completion menu or indent smartly
      (:h deoplete#manual_complete())
    - Move the vim-surround shortcuts operator-pending shortcuts so neovim
      shows the _ cursor while the operator is pending [2][].
    - Slightly improve printing in the link script.
    - Improve the shortcut to quickly close the LanguageClient-neovim preview
      windows [3][].
    - Add shortcuts to close the windows around you with d<C-h/i/j/k> [3][].
    
    ---
    
    This also tries to come to an optimal solution for the <Esc> problem in
    zsh and vim. Basically when you run a terminal inside vim or nvim,
    <kbd>Esc</kbd> can have to meanings:
      1. Go to zsh normal mode
      2. Go to (n)vim normal mode
    
    My solution is to use <kbd>Esc</kbd> for (n)vim normal mode, and to
    reinstate kj for zsh normal mode. Outside (n)vim, <kbd>Esc</kbd> still
    works for zsh normal mode. This is ideal because kj in zsh adds only a
    0.1s delay if you hit k and then wait, but in (n)vim it takes longer. In
    general it makes more sense to remap <kbd>Esc</kbd> to be closer, than
    to use `kj`, as <kbd>Esc</kbd> is still a single key.
    
    [0]: https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation
    [1]: https://github.com/junegunn/vim-plug/wiki/tips#conditional-activation
    [2]: https://vi.stackexchange.com/questions/16565/reclaim-cursor-shape-in-operator-pending-mode-neovim-while-using-vim-surround
    [3]: autozimu/LanguageClient-neovim#645
Commits on Dec 29, 2018
  1. macOS: fix setup shorcut defaults checking with \ inputs

    gibfahn committed Dec 29, 2018
    Sometimes `defaults read` doubles the number of backslashes it shows,
    leading to a situation where every time you run the update script it
    doubles the number of backslashes in the shorcut string.
    
    Fixes compatibility with /usr/bin/sed on macOS, as the builtin sed has
    no support for character classes like `\s` or `\W`.
Commits on Dec 27, 2018
  1. vimrc: use echodoc plugin, always show gutter

    gibfahn committed Dec 27, 2018
    The echodoc plugin shows you the function signature of what you're
    typing as you type it. Using experimental APIs in nvim 0.3.2 (currently
    in prerelease) you can display it next to the cursor.
    
    Always show the gutter so it doesn't keep popping in and out.
    
    Increase the memory given to the java language server, hopefully this
    will make it faster.
  2. zsh: cursor is underline while command is running

    gibfahn committed Dec 27, 2018
    Also clean up some of the cursor functions.
  3. kitty: fix copy shortcuts

    gibfahn committed Dec 27, 2018
    They were still all set to "Copy Line" somehow.
  4. gibrc: change unprompt/reprompt -> nop/yep

    gibfahn committed Dec 27, 2018
    Quicker to type, and I end up using these a lot, e.g. for console syntax
    markdown blocks.
  5. vimrc: <C-w> goes to terminal-normal mode

    gibfahn committed Dec 27, 2018
    Double <Esc> is a pain to hit, whereas <C-w> is pretty easy. This does
    break using <C-w> in the terminal (to delete a word) though, so I'll
    probably need to change this later.
    
    Refs: https://vi.stackexchange.com/questions/16565/reclaim-cursor-shape-in-operator-pending-mode-neovim-while-using-vim-surround
Commits on Dec 17, 2018
  1. macOS: add shadowfox to Brewfile

    gibfahn committed Dec 17, 2018
    Dark theme for Firefox (removes the white flash when loading new tabs,
    darkens about: pages etc.).
Commits on Dec 14, 2018
  1. vimrc,gibrc: remove kj -> Esc mappings

    gibfahn committed Dec 14, 2018
    Use <kbd>Esc</kbd><kbd>Esc</kbd> to go to normal mode in terminal mode,
    and a single <kbd>Esc</kbd> to go to normal mode in the shell (inside
    vim).
    
    Answer to the <kbd>Esc</kbd> key being too far away is to map it nearer,
    having to press two keys every time is a pain, and it makes typing
    commands that end in `k` annoying.