Also change the only other use of PPage (i.e. PageUp) to PgUp. PageUp
and PageDown would probably be nicest, but I like that PgUp and PgDn are
of equal length. I dislike NPage and PPage.
WinResized was introduced rather recently with vim patch 9.0.0917 /
neovim v0.9.0 via commit 4571ba4d0a52 ("vim-patch:partial:9.0.0917: the
WinScrolled autocommand event is not enough (#21161)").
From :h :Man:
> when running `man` from the shell and with that `MANPAGER` [='nvim
> +Man!'] in your environment, `man` will pre-format the manpage using
> `groff`. Thus, Nvim will inevitably display the manual page as it was
> passed to it from stdin. One of the caveats of this is that the width
> will _always_ be hard-wrapped
Since I actually don't like `g:man_hardwrap=0`/`MANPAGER=999` (e.g.
scrolling can be a mess with very long wrapped lines), add an
autocommand that is meant to reload the manpage through `:edit` after
every resize, so that its hard-wrapping adjusts to the new size.
This is slightly hacky, but does its job quite well.
Move the man.vim into after/ftplugin so that it overwrites the `set
wrap` of the global ftplugin, which I want turned off, since it messes
with the buffer shortly when resizing.
man(1) will assume it can use the full width of the terminal when
hard-wrapping the lines. When signcolumn is enabled the width is one
cell smaller and thus, lines that have a character in the last column
will be wrapped by vim (i.e. almost all of them).
> Lightning fast left-right movement in Vim.
>
> An always-on highlight for a unique character in every word on a line
> to help you use `f`, `F` and family.
Link: https://github.com/unblevable/quick-scope
My brain assumes that the first block handles the case of the url being
an https one if I read http in the condition. Swap them and negate the
condition for better readability.
This might be a symptom of this condition being to complex, but well -
it's shell scripting ¯\_(ツ)_/¯
Apparently there was an issue with the conversion from ssh to https
which I never noticed? The script would replace the colon of the
`https://` and not the one after the domain:
https///github.com:[...]
I rewrote both cases in a simpler way while fixing the issue.
This change was laying in a big WIP commit for ages now, waiting for me
to split and commit it nicely. The author date is thus quite far back in
the past.
I sometimes work in files where I cannot remove trailing whitespaces (at
least not permanently). In these cases the background highlighting of
them is quite strong and can be a bit annoying. To make this more
pleasing, use the foreground to highlight trailing characters, as long
as tabs and trailing spaces are displayed as non-space characters.
For this I also set `trail` in `&listchars`, and while at it, merged the
two lines setting `&listchars` and cleaned up some comments.
Use the `s` flag, so that the position before the last jump is updated
automatically.
Use `<Cmd>` so that both normal and visual mode mappings become
identical and can be merged. This has the added benefit that it now also
maps in operator-pending mode.
Complete the TODOs.
vi-kill-word does not exist. This change was lying around uncommitted
for ages now.
Fixes: 658797bda2 ("zsh:keys: Use `vi-` variants of navigation binds")
Apparently on older neovim versions, passing the name of script-local
functions to `timer_start` is not enough (in v0.10.2 this works, but
v0.7.2 not). Fix this by wrapping it in `function(...)` to pass a
Funcref.
See :h timer_start:
> timer_start({time}, {callback} [, {options}])
> [...]
> {callback} is the function to call. It can be the name of a function
> or a |Funcref|. [...]