⪼ Made with 💜 by realpolyglot.com
- Git :: Guides :: Everyday Git
- Software Engineering :: Code Review
- Income Sources :: Books :: Everyday Dev
- Income Sources :: Tmux Keybindings
- Income Sources :: Vim Keybindings
- Fish Shell
- Figma ...
Let's say your're in vim and you need to get to you
Lets say your co-worker passes you a copy of their .env
file for your own use. You'll almost always have to contend with changing their machine's IP address to your own, and, if there are any fully qualified paths in the file, you'll have to change those to your own equivalent.
For resolving fully qualified paths, you can use the file
command:
⪼ file ~/Documents/blah/blah/blah/certificates/public/service.crt.pub
⪼ curl -s ident.me
Replace an IP address in Vim
SHIFT+:
:%s/OLD IP ADDRESS/NEW IP ADDRESS/g
remember to escape the dots (
.
) in the regular expression pattern (the replacement doesn't need to be escaped as it is fixed text and not a pattern)
SHIFT+:
:%s/192\.168\.1\.1/71.33.134.19/g
option
+spacebar
: activate alfred
command
+n
: Open New Windowcommand
+w
: Close Current Window (if closing last open tab)command
+shift
+w
: Close Current Window (even if there are multiple tabs open)
command
+shift
+{
: Switch To Previous Tab (Left)command
+shift
+}
: Switch To Next Tab (Right)command
+w
: Close Current Tab (closes current window if closing last open tab)command
+t
: Open New Tab
command
+spacebar
: activate spotlight