Applying changes to VIM buffers

How to apply changes to all open VIM buffers

January 13, 2011

A simple way to make modifications to a lot of file is to open all of them
in vi and apply the search and replace to every file that is buffered. The
easiest way to do this is as follows:

 :bufdo %s/pattern/substitution/ge | update 

Breaking down the command we can see what each part is doing.

action description
bufdo apply to all . . .

Read More

Git: Rebase vs Merge

Using rebase instead of merge when pulling from remote

October 19, 2010

Instead of doing a regular pull

git pull # aka: git fetch && git merge remotes/origin/BRANCH BRANCH 

To avoid the all the merge commit messages you can run the following command instead

git pull --rebase # aka: git fetch && git rebase remotes/origin/BRANCH BRANCH 

I actually have the following in my ~/.gitconfig file

[alias] . . .

Read More

SSH: Password free login

Setting up ssh keys

December 14, 2009

Step 1

On each machine type ssh somemachine.example.com and make a connection with your regular password. This will create a .ssh dir in your home directory with the proper perms.

Step 2

On your primary machine (the machine that you will ssh from) where you want your secret keys to live (let's say kermit), type

 $ ssh-keygen -t dsa 

This . . .

Read More

  Subscribe by Email and Never Miss a Post