# HG changeset patch # User zegervdv # Date 1643738583 -3600 # Node ID f308f66cad13534887f4d2691aebda017d1a4ac6 # Parent 2cce224318f923c756337253446a28f88c776844 Add fif (find in file) command to search for words and view in fzf diff -r 2cce224318f9 -r f308f66cad13 .chezmoiexternal.toml --- a/.chezmoiexternal.toml Tue Feb 01 15:22:08 2022 +0100 +++ b/.chezmoiexternal.toml Tue Feb 01 19:03:03 2022 +0100 @@ -19,11 +19,6 @@ stripComponents = 1 refreshPeriod = "168h" -[".config/bat/themes/One Dark.tmTheme"] - type = "file" - url = "https://raw.githubusercontent.com/andresmichel/one-dark-theme/master/One Dark.tmTheme" - refreshPeriod = "168h" - [".zsh/zsh-history-substring-search.zsh"] type = "file" url = "https://github.com/zsh-users/zsh-history-substring-search/raw/master/zsh-history-substring-search.zsh" diff -r 2cce224318f9 -r f308f66cad13 dot_config/bat/themes/One Dark.tmTheme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/bat/themes/One Dark.tmTheme Tue Feb 01 19:03:03 2022 +0100 @@ -0,0 +1,876 @@ + + + + + author + IceTimux / Andres Michel + name + One Dark + settings + + + settings + + foreground + #6c7079 + background + #2B303B + invisibles + #747369 + caret + #528bff + lineHighlight + #2c5372 + bracketContentsOptions + underline + bracketContentsForeground + #528bff + bracketsOptions + underline + bracketsForeground + #528bff + tagsOptions + underline + tagsForeground + #528bff + findHighlight + #314365 + findHighlightForeground + #528bff + gutter + #2B303B + gutterForeground + #636d8388 + selection + #bbccf51b + selectionBorder + #bbccf51b + inactiveSelection + #bbccf51b + guide + #464c55 + activeGuide + #464c55 + stackGuide + #464c55 + highlight + #528bff80 + highlightForeground + #528bff + shadow + #2B303B + shadowWidth + 1 + + + + name + Text and source + scope + text, source + settings + + foreground + #abb2bf + + + + name + Text + scope + variable.parameter.function + settings + + foreground + #adb7c9 + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #5f697a + fontStyle + italic + + + + name + Delimiters + scope + none + settings + + foreground + #adb7c9 + + + + name + Operators + scope + keyword.operator + settings + + foreground + #adb7c9 + + + + name + Keywords + scope + keyword + settings + + foreground + #cd74e8 + + + + name + Variables + scope + variable + settings + + foreground + #eb6772 + + + + name + Functions + scope + entity.name.function, meta.require, support.function.any-method + settings + + foreground + #5cb3fa + + + + name + Classes + scope + support.class, entity.name.class, entity.name.type.class + settings + + foreground + #f0c678 + + + + name + Classes + scope + meta.class + settings + + foreground + #adb7c9 + + + + name + Methods + scope + keyword.other.special-method + settings + + foreground + #5cb3fa + + + + name + Storage + scope + storage + settings + + foreground + #cd74e8 + + + + name + Support + scope + support.function + settings + + foreground + #5ebfcc + + + + name + Strings, Inherited Class + scope + string, constant.other.symbol, entity.other.inherited-class + settings + + foreground + #9acc76 + + + + name + Integers + scope + constant.numeric + settings + + foreground + #db9d63 + + + + name + Floats + scope + none + settings + + foreground + #db9d63 + + + + name + Boolean + scope + none + settings + + foreground + #db9d63 + + + + name + Constants + scope + constant + settings + + foreground + #db9d63 + + + + name + Tags + scope + entity.name.tag + settings + + foreground + #eb6772 + + + + name + Attributes + scope + entity.other.attribute-name + settings + + foreground + #db9d63 + + + + name + Attribute IDs + scope + entity.other.attribute-name.id, punctuation.definition.entity + settings + + foreground + #db9d63 + + + + name + Selector + scope + meta.selector + settings + + foreground + #cd74e8 + + + + name + Values + scope + none + settings + + foreground + #db9d63 + + + + name + Headings + scope + markup.heading punctuation.definition.heading, entity.name.section + settings + + fontStyle + + foreground + #5cb3fa + + + + name + Units + scope + keyword.other.unit + settings + + foreground + #db9d63 + + + + name + Bold + scope + markup.bold, punctuation.definition.bold + settings + + foreground + #f0c678 + + + + name + Italic + scope + markup.italic, punctuation.definition.italic + settings + + foreground + #cd74e8 + + + + name + Code + scope + markup.raw.inline + settings + + foreground + #9acc76 + + + + name + Link Text + scope + string.other.link, punctuation.definition.string.end.markdown + settings + + foreground + #eb6772 + + + + name + Link Url + scope + meta.link + settings + + foreground + #db9d63 + + + + name + Lists + scope + markup.list + settings + + foreground + #eb6772 + + + + name + Quotes + scope + markup.quote + settings + + foreground + #db9d63 + + + + name + Separator + scope + meta.separator + settings + + background + #515151 + foreground + #adb7c9 + + + + name + Inserted + scope + markup.inserted + settings + + foreground + #9acc76 + + + + name + Deleted + scope + markup.deleted + settings + + foreground + #eb6772 + + + + name + Changed + scope + markup.changed + settings + + foreground + #cd74e8 + + + + name + Colors + scope + constant.other.color + settings + + foreground + #5ebfcc + + + + name + Regular Expressions + scope + string.regexp + settings + + foreground + #5ebfcc + + + + name + Escape Characters + scope + constant.character.escape + settings + + foreground + #5ebfcc + + + + name + Embedded + scope + punctuation.section.embedded, variable.interpolation + settings + + foreground + #c94e42 + + + + name + Illegal + scope + invalid.illegal + settings + + foreground + #ffffff + background + #e05252 + + + + name + Broken + scope + invalid.broken + settings + + background + #f99157 + foreground + #2d2d2d + + + + name + Deprecated + scope + invalid.deprecated + settings + + background + #d27b53 + foreground + #2c323d + + + + name + Unimplemented + scope + invalid.unimplemented + settings + + background + #747369 + foreground + #2c323d + + + + name + Json key + scope + source.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #eb6772 + + + + name + Json value + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #9acc76 + + + + name + json sub key + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #eb6772 + + + + name + Json sub value + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #9acc76 + + + + name + laravel blade tag + scope + text.html.laravel-blade source.php.embedded.line.html entity.name.tag.laravel-blade + settings + + foreground + #cd74e8 + + + + name + laravel blade @ + scope + text.html.laravel-blade source.php.embedded.line.html support.constant.laravel-blade + settings + + foreground + #cd74e8 + + + + name + python function parameter + scope + source.python meta.function.python meta.function.parameters.python variable.parameter.function.python + settings + + foreground + #db9d63 + + + + name + python meta function + scope + source.python meta.function-call.python support.type.python + settings + + foreground + #5ebfcc + + + + name + python logical keyword + scope + source.python keyword.operator.logical.python + settings + + foreground + #cd74e8 + + + + name + python class ( begin + scope + source.python meta.class.python punctuation.definition.inheritance.begin.python + settings + + foreground + #f0c678 + + + + name + python class ) end + scope + source.python meta.class.python punctuation.definition.inheritance.end.python + settings + + foreground + #f0c678 + + + + name + python function call parameter name + scope + source.python meta.function-call.python meta.function-call.arguments.python variable.parameter.function.python + settings + + foreground + #db9d63 + + + + name + php fcuntion constants + scope + text.html.basic source.php.embedded.block.html support.constant.std.php + settings + + foreground + #db9d63 + + + + name + php namespace name + scope + text.html.basic source.php.embedded.block.html meta.namespace.php entity.name.type.namespace.php + settings + + foreground + #f0c678 + + + + name + javascript meta constant + scope + source.js meta.function.js support.constant.js + settings + + foreground + #db9d63 + + + + name + php namespace in top + scope + text.html.basic` source.php.embedded.block.html constant.other.php + settings + + foreground + #cd74e8 + + + + name + php namespace name in top + scope + text.html.basic source.php.embedded.block.html support.other.namespace.php + settings + + foreground + #db9d63 + + + + name + latex label names + scope + text.tex.latex meta.function.environment.math.latex string.other.math.block.environment.latex meta.definition.label.latex variable.parameter.definition.label.latex + settings + + foreground + #adb7c9 + + + + name + latex italic emph + scope + text.tex.latex meta.function.emph.latex markup.italic.emph.latex + settings + + fontStyle + italic + foreground + #cd74e8 + + + + name + subl_new js vars + scope + source.js variable.other.readwrite.js + settings + + foreground + #adb7c9 + + + + name + new_subl js $ + scope + source.js meta.function-call.with-arguments.js variable.function.js + settings + + foreground + #adb7c9 + + + + name + new_subl js call method + scope + source.js meta.group.braces.round meta.group.braces.curly meta.function-call.method.without-arguments.js variable.function.js + settings + + foreground + #adb7c9 + + + + name + new_subl e js + scope + source.js meta.group.braces.round meta.group.braces.curly variable.other.object.js + settings + + foreground + #adb7c9 + + + + name + new_subl js key + scope + source.js meta.group.braces.round meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js + settings + + foreground + #adb7c9 + + + + name + new_subl obejct key + scope + source.js meta.group.braces.round meta.group.braces.curly constant.other.object.key.js punctuation.separator.key-value.js + settings + + foreground + #adb7c9 + + + + name + new_subl js method with args + scope + source.js meta.group.braces.round meta.group.braces.curly meta.function-call.method.with-arguments.js variable.function.js + settings + + foreground + #adb7c9 + + + + name + new_subl js variable function + scope + source.js meta.function-call.method.with-arguments.js variable.function.js + settings + + foreground + #adb7c9 + + + + name + new_subl variabel function method + scope + source.js meta.function-call.method.without-arguments.js variable.function.js + settings + + foreground + #adb7c9 + + + + + diff -r 2cce224318f9 -r f308f66cad13 dot_config/ripgrep/ripgreprc --- a/dot_config/ripgrep/ripgreprc Tue Feb 01 15:22:08 2022 +0100 +++ b/dot_config/ripgrep/ripgreprc Tue Feb 01 19:03:03 2022 +0100 @@ -1,9 +1,6 @@ # Only be case sensitive if a case is present --smart-case -# include .hgignore in ignores ---ignore-file=.hgignore - # Limit output --max-columns=150 --max-columns-preview diff -r 2cce224318f9 -r f308f66cad13 dot_zshrc --- a/dot_zshrc Tue Feb 01 15:22:08 2022 +0100 +++ b/dot_zshrc Tue Feb 01 19:03:03 2022 +0100 @@ -211,6 +211,20 @@ export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc export BAT_CONFIG_PATH=$HOME/.config/bat/config +# # source: https://gist.github.com/gnanderson/d74079d16714bb8b2822a7a07cc883d4 +function fif() { + rg \ + --column \ + --no-heading \ + --fixed-strings \ + --ignore-case \ + --hidden \ + --follow \ + --glob '!.git/*' "$1" \ + | awk -F ":" '/1/ {start = $2<5 ? 0 : $2 - 5; end = $2 + 5; print $1 " " $2 " " start ":" end " " $3}' \ + | fzf --preview 'bat --wrap character --color always {1} --highlight-line {2} --line-range {3}' \ + --bind 'ctrl-o:execute(nvim {1}:{2}:{4})+cancel' +} [ -f ~/.zshrc.local ] && source ~/.zshrc.local