From owner-freebsd-questions@FreeBSD.ORG Fri Aug 21 03:20:50 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E2121065672 for ; Fri, 21 Aug 2009 03:20:49 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from atmail-10.bnguk.net (atmail-10.bnguk.net [80.74.253.10]) by mx1.freebsd.org (Postfix) with ESMTP id 225198FC65 for ; Fri, 21 Aug 2009 03:20:48 +0000 (UTC) Received: from 54-144.adsl.zetnet.co.uk ([194.247.54.144] helo=melon.esperance-linux.co.uk) by atmail-10.bnguk.net with esmtp (Exim 4.69) (envelope-from ) id 1MeKg7-0007jl-Ge; Fri, 21 Aug 2009 04:20:35 +0100 Received: by melon.esperance-linux.co.uk (Postfix, from userid 1001) id 1620AFCA505; Fri, 21 Aug 2009 04:20:35 +0100 (BST) Date: Fri, 21 Aug 2009 04:20:35 +0100 From: Frank Shute To: Steve Bertrand Message-ID: <20090821032035.GA41054@melon.esperance-linux.co.uk> Mail-Followup-To: Steve Bertrand , Glen Barber , "freebsd-questions@freebsd.org Questions -" References: <4A8B82FD.30305@ibctech.ca> <4ad871310908182259j202b1a0au82e15c7259a583c1@mail.gmail.com> <20090820034910.GA36715@melon.esperance-linux.co.uk> <4A8DEB4F.8030605@ibctech.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A8DEB4F.8030605@ibctech.ca> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 6.4-RELEASE-p4 i386 X-Organisation: 'http://www.shute.org.uk/' Cc: Glen Barber , "freebsd-questions@freebsd.org Questions -" Subject: Re: [OT] Vim mailing list X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2009 03:20:50 -0000 On Thu, Aug 20, 2009 at 08:33:19PM -0400, Steve Bertrand wrote: > > [snip] > > >> > >> And, of course, there's this one: http://www.vim.org/maillist.php > > > > I'm a member of that list which is a straightforward mailing list > > AFAIK (Disclaimer: I do have a google account but I can't remember if > > that was necessary to sign up). > > Thanks all, > > I'll check out how to configure my mailer with Google Groups for this list. There should be little in the way of configuration required for that list, they just send out plain email and you can post in the same format. > > > I've found it a very helpful list and I've learnt a lot being > > subscribed to it despite being a +10yr user of vim. Even Bram Molenaar > > posts there occasionally. > > Nice to know that long-term users parade around in the list. It then, is > much like this one, and a few others that I am on. > > Before I foray into configuring my email program to work with Google > Groups, I have one more (simple, I think) question regarding Vim. (I > couldn't come up with the proper Gooliage): > > I'd like to create a keyboard map so instead of doing: > > - _dd (I believe the underscore is referred to as 'blackhole') > > I can do: > > - CTRL-whatever > > I have a lot of operations that consist of this: > > - p > - j > - $ > - i > - > - ^[ > - 3j > - i > - > - ^[ > - 3dd > > (not necessarily in that order)...and want an easier way to to do both > 'dd' and 'd$' without wrecking the clipboard which I have saved a yank to. What you refer to as a clipboard is termed a register in vim and IIRC you have the use of 26 (a-z). You can yank or delete to a register and then dd wont overwrite it. Use plain dd and yy for quick and dirty. See: :help yank You can then recall the text from that register with the "put" command. See: :help p As with all simple vim commands you can precede them with a number so to yank 3 lines and save them in register a: 3"ayy and then to put them somewhere: "ap Likewise, you can delete 3 lines & place them in a named register: 3"add I hope the above short demo gives you a brief outline on how to work with registers but the vim handbook has got far more info. I guess it's difficult for a new vim user who lacks the vim terminology to look for stuff. Also look into using macros if you find you are using the same commands repetitively. Have a look at marks if you're not using them already: :help m > > fwiw, the box I'm doing this work on is a jail (with both v4 and v6!) under: > > :! uname -a > > [No write since last change] > > FreeBSD name.eagle.ca 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 > 08:49:13 UTC 2009 > root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 > I'm currently in Darwin, Australia and ssh'ing back to the UK to compose this email using vim on the remote end. Latency is a bit so so but it's doable with vim :) > Cheers, > > Steve Regards, -- Frank Contact info: http://www.shute.org.uk/misc/contact.html