← Back to team overview

launchpad-dev team mailing list archive

Re: New coding standard for formatting imports

 

On Thursday 19 August 2010 15:04:37 Benji York wrote:
> Another Vim tip for jumping around: ctrl-o will take you back to where
> you were, so adding an import by hand is:
> 
>     1G -- go to the top of the file
>     [misc screwing around to get the import added]
>     ctrl-o -- go back to where you were
> 
> Bonus tip: ctrl-i will go forward to where you were before so
> ctrl-i/ctrl-o travel forward/back in a sequence of file positions.

Ooo goody, it's turning into a vim tip thread :)

I use "marks" a lot.  So, hit "ma" to set a mark called "a" then you can use 
'a to jump to it later.

Also, you can reformat/reflow a chunk of text by:
shift-V to go into visual mode, and select the lines you want to reformat, 
then hit "gq".  That's quite useful for the current way of doing imports, but 
since they're changing then it's really useful for re-flowing comment blocks.



References