From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12310 invoked by alias); 29 Mar 2012 20:55:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16933 Received: (qmail 21743 invoked from network); 29 Mar 2012 20:55:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Naat4n6QfIYhPz1YAHiup50m6FBNs3pzUkvm7pVL2ks=; b=aXMbBQyh8ncM8DpZGPgM4KoltGQu+6VbJK+RbL2f2+ljEXDW7P5I3y6Ol0SSI7dlns 9EhZrExUmIa9+nHMYoxk55BvNeGkVD1HAFia2t1y1wR6QKMq9j3y2ZlUM5M9an/H0v4y qqRIGvK3DKZM6lycP6hVDsrvCMxoccu0MuaKcfQ2geuPCRVitrnkr5eEhHLc1W6ZrWUl EvTcjCuHznjsFiW6L4TJkm+F0WdF6tRN8cN3ZpBOYczEXevX/1JftRiSrY9M2D7l4D81 8UhtVer+7Xzwit6xH2OhL4jdCgFZWAjJJpye9+w6zbMH/cPmW4Wx30s8PMfsCiWb3RtE Qb3w== MIME-Version: 1.0 Date: Thu, 29 Mar 2012 15:55:05 -0500 Message-ID: Subject: Automatically run ls on blank line for faster navigation From: Mitchell Burdette To: zsh-users@zsh.org Content-Type: text/plain; charset=ISO-8859-1 I rigged up a function that makes navigation super fast in zsh. If you hit enter on a blank line, it runs ls automatically. Just add the following to your .zshrc: auto-ls () { if [[ $#BUFFER -eq 0 ]]; then echo "" ls zle redisplay else zle accept-line fi } zle -N auto-ls bindkey '^M' auto-ls To get the ^M correct in vim, hit . You could really make this run whatever you want, on any key you want, but I like this shortcut in particular (It goes great with autocd!). Cheers, Mitch