Log in
Seblog.nl

Seblog.nl

Het jammere aan Vim is: het heeft een enorme leercurve, en de eerste keer dat je daadwerkelijk een paar seconden hebt bespaard omdat je je het perfecte commando herinnerde, ben er je minutenlang over aan het opscheppen tegenover andere Vim-gebruikers. #vim

Het leuke aan stemmen is dat je nog eens ergens komt, paar honderd meter van je huis, waar je nog nooit geweest bent.

So of course your editor does this too, but I just ran ag -l Hidden: | xargs vim and :argdo %s/^Hidden: true/Visibility: hidden/ and :argdo write (and the same for ag -l Private: | xargs vim and :argdo %s/^Private: true/Visibility: private/) on my content/ folder and it feels great.

Bovenkomen

Ik probeerde een blogpost te schrijven over afgelopen weekend, en ik kwam best een eind, maar ik ben nu opeens heftig onzeker over mijn Engels. Het is onzinnig, waarschijnlijk, maar ik vrees dat ik ratel en de blogpost dus onleesbaar is. Dus lees ik maar blogposts over het web en user experience design terwijl ik eigenlijk al naar bed had moeten gaan.

Ik heb het gevoel dat ik afgelopen anderhalf jaar heel diep in de computer heb gezeten. Het is heel onwennig om weer gebruikers te zien, mensen die computers gebruiken, maar dan aan de oppervlakte. Mensen die de command line niet eng vinden, maar gewoon niet weten waar je het over hebt.

Als je een taal leert op school en die daarna jaren niet meer gebruikt, vergeet je de woorden en heb je er niets aan als je eens op vakantie gaat. Als je op een bepaalde taal gaat studeren, vergeet je een andere. Het voelt alsof ik mensentaal voor programmeertaal aan het ruilen ben geweest. Het is fijn om weer eens mensentaal te spreken, maar ik ben ook bang, stiekem, om de programmeertaal los te laten. Het is gek dat ook deze taal een deel van je identiteit lijkt te worden.

Ik heb niet het idee dat deze blogpost zo veel beter is, maar het ding met blogposts is dat je de slechte moet tegengaan door steeds nieuwe te schrijven, niet door slechte niet te schrijven. Maar aan de blogpost over IndieWebCamp Düsseldorf wil ik toch nog wat sleutelen, dus die houden jullie nog van me tegoed.

Gewoon even kijken of mijn Micropub het nog doet. Indien ja: ik ben succesvol verhuisd van server! 🎉

Vim and Git

So I woke up this morning and thought: I should really dig more into using Git within Vim with tpope's vim-fugitive. So I did.

I was already using the :Gblame command it provides a lot. This command opens a vertical split, with on the right the current file and on the left for each line of that file the hash, author and date of the last time that line changed. This is great for quickly identifying the author and age of a piece of code, which helps me a great deal in understanding the purpose behind the code. It's sad that Git gives this feature a name with such a negative connotation. PHPStorm calls this 'Git annotate', which feels nicer. One can also do a git blame from the command line or on Github, but having this command right in your editor is very useful.

I noticed, however, that I can browse the commits even further, by pressing enter when the cursor was on such a line in the righthand buffer. I would instantly be lost in weird screens about commits. I also figured there would be ways to commit from Vim (what a Git plugin would it be else), but I hadn't figured out how it worked.

I think the best tour of the plugin, apart from it's help files, is this nice overview of five video's on Vimcasts.org, about the basic commands, the difference between committed files, the working copy and the index, resolving merge conflicts and other diffs, using Vim to browse Git and specificly browsing commit history. Recommended when diving into this, I learned a lot about the inner workings of Git too :)

Switched my design from using a grey background with white backgrounds for the posts, to a white background for both, and a light fading box-shadow around the posts. I am very pleased with the results!

Meer laden