diff --git a/.memo/fzf-usage b/.memo/fzf-usage new file mode 100644 index 0000000..7745e30 --- /dev/null +++ b/.memo/fzf-usage @@ -0,0 +1,12 @@ +# copy result to clipboard +fzf | {clipboard manager} # e.g. wl-copy / win32yank.exe -i + +# do not sort results +fzf +s + +# preview results in a preview window +fzf --preview 'cat {}' +fzf --preview 'bat --color=always {}' # for better syntax highlighting + +# select multiple items with tab +fzf -m diff --git a/.memo/nvim-usage b/.memo/nvim-usage new file mode 100644 index 0000000..1e65efe --- /dev/null +++ b/.memo/nvim-usage @@ -0,0 +1,27 @@ +u v undo +C-r v redo + +o v open new line below & insert mode +O v open new line above & insert mode + +S-h v move to left buffer +S-l v move to right buffer + +C-Enter i cancel auto-completion & move to next line + +Num j/k v move by num lines +Num G v move to line num + +w v move to start of next word +W v move to start next word, can contain punctuation +e v move to end of current word +E v move to end of current word, can contain punctuation +b v move to start of previous word +B v move to start of previous word, can contain punctuation +ge v move to end of previous word +gE v move to end of previous word, can contain punctuation + +0 v move to start of line +$ v move to end of line + +<>+... v indent diff --git a/fish/prev.d/.gitignore b/fish/prev.d/.gitignore index 0ae4370..407a300 100644 --- a/fish/prev.d/.gitignore +++ b/fish/prev.d/.gitignore @@ -1,6 +1,6 @@ * !.gitignore -!zoxide.fish !prompt.fish !ssh-agent.fish -!theme.fish \ No newline at end of file +!theme.fish +!programs.fish diff --git a/fish/prev.d/zoxide.fish b/fish/prev.d/programs.fish similarity index 56% rename from fish/prev.d/zoxide.fish rename to fish/prev.d/programs.fish index cd85ed8..ec45553 100644 --- a/fish/prev.d/zoxide.fish +++ b/fish/prev.d/programs.fish @@ -1,4 +1,8 @@ +if type -q fzf + fzf --fish | source +end + if type -q zoxide zoxide init fish | source alias cd=z -end \ No newline at end of file +end