diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index a8973f8..a979d4f 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -184,6 +184,8 @@ if (get(g:, 'loaded_fzf')) " 'git log (log?)' and 'git log buffer ' map gll Commits map glb BCommits + " TODO: glb should restrict the log to all staged files when called + " in .git/COMMIT_EDITMSG, maybe with an ftplugin? endif " Y should behave like D & C does @@ -290,6 +292,7 @@ function! s:CenterNext(count, command) let &lazyredraw = l:lazyredraw_bkp endfunction +" TODO: does not rehighlight search results map n call CenterNext(v:count1, 'n') map N call CenterNext(v:count1, 'N') @@ -402,3 +405,6 @@ augroup END " Escape underscores (useful when writing LaTeX) vmap \_ s/\v(^[^\\])\zs\ze_/\\/g + +" TODO: make `gf` open absolute paths relative to PWD if possible +" diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index fd0c853..d5124d1 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -128,6 +128,10 @@ typeset -A fzf_opts=( ctrl-d half-page-down ctrl-u half-page-up ctrl-t toggle-track + # automatically track but first on backspace + # TODO: this does not work as bspace is executed after backward-eof it seems + # backward-eof toggle-track + # bspace track+backward-delete-char ) FZF_DEFAULT_OPTS=" --bind ${(@*kj:,:)fzf_opts/(#m)*/$MATCH:$fzf_opts[$MATCH]}" export FZF_DEFAULT_OPTS diff --git a/.config/zsh/autoload/git/git-checkout-worktree b/.config/zsh/autoload/git/git-checkout-worktree index 2893ec0..c5fcda0 100755 --- a/.config/zsh/autoload/git/git-checkout-worktree +++ b/.config/zsh/autoload/git/git-checkout-worktree @@ -23,6 +23,11 @@ # # Same for rebase (as `git rebase dev feature` switches to `feature`): # % git-checkout-worktree feature <<<"git rebase dev" +# +# +# TODO: The git alias version seems to break with the same arguments that the +# zsh native one works with. +# TODO: Supplying a flag like --no-checkout breaks the naming of the worktree emulate -L zsh -o err_return -o no_unset diff --git a/.config/zsh/autoload/git/git-submodule-rm b/.config/zsh/autoload/git/git-submodule-rm index 312e232..37a14d5 100755 --- a/.config/zsh/autoload/git/git-submodule-rm +++ b/.config/zsh/autoload/git/git-submodule-rm @@ -3,6 +3,8 @@ ## Created: 2020-09-13 ## ## Completely remove a git submodule. +# +# TODO: Fix for nested submodules local toplevel diff --git a/.config/zsh/autoload/git/glog b/.config/zsh/autoload/git/glog index 3e67035..71c2b36 100755 --- a/.config/zsh/autoload/git/glog +++ b/.config/zsh/autoload/git/glog @@ -5,6 +5,9 @@ ## A TUI for git-log using fzf. ## Displays git-log in fzf and git-show as preview command for each commit. +# TODO: preview breaks when files were passed but they were renamed and have a +# different name at the point of this commit + # extendedglob is necessary for the expansion of the binds array emulate -L zsh -o extendedglob diff --git a/.config/zsh/zshrc.d/90-external-plugins/45-fzf-tab.config.zsh b/.config/zsh/zshrc.d/90-external-plugins/45-fzf-tab.config.zsh index 435ce21..e209089 100644 --- a/.config/zsh/zshrc.d/90-external-plugins/45-fzf-tab.config.zsh +++ b/.config/zsh/zshrc.d/90-external-plugins/45-fzf-tab.config.zsh @@ -18,8 +18,10 @@ zstyle ":fzf-tab:complete:(${(j:|:)file_commands}):options" fzf-preview unset {file,dir}_prev_cmd preview_cmd file_commands # Preview variables -# TODO: Only works with exported values as this is executed in a subshell. Is -# there a way around this? I fear not... +# TODO: Only works with exported values as this is executed in a subshell +# One could execute this beforehand: +# +# eval "$(typeset + | awk '{print "export " $NF}')" zstyle ':fzf-tab:complete:-parameter-:*' fzf-preview 'typeset -p1 "$word"' # Move down after selecting and yank with ctrl-y