summaryrefslogtreecommitdiff
path: root/_posts/2008-06-26-git-branch-everywhere.md
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-07-02 20:04:59 -0700
committerFranck Cuny <franckcuny@gmail.com>2016-07-02 20:04:59 -0700
commit8f187c573954b6c8d1650ac33a164c52e032ac16 (patch)
treec605d0cf51d272393006e5486bfdc24984cf801f /_posts/2008-06-26-git-branch-everywhere.md
parentUpdate some posts to make the tests pass. (diff)
downloadlumberjaph-8f187c573954b6c8d1650ac33a164c52e032ac16.tar.gz
Stop using Jekyll.
Moving away from Jekyll to Hugo. This commit clean up the old files to prepare for the migration.
Diffstat (limited to '')
-rw-r--r--_posts/2008-06-26-git-branch-everywhere.md39
1 files changed, 0 insertions, 39 deletions
diff --git a/_posts/2008-06-26-git-branch-everywhere.md b/_posts/2008-06-26-git-branch-everywhere.md
deleted file mode 100644
index 8ec346c..0000000
--- a/_posts/2008-06-26-git-branch-everywhere.md
+++ /dev/null
@@ -1,39 +0,0 @@
----
-layout: post
-title: Git branch everywhere
-summary: In which I share a snippet of code to display a git branch in vim.
-type: codex
----
-
-The current trend is to have the name of the current git branch everywhere. Personnaly I display it in my vim's status bar, and in my zsh prompt.
-
-Here is my vimrc configuration for this (I'm not the author of this function, and can't remember where I saw it first):
-
-{% highlight vim %}
-set statusline=%&lt;[%n]%m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).':'.&ff}%{g:gitCurrentBranch}%{']'}%y\ %F%=%l,%c%V%8P
-autocmd BufEnter * :call CurrentGitBranch()
-
-let g:gitCurrentBranch = ''
-function! CurrentGitBranch()
- let cwd = getcwd()
- cd %:p:h
- let branch = matchlist(system('/usr/local/git/bin/git branch -a --no-color'), '\v\* (\w*)\r?\n')
- execute 'cd ' . cwd
- if (len(branch))
- let g:gitCurrentBranch = '][git:' . branch[1] . ''
- else
- let g:gitCurrentBranch = ''
- endif
- return g:gitCurrentBranch
-endfunction
-{% endhighlight %}
-
-and my zshrc:
-
-{% highlight vim %}
-local git_b
-git_b='$(get_git_prompt_info '%b')'
-PROMPT="%(?..%U%?%u:) $git_b %40>...<%/%(#.%U>%u.%B>%b) "
-{% endhighlight %}
-
-with the following script [S55_git](http://www.jukie.net/~bart/conf/zsh.d/S55_git).