Skip to content

Commit

Permalink
open files with Cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Sep 24, 2024
1 parent b706062 commit 3cf9e9d
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fish/fish_variables
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1eshinriyo/breeze\x1ehalostatue/fish\x2ddirenv\x1ehalostatue/fish\x2drake
SETUVAR _fisher_shinriyo_2F_breeze_files:\x7e/\x2econfig/fish/functions/__breeze_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/__title_case\x2efish\x1e\x7e/\x2econfig/fish/functions/breeze\x2efish\x1e\x7e/\x2econfig/fish/functions/ga\x2efish\x1e\x7e/\x2econfig/fish/functions/gb\x2efish\x1e\x7e/\x2econfig/fish/functions/gbl\x2efish\x1e\x7e/\x2econfig/fish/functions/gbu\x2efish\x1e\x7e/\x2econfig/fish/functions/gco\x2efish\x1e\x7e/\x2econfig/fish/functions/gd\x2efish\x1e\x7e/\x2econfig/fish/functions/gl\x2efish\x1e\x7e/\x2econfig/fish/functions/grm\x2efish\x1e\x7e/\x2econfig/fish/functions/gs\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/breeze\x2efish\x1e\x7e/\x2econfig/fish/completions/breeze\x2efish
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_autosuggestion:black
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:blue
SETUVAR fish_color_comment:red
Expand Down
82 changes: 82 additions & 0 deletions setup/duti_cursor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#? /bin/bash
#
# Change default editor for the listed filetypes on MacOS.
# Required duti to be installed. `brew install duti`

extensions=(
public.plain-text
public.unix-executable
.c
.cpp
.cs
.css
.env
.erb
.go
.haml
.hbs
.hs
.java
.js
.json
.lock
.map
.md
.php
.rb
.rake
Gemfile
Rakefile
.lock
.sass
.scss
.sh
.fish
.svg
.ts
.txt
.xml
.yaml
.yml
.zsh
)
vscodeinsiders=com.microsoft.VSCodeInsiders
vscode=com.microsoft.VSCode
atom=com.github.atom
sublime2=com.sublimetext.2
sublime3=com.sublimetext.3
macvim=org.vim.MacVim
cursor=com.todesktop.230313mzl4w4u92

editor=$cursor

# editors=("Atom" "MacVim" "SublimeText2" "SublimeText3" "VisualStudioCode" "VisualStudioCodeInsiders")

# echo "Which editor would you like to be default?"

# select opt in ${editors[@]}; do
# if [ "$opt" = "Atom" ]; then
# editor=$atom
# break
# elif [ "$opt" = "MacVim" ]; then
# editor=$macvim
# break
# elif [ "$opt" = "SublimeText2" ]; then
# editor=$sublime2
# break
# elif [ "$opt" = "SublimeText3" ]; then
# editor=$sublime3
# break
# elif [ "$opt" = "VisualStudioCode" ]; then
# editor=$vscode
# break
# elif [ "$opt" = "VisualStudioCodeInsiders" ]; then
# editor=$vscodeinsiders
# break
# fi
# done

for extension in "${extensions[@]}"; do
echo "duti -s $editor $extension"
duti -s $editor "$extension" all
done

0 comments on commit 3cf9e9d

Please sign in to comment.