local diffs?

2007-05-29 Thread Jonas Persson

Hello,
I'm looking for a quick and easy way to compare two pieces of code 
inside a single file. I find it to be quite a common use case to compare 
two functions or code block to see if they are similar enough to be 
refactored out to a single function.


/ Jonas



Re: bracket completion

2007-04-03 Thread Jonas Persson
I just downloaded and it works great. I have one wish though. I have 
syntax folding for C++ and usually have a lot of open/closed folds. But 
when I write a {, all folds open. Is it possible to have the {} pair 
inserted without disturbing the folds?


/ Jonas

Karl Guertin skrev:

On 3/31/07, Greg Fitzgerald <[EMAIL PROTECTED]> wrote:

Anyone know of a way to achieve bracket completion?


I've been sitting on a plugin that does this for a month or so. The
main difference between my plugin and the rest of the options here is
that I do the completion without breaking history or repeat.

Freshly uploaded to vim.org:

http://www.vim.org/scripts/script.php?script_id=1849

This plugin was pared down from a larger script that included a set of
less reusable mappings, so let me know if there's a problem.





Re: The Seven Habits Of Effective Text Editing 2

2007-02-17 Thread Jonas Persson

Jimmy Mack skrev:
Hi Bram, 


I just heard about your recent talk at google, entitled
"The Seven Habits Of Effective Text Editing 2".
( 
http://google-code-updates.blogspot.com/2007/02/open-source-developers-google-speaker.html
 )

The original "seven habits of effective text editing" was fascinating and 
useful.  I am sure that I'm not the only vimmer who would
 be interested in hearing more about this updated version.  However, I can't 
find any links to  either a video or a transcript of this talk.  Are you 
planning to make this available on your website?  Is it available elsewhere?

--Fraser Hanson


http://video.google.com/videoplay?docid=2538831956647446078&q=engedu+vim



Re: Grab visual selection

2007-02-12 Thread Jonas Persson

Georg Dahn skrev:

Jonas Persson wrote:

I'm lookning for the eqvivalent of  (grab word under cursor)
for grabbing the current visual selection into the command line.
Any suggestions?


Well, I would yank the current visual selection with y, and in the 
command line I would do " (where " is the unnamed register).


Yes, but thats not really the equivalent. You need to get back to visual 
mode from command mode where you are typing (or at least I would, as I 
seldom plan ahead enough to have an active yank at that point ;). And, 
more important, since I am going to use it in mappings I dont want any 
registers overwritten.


/ Jonas


Grab visual selection

2007-02-11 Thread Jonas Persson

Hi,
I'm lookning for the eqvivalent of  (grab word under cursor)
for grabbing the current visual selection into the command line.
Any suggestions?

/ Jonas