This is the second round of random mini level-ups I had in programming over the last couple of weeks. I wrote the first post of this kind last month1 and have already piled up enough small lessons for part 2:
You can keep a folder but not its content in Git: Add the following
.gitignorefile into the folder
I found this in a directory2 that Laravel uses for caching.
Vim: To start a new line after the current one I currently use A↵. From normal mode, A moves me to the end of the current line and into insert mode where ↵ then inserts the newline. I discovered that there is a single key for exactly this move: o.
Git: Instead of manually deleting untracked files one more time, I decided to search for a command to do it. Turns out that this is built into Git already:
git cleancommand deletes untracked files from the working tree. It has a couple of options, most importantly
git clean -nto not delete anything but only show what it would do.
Vim: Search results with
/are available even after doing other things like moving around and editing. Simply press
nto jump to next occurence and cycle through them.
Functional Programming: The term pointfree style describes programming functions without mentioning their arguments directly, but composing them from other functions. I learned this while writing my first post about Haskell3.
- Command line:
On OSX the command
pbcopycan copy file contents to the clipboard. If I want to paste content from a file somewhere, I use
pbcopy < path/to/myfileand then simply paste it with ⌘ + v. Found here4.