Commit Graph

1609 Commits

Author SHA1 Message Date
859337e9c0 vim:au: Defer selection highlighting by 100ms too
This makes moving the cursor in visual mode more responsive.
2024-10-31 23:20:44 +01:00
3cdb9d6902 vim:au: Stop timer too when clearing cword highlight
When deleting the cword match, any running timer should stop too so that
the highlighting does not restart. This had led to some weird flickering
bug.
2024-10-31 23:18:32 +01:00
1ffd31d585 zsh:keys: Use (A) flag instead of hack to split LBUFFER
This way better solution using the `(A)` flag was given to me in the
zsh-users mailing list back in 2022 but I forgot to apply it.

See zshexpn(1):

> Convert the substitution into an array expression, even if it
> otherwise would be scalar.

Thanks Mikael!

Link: https://www.zsh.org/mla/users/2022/msg00668.html
2024-10-30 16:19:58 +01:00
d87d2cfee5 vim:NrrwRgn: Don't let splits take full width
The default setting of `g:loaded_nrrw_rgn` is `topleft` which opens the
split at the very top/far left and makes the window have full
width/height. This is very annoying when narrowing multiple splits.
2024-10-30 15:53:28 +01:00
c7aae00e65 glog: Use core.pager also for Enter action 2024-10-30 15:53:28 +01:00
2a4812a740 vim:ftplug:qf: Disable spell checking 2024-10-30 13:12:53 +01:00
bdd25e579b vim:plugs: Add NrrwRgn (narrow region)
> This plugin is inspired by the Narrowing feature of Emacs and means to
> focus on a selected region while making the rest inaccessible. You
> simply select the region, call :NR and the selected part will open in
> a new split window while the rest of the buffer will be protected.
> Once you are finished, simply write the narrowed window (:w) and all
> the changes will be moved back to the original buffer.

I want this to be able to diff two portions of a file without the need
of creating temporary files. (And the ability to automatically bring
back changes sounds nice too.)

Link: https://github.com/chrisbra/NrrwRgn
2024-10-30 13:12:35 +01:00
19fc37299a git:https-and-ssh: Make POSIX-shell compliant
Don't know why this had two shebangs and how I never noticed.
Apparently I only launched the script through the autoloaded
function in zsh.
2024-10-30 10:52:01 +01:00
4d32370ba2 glog: Use git's core.pager
This way diff-so-fancy can easily be replaced/customized.
2024-10-30 10:52:00 +01:00
0cf0bdf82a zprofile: Clear LESS before setting
I just checked on an open shell and noticed that LESS contained what I
meant to put in thrice. Don't know if that has something to do with
tmux, but apparently the zprofile is sourced multiple times? - good to
know.
2024-10-30 10:52:00 +01:00
c608700199 vim:aucmd: Highlight selection on linewise v-mode
I assumed that the selection will always be one character long when the
ModeChanged event is triggered. This is not the case when entering
linewise visual mode.

Fixes: b0688da69e ("vim:aucmd: Do not highlight selection on
       ModeChanged")
TODO: There are more ways of triggering ModeChanged to visual mode with
      a selection of more than one character (e.g. `[count]v`).
2024-10-28 21:16:29 +01:00
c011f2ed6a vim:setts: Don't auto-open folds when searching
This makes it a lot easier to restrict the search (besides searching in
visual selection, which is quite limited). The cursor will still land on
the closed fold but only once, independent of the number of hits inside
of the fold.
2024-10-28 16:59:03 +01:00
4d93db3947 vim: Keep only one timer for checktime
Every time the file was sourced, a new timer was created.
2024-10-27 19:11:12 +01:00
12e14673bd vim:aucmd:TODO: CursorMoved != SelectionChanged
There are operations that change the visual selection without moving the
cursor (e.g. `viw` when on the last character). These do not trigger
CursorMoved so the highlighting also does not change.

TODO: <COMMIT>
2024-10-27 19:11:12 +01:00
714a6cd120 vim:aucmd: Specify what highlight to clear
There shouldn't be highlights of the other kind (cword <-> visual)
around.
2024-10-27 19:11:12 +01:00
b0688da69e vim:aucmd: Do not highlight selection on ModeChanged
Do not call HighlightVisualSel when the mode changes to visual mode, as
then the selection is still only one character long, which I rarely want
to highlight. If I do I can still move the cursor forth and back once.

TODO: Are there situation where ModeChanged is triggered and the
      selection is immediately longer than one char without triggering
      CursorMoved?
2024-10-27 19:11:12 +01:00
2a1346e74e vim:aucmd: Abort cword highlighting earlier
When we're still on the same word, the highlighting can be just kept as
is without starting a new timer.
2024-10-27 19:11:07 +01:00
fe429942a1 mime: Set firefox as default browser 2024-10-22 19:37:45 +02:00
d2f685cc8b *: Adjust pictures folder outside user-dirs.dirs
I have these changes since ages ago but never committed them apparently.

Fixes: 1e3aa5108e ("xdg-user-dirs: Move media folders into `~/media/`")
2024-10-22 19:21:46 +02:00
686a69fedf zprofile: Add Go and Perl related dirs to PATH 2024-10-22 19:15:59 +02:00
92077b75bc zprofile: Set TERMINAL=st
This is used by xdg-open and similar.
2024-10-22 19:15:06 +02:00
2056bf2bea mime: Add mimeapps.list
Is used by xdg-open(1) and such to look up default applications for a
mimetype of a given file.

Link: https://wiki.archlinux.org/title/XDG_MIME_Applications
2024-10-22 19:02:04 +02:00
4ec1e81873 feh: Use theme configuration file instead of alias 2024-10-22 19:01:45 +02:00
e85f13def7 zsh:alias:feh: Add --start-at flag
I found this in feh's .desktop file and liked the idea:

With `--start-at` feh will load all files from the directory of the
given file and start the filelist at the given one.

This of course breaks easily if I want to pass more flags before the
file argument, but is easily fixed by first specifying the argument to
`--start-at` and continuing with the rest. I also rarely use any flag
besides the one already defined in the alias.
2024-10-22 18:46:14 +02:00
626855ec69 vim:keys:TODO: Add <leader>[hl] v-mappings
TODO: <SUBJECT>
2024-10-21 17:19:52 +02:00
79977eb81f tmux: Unbind <prefix> + arrow keys
I don't use them.
2024-10-21 17:14:17 +02:00
92289052ca tmux: Make <prefix>[hjkl] not repeatable
This is more than often annoying. For example when switching from a fzf
pane to a vim pane (i.e. needing these bindings instead of `C-[hjkl]`)
and then trying to move the cursor.

Reverts: 048933e67d ("tmux: Make `<prefix>[hjkl]` bindings repeatable")
2024-10-21 17:14:17 +02:00
96ebc4e824 vim:spf:en: Add 'lockdown' 2024-10-19 18:12:08 +02:00
ce13d89c5b *: Remove accidentally added file
I accidentally staged a temporary file in b61894fcc9
("vim:ftplug:gitcommit:TODO: Adjust subject length limit").
2024-10-19 18:10:53 +02:00
f4d3a4364b vim:xdg: Fix updating spellfile through modeline
Setting `&spellfile` from the modeline is not allowed and will result in
an `E523: not allowed here` error. Fix the updating of the file by
additionally having an autocommand on BufWinEnter (i.e. after the
modeline was read).

TODO: Also get rid of the error message when rereading the modeline (:e)
2024-10-19 17:57:47 +02:00
d142200a6c dircolors: Recognize README.wiki.md as README 2024-10-18 17:32:33 +02:00
f9764de6d5 vim:keys:TODO: Handle errors when referencing commits 2024-10-18 16:13:36 +02:00
09f9ffbd8e vim:ftplug:gitcommit: Abbreviate buffer-locally
Abbreviate `cq` only in the current buffer (i.e. the commit message).
2024-10-18 16:13:36 +02:00
890c8526ee vim:ftplug:gitcommit: Abbreviate cq to %d | x 2024-10-18 16:13:36 +02:00
91be5135eb tmux: Remove completed TODO
Fixed: 7dcd00058f ("tmux:TODO: Do not modify selection when
scrolling")
Fixed-by: aa901099b0 ("tmux: Use C-[ey] for scrolling with the wheel")
2024-10-18 16:13:35 +02:00
3e9dcaff9d tmux: Paste primary selection with middle mouse
Similar to everywhere else, paste the primary X selection (XA_PRIMARY)
instead of the most recent tmux paste buffer.

TODO: Forward event to 'root' key-table to prevent code duplication
2024-10-18 16:13:35 +02:00
012d913901 tmux: Get rid of "Not in a mode" error
The copy command should only be executed when not in a mode (i.e.
alternate?). This gets rid of the error message "Not in a mode" when
double/triple clicking inside of vim etc..
2024-10-18 16:13:35 +02:00
37cb526728 tmux: Unbind default DoubleClick bindings
When switching to the 'SecondClick' event in 4b8e877305 ("tmux: Use
SecondClick instead of DoubleClick event"), I forgot to add an `unbind`
of the default binding that was previously overwritten. Since I just
resourced my config I didn't notice.
2024-10-18 16:13:35 +02:00
b61894fcc9 vim:ftplug:gitcommit:TODO: Adjust subject length limit 2024-10-16 14:57:38 +02:00
28fe5de626 vim:spf:en: Add 'endianness', 'globbing' & 'zsh' 2024-10-16 14:53:39 +02:00
2fd89ae3e9 vim:spf:en: Add 'overread' 2024-10-16 14:53:39 +02:00
09a7497432 hooks:commit-msg: Visually separate error message
The warning is quickly overread when in the same paragraph as git's
normal output.
2024-10-16 14:53:39 +02:00
72770f6703 vim:setts: Don't wrap termdebug settings in aucmd 2024-10-16 14:53:39 +02:00
908cc494a2 vim:keys: Fix typo in comment 2024-10-16 14:53:39 +02:00
c7c130f050 vim:aucmd: Don't highlight trailing spaces in terminal 2024-10-16 14:53:39 +02:00
0a12cd58ed hooks:commit-msg: Source helpers directly from repo 2024-10-16 14:53:39 +02:00
a376ff7b78 hooks:commit-msg: Relax subject length limit to 60
There is no need to be that pedantic.
2024-10-16 14:53:27 +02:00
dd5663b564 vim:aucmd: Fix missing w:cword_timer_id error msg 2024-10-16 10:44:19 +02:00
8a101134c7 vim:ftplug:fzf: Complete list of TUI Unicode chars
This excludes more characters than needed.

Fixes: 86af2da785 ("vim:ftplug:fzf:TODO: Look up other Unicode chars")
2024-10-14 11:56:28 +02:00
aa901099b0 tmux: Use C-[ey] for scrolling with the wheel 2024-10-14 09:38:41 +02:00