git-vim
[ link: git-vim | tags: git vim | updated: Wed, 30 Apr 2008 10:44:36 ]
I have had an item on my todo list to improve my vim/git integration for a while. Today, I found git-vim on github. I was really impressed. So I forked it and hope to do some work on the project...
git://tachyon.jukie.net/git-vim.git
First I will have to check if there is anything salvageable from my current vim scripts.
vim modelines insecure
[ link: vim-modelines-insecure | tags: vim security | updated: Thu, 10 May 2007 13:54:00 ]
I have previously disabled modelines in my vimrc, but had turned them on recently
only to learn today that they are subject to another vulnerability.
I've seen this before. Enough is enough. :)
Fortunately, this sparked a debate on vim-dev mailing list. One of the outcomes is a vim script that replaces the modeline parser in vim. It is said to be a lot more strict about what it permits as valid modeline components and allows the user to control that in the vimrc.
You can grab the script, put it in your .vim/plugins/ directory
and turn off the built-in modelines parser:
set modelines=0
Optionally you can set this variable to have the new parser show errors in parsing.
let g:secure_modelines_verbose=1
gitdiff.vba v2
[ link: vimscript-gitdiff-v2 | tags: vim git vimgit | updated: Wed, 02 May 2007 21:32:13 ]
I released version 2 of my gitdiff.vba vim script.
It now supports two features:
:GITDiff [commitish]Split the vim window vertically, display the HEAD, or some other changeset, version of the file in the split, then diff them.
:GITChanges [commitish]Highlight lines that were changed since the HEAD or some other changeset.
I also started using the VimBall script, which is a package format
for vim scripts. So to install it, you need to first have the vimball extension. Further, if you have the
GetLatestVimScripts you can use the :GLVS commands to
automatically upgrade your packages.
Next, I want to merge in maddcoder's gitcommit.vim script, and call the result something more grand like 'vim-gittools.vba'.
vimgrep alias
[ link: vimgrep-alias | tags: vim shell zsh | updated: Wed, 18 Apr 2007 09:46:28 ]
I've been using Solaris recently... since yesterday. First reactions: How can anyone use their command line tools!?
Fortunately the system I was on had zsh and vim.
Here is a macro I use to avoid Solaris grep:
function vimgrep () { tmp="$@" ; vim -c "vimgrep $tmp | copen" ; }
(I could not figure out a way to do it w/o the tmp variable)
Now you can do things like:
vimgrep pattern 'dir/**/*.c'
mouse-free
[ link: vimperator | tags: firefox web vim desktop | updated: Mon, 16 Apr 2007 22:06:55 ]
First there was a Navigator, then there was an Explorer. Later it was time for a Konqueror. Now it's time for an Imperator, the VIMperator :)
VIMperator is a mozilla/firefox plugin from Martin Stubenschrott. It completely redefines the firefox interface to mimic the beloved VIM editor.
If you love vim, you are likely to love VIMperator. If not... well, your loss.
GITDiff vim plugin
[ link: vim-gitdiff | tags: git vim vimgit | updated: Wed, 02 May 2007 21:23:33 ]
Taking a TODO item off my list, I am adding a plugin to vim that splits the current window and presents a diff between the current file and any revision of that file in the current git repository.
fixing vim's [[ and ]] for bad code
[ link: find-functions-in-vim | tags: vim | updated: Sat, 11 Aug 2007 14:21:59 ]
I just added something to my .vim/c.vim
to make [[ and ]] work even if the code does not have { on new lines.
function! FindFunctionDefinition(dir)
let l:lastpattern = @/
if a:dir==-1
?^\(\a.*(\_[^\)]*) *\)\{,1\}{
elseif a:dir==1
/^\(\a.*(\_[^\)]*) *\)\{,1\}{
endif
let @/ = l:lastpattern
endfunction
nmap [[ :call FindFunctionDefinition(-1)<CR>
nmap ]] :call FindFunctionDefinition(1)<CR>
This will make [[ and ]] find the next and previous function even if the first { is not in the first column.
vim and linux CodingStyle
[ link: vim-and-linux-coding-style | tags: vim linux kernel c code | updated: Sat, 16 Jun 2007 21:03:49 ]
It would seem that either no one that codes for the Linux kernel does so under vim, or if they do they don't have the time to share their vim configuration that doesn't conflict with the kernel's CodingStyle.
Below I will discuss some changes I had to make to my .vimrc and .vim/c.vim to work with C efficiently.
google-codesearch from vim
[ link: codesearch-from-vim | tags: vim google code | updated: Sat, 07 Oct 2006 15:28:23 ]
I just saw vim hint 1354 pop up in my RSS feed. It's a neat idea... but it's hard to decide what documentation should be looked up. Simply using the file type is insufficient.
It turns out that it's a lot more awesome to do google codesearch lookup on it.
vim tutorial
[ link: 20060902145643 | tags: vim | updated: Fri, 20 Oct 2006 21:51:34 ]
I just joined the #vim irc channel on freenode. In the topic is suggested visiting Vi-Improved.org. This site in turn had a pretty good tutorial, here are a couple related links:
