Posted on June 2, 2013 in Code, CSS #
This is such a simple but nice-to-have thing. I really like using normalize.css instead of having to completely wiping the styling of every element and I’ve to used my own mini reset with it to remove some of the default values like margins and paddings. I guess that I don’t have to do that anymore!
Posted on May 20, 2013 in Code, Vim
Here’s a handy function I came up with after being tired of using
:cd ../ like a madman when I was deep down at the bottom of a project’s folder structure:
if isdirectory(".git")|| filereadable("Rakefile") || filereadable("Gruntfile.js")
silent! exec 'cd ../'
It’s a not-so-fancy way of basically telling Vim to keep going up in the directory structure until it finds either a
.git folder or a specific file. When it finds the root it’ll also print out the path, which I added so that you can actually see that you’re in the root of the project. You can of course change
Gruntfile.js to something completely different, as long as it’s a file that you commonly have in your projects. I also added a more convenient mapping for it in my
command! -nargs=0 Root call GoToRootDir()
This step may not be necessary, but by mapping something like
:call GoToRootDir to just
:Root means that you have to type fewer keystrokes.
Posted on May 14, 2013 in Code, CSS #
A nice and lengthy article about how to write modular and maintainable CSS. I especially like the naming conventions, mostly because they’re similar to my own. I’m vain like that.
Posted on May 9, 2013 in Vim, Code #