From 3d2d5a6ede7022a3f68d83eda5da6a5623b6ef92 Mon Sep 17 00:00:00 2001 From: Sebastian Tramp Date: Fri, 11 Feb 2011 12:48:09 +0100 Subject: [PATCH] add: advanced completion for vi (e.g. tex and rc files first) --- completion.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/completion.zsh b/completion.zsh index 3aa44a6..3cc7b45 100644 --- a/completion.zsh +++ b/completion.zsh @@ -75,6 +75,9 @@ zstyle ':completion::*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;32' # rm: advanced completion (e.g. bak files first) zstyle ':completion::*:rm:*:*' file-patterns '*.o:object-files:object\ file *(~|.(old|bak|BAK)):backup-files:backup\ files *~*(~|.(o|old|bak|BAK)):all-files:all\ files' +# vi: advanced completion (e.g. tex and rc files first) +zstyle ':completion::*:vi:*:*' file-patterns 'Makefile|*(rc|log)|*.(php|tex|bib|sql|zsh|ini|sh|vim|rb|sh|js|tpl|csv|rdf|txt|phtml|tex|py|n3):vi-files:vi\ like\ theses\ files *~(Makefile|*(rc|log)|*.(log|rc|php|tex|bib|sql|zsh|ini|sh|vim|rb|sh|js|tpl|csv|rdf|txt|phtml|tex|py|n3)):all-files:other\ files' + zstyle :compinstall filename '~/.zshrc' autoload -Uz compinit && compinit