Accompanies OnCFD Newsletter #173
A couple of code snippets that use fzf to mine your install & extract the answers to everyday OpenFOAM questions, like...
- How do I use a particular feature?
- What does so-and-so dictionary look like?
- Does this need a semi-colon? 🤦♂️
It looks like this...
Here are the code snippets...
grep \
--line-buffered --line-number --color=never \
--recursive --binary-files=without-match '' $FOAM_TUTORIALS |
fzf \
--delimiter : \
--preview 'less {1}' \
--preview-window 'up,75%,border,+{2}/3'
rg \
--color=always --line-number --no-heading \
--smart-case '' $FOAM_TUTORIALS |
fzf --ansi \
--color 'hl:-1:underline,hl+:-1:underline:reverse' \
--delimiter : \
--preview 'bat -lcpp --color=always {1} --highlight-line {2}' \
--preview-window 'up,75%,border,+{2}+3/3,~3'
That should save you some typing, but make sure you check out the original article for more info 👋
Sorry for the late reply on this; I solved the problem by migrating to lazyVim, I believe its possible to integrate yours into lazyVim too :D