]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add uuid autogen for vcards
authormartin f. krafft <madduck@madduck.net>
Wed, 20 Jun 2012 20:23:13 +0000 (22:23 +0200)
committermartin f. krafft <madduck@madduck.net>
Wed, 20 Jun 2012 20:23:51 +0000 (22:23 +0200)
.vim/ftplugin/vcard.vim [new file with mode: 0644]
.vimrc

diff --git a/.vim/ftplugin/vcard.vim b/.vim/ftplugin/vcard.vim
new file mode 100644 (file)
index 0000000..15ffa31
--- /dev/null
@@ -0,0 +1,3 @@
+"autocmd BufWritePre *.vcf :/^REV:/s/:.*/\=strftime(":%Y%m%dT%H%M%S%z")/ge
+
+nmap <buffer> <F1> :%s/^UID:.*/\="UID:urn:uuid:" . split(system("uuid"))[0]/<CR>:nohlsearch<CR>
diff --git a/.vimrc b/.vimrc
index 2b8686aaa503efe58b84f1afa6c4d57cef19cd70..a012169ef8855b3c192534d33009e148243bd995 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -1461,6 +1461,8 @@ autocmd BufWrite * normal mw
 " keep an extra backup of vimperator's ctrl-i
 autocmd BufWritePost */vimperator-*.tmp exe 'write ' . fnameescape((exists('$TMPDIR') ? $TMPDIR : '/tmp') . '/vimperator.ctrl-i.' . strftime('%Y.%m.%d.%H%M%S'))
 
+autocmd BufRead *.vcf set filetype=vcard
+
 " leave the i mark whenever we go idle (after updatetime)
 "augroup markidle
   "autocmd CursorHold * normal mi