Open subdigital opened 3 years ago
originally written by Dan on 09/17/2019 12:12:02
Hi Ben, it was extremely satisfying to see you using `xc` alias, I'm using slightly simpler version of that `xp` to open any .xcodeproj in current dir and `xw` to open any .xcworkspace. The git aliases you showed are also very similar to what I use and I can absolutely relate to the statement "I live in the terminal".
A small tip I use is this, as who doesn't need to clean the derived data once in a while: alias rmderived="rm -Rf ~/Library/Developer/Xcode/DerivedData"
Another tip from me: I've crafted together this generic .gitignore that fits 90% of projects and put it in my bash aliases to create one quickly:
generate_gitignore() {
cat << EOF > .gitignore
.DS_Store
# Xcode
# this ignores dummy workspace files in xcodeproj dir
**/*.xcodeproj/*
!**/*.xcodeproj/project.pbxproj
# this ignores all files in workspace dir except the needed one
**/*.xcworkspace/*
!**/*.xcworkspace/contents.xcworkspacedata
# fastlane
**/fastlane/*
!**/fastlane/Fastfile
EOF
}
Also I have crafted together a swift script to generate swift initializers, it takes inputs from pasteboard (list of swift var/let declarations) and puts output to pasteboard as well. So it goes like:
1. in Xcode, copy list of properties to generate initializer to
2. In terminal type `gi`
3. Back in Xcode paste generated initializer
The code is a bit long, 60 lines, but I think I can probably paste it here if anybody's interested.
Cheers
Written on 09/13/2019 15:06:30
URL: https://nsscreencast.com/episodes/409-migrating-to-zsh