diff --git a/.gitignore b/.gitignore index 79b5594..47b377a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ **/.DS_Store +osascripts/tabact.scpt diff --git a/public dots/vim-nvim/init.vim b/public dots/vim-nvim/init.vim index 2e60a0d..ea1be58 100644 --- a/public dots/vim-nvim/init.vim +++ b/public dots/vim-nvim/init.vim @@ -89,6 +89,8 @@ Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/playground' call plug#end() +let g:matchup_surround_enabled = 1 + " fzf-gh settings let g:fzf_gh_website=1 @@ -239,6 +241,9 @@ require'nvim-treesitter.configs'.setup { indent = { enable = true, disable = { "javascript" } + }, + matchup = { + enable = true, }, autopairs = { enable = true diff --git a/public dots/zsh/functions.zsh b/public dots/zsh/functions.zsh index f56a57c..93eb9be 100644 --- a/public dots/zsh/functions.zsh +++ b/public dots/zsh/functions.zsh @@ -21,6 +21,11 @@ rdf() { rustup doc $1 || (echo "Searching..." && open "https://doc.rust-lang.org/std/?search=$query") } +# set Active Browser Tab: @titleText → finds tab with title that contains the text +abt() { + osascript ~/dotfiles/osascripts/tabact.scpt $1 +} + # screenshot sc() { screencapture -x ~/Screenshots/$1 @@ -120,7 +125,7 @@ cdg() { } fvh() { - rg "$1" --ignore-case --files-with-matches --no-messages ~/notes/ ~/dotfiles/ ~/.vim/ ~/.config/nvim/ | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 6 '$1' || rg --ignore-case --pretty --context 6 '$1' {}" --preview-window=right:60% --multi --select-1 --exit-0 + rg "$1" --ignore-case --files-with-matches --no-messages ~/notes/ ~/dotfiles/ ~/.vim/ ~/.config/nvim/ /usr/local/Caskroom/neovim-nightly/latest/nvim-osx64/share/nvim/runtime/doc/ | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 6 '$1' || rg --ignore-case --pretty --context 6 '$1' {}" --preview-window=right:60% --multi --select-1 --exit-0 } # for `vg` grep- find-in-file(s) diff --git a/tabact.applescript b/tabact.applescript new file mode 100644 index 0000000..9e879eb --- /dev/null +++ b/tabact.applescript @@ -0,0 +1,14 @@ +on run argv + tell application "Brave Browser" + repeat with w in (windows) + set j to 0 + repeat with t in (tabs of w) + set j to j + 1 + if title of t contains (item 1 of argv) then + set (active tab index of w) to j + return + end if + end repeat + end repeat + end tell +end run \ No newline at end of file