From: Iain Patterson Date: Mon, 5 Mar 2007 12:14:08 +0000 (+0000) Subject: Added Qp to .vimrc. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=9bc7cefe316314c162241101a15de05d96033256;p=profile.git Added Qp to .vimrc. Fixed known_hosts completion. Added completion for kill_known_hosts alias knh. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@38 6be0d1a5-5cfe-0310-89b6-964be062b18b --- diff --git a/.profile.d/aliases.bashrc b/.profile.d/aliases.bashrc index b0b5a86..9175ab0 100644 --- a/.profile.d/aliases.bashrc +++ b/.profile.d/aliases.bashrc @@ -1,4 +1,5 @@ # $Id$ +alias knh='kill_known_host' alias l='ls' alias ls='/bin/ls $LS_OPTIONS' alias vim='vim +syn\ on' diff --git a/.profile.d/completion.bashrc b/.profile.d/completion.bashrc index fbec144..cf77c15 100644 --- a/.profile.d/completion.bashrc +++ b/.profile.d/completion.bashrc @@ -30,7 +30,8 @@ function _process() { function _known_hosts() { cur=${COMP_WORDS[COMP_CWORD]} - HOSTS=$(sed 's/[ ].*//;s/,/\n/' ~/.ssh/known_hosts) + HOSTS=$(sed 's/[ ].*//;s/,/\ +/' ~/.ssh/known_hosts) COMPREPLY=($(compgen -W "$HOSTS" -- "$cur")) return 0 @@ -117,5 +118,6 @@ complete -F _process killall complete -F _pid kill complete -F _pid strace complete -F _known_hosts kill_known_host +complete -F _known_hosts knh complete -F _modprobe modprobe complete -F _rmmod rmmod diff --git a/.vimrc b/.vimrc index 8fb07e9..eac19ca 100755 --- a/.vimrc +++ b/.vimrc @@ -138,6 +138,8 @@ map Q3 :se ts=32: map Qf :se foldenable!: " Change number mode with Qn. map Qn :se number!: +" Toggle paste mode with Qp. +map Qp :se paste!: " Vim 7 has tabs. Default "next tab" mapping is gt. Add "previous tab" as gb. map gb :tabPrev