> This Vim plugin provides text objects for comments.
>
> `ac` selects a comment including the comment delimiters and `ic`
> selects just the comment content. (There's also a third text object,
> `aC`, which selects a comment including trailing or leading
> whitespace.) These mappings are available in Visual and
> Operator-pending mode.
>
> This plugin uses the `comments` and `commentstring` settings to
> determine what a comment looks like for a given filetype. It works
> with both `/* paired */` and `// simple` comment delimiters.
>
> This plugin depends on the textobj-user plugin.
Add an alias that switches directories into the repository root, instead
of having the normal `cd` command behave like that.
Sadly this is not possible (AFAIK) with a git alias as that will always
spawn a subshell.
Before, the commit-msg hook would not catch too long lines when
squashing commits, as the provided message starts immediately with a
commented line.
Instead of simply using all lines until the first comment, use all lines
until git's cut-line and remove all commented lines in between.
Do not hard-code git's commentary character but rather use
`core.commentChar`. `auto` is depending of the context interpreted as
'any character' or `#`.
When using the zettel as a commit message this is also convenient as git
will ignore everything behind it. (Which also means that all horizontal
rulers in a zettel should use atleast 4 dashes)
- Drop the mapping for `:Gcd` as I rarely use it and prefer to commit
with one keystroke less.
- Add the current file instead of calling `git add -p` for the whole
repository. If I want to add hunks I can do that with the gitgutter
mappings.
- Add mappings to stash and checkout the current file.
- Use mnemonic 'add' instead of 'stage' for `GitGutterStageHunk`
mappings.
TODO: Extend gitgutter for a `GitGutterStashHunk` function
Do not automatically restore missing <EOL> at EOF when writing.
This is rarely a change worth committing and I'd rather prefer vim to
not touch stuff I did not actively modify myself.
zshcompsys(1):
> The function bashcompinit provides compatibility with bash's
> programmable completion system. When run it will define the functions,
> compgen and complete which correspond to the bash builtins with the
> same names. It will then be possible to use completion specifications
> and functions written for bash.
Instead of exec-ing the tmux process, run it normally and exit
afterwards. Otherwise the zlogout is not read as mentioned a couple of
lines above and in `zsh(1)`:
> However, if the shell terminates due to exec'ing another process, the
> logout files are not read.
When connected over ssh and attaching to/creating a tmux session, the
shell should `exec` the tmux command so that detaching from the session
automatically also closes the ssh connection.
If something should happen and the `tmux` command bricks the remote
shell this can fixed by logging in with:
ssh [destination] zsh -dfi
Escape slashes in the branch name before passing it to `mktemp`.
Otherwise it would complain with:
mktemp: invalid suffix [...], contains directory separator
Add description in one sentence and use cases for this.
Remove sentence about removing `TEMP_DIR` that is outdated since:
5a8b5ffd21 ("git:checkout-worktree: Use `mktemp` template")
Use a template that directly includes the repository name and the branch
checked out. This makes finding and deleting the worktree directory if
anything goes wrong a lot easier.
Checkout the worktree directly in the temporary directory. With that
`TEMP_DIR` becomes obsolete.
Fix the exit condition when the function is called outside of a git
repository.
Use zsh's `:t` History Expansion Modifier, as `$?` does not keep `git
rev-parse`'s exit code, but rather `basename`'s.
This reverts commit 54d716510b ("git: Drop function in `spull`").
I apparently oversaw the use of arguments passed to `git pull`. This
makes the function necessary.
This contradicts a bit what I wanted in
1497fe3ed4 ("meta:install: Link all files in .ssh/"):
> This way potential new files in `.ssh/` do not have to be tracked
> manually.
as now, even though they do not have to be tracked manually in the
install.conf.yaml, that is the case for the .gitignore
But the consequences of private keys being pushed by accident (even
though not the entire folder is symlinked) are far greater than
potentially missing a symlink, making this a sensible step.
(And the overhead of adding one file is much smaller in the .gitignore)
Link all files on installation, even though currently there is only the
one config file. This way potential new files in `.ssh/` do not have to
be tracked manually.