Re: delete lines

2006-08-10 Thread Tim Chase

And then I decide that I want to remove $blah2, so I start to press
backspace from here:

fucntion foo() {
$blah;
$blah2; - cursor here
}

and then when I get to the beginning of the line, it stops. Can I make
it so that it will follow up to the end of $blah on the previous line?



Sounds like you want to tweak your 'backspace' option.

:set backspace

should tell you what it currently is.

:help 'backspace'

should describe what's available in how backspace behaves with 
regards to various conditions.


You likely want to have a line in your vimrc that looks something 
like


set backspace=indent,eol,start

that will allow you to backspace over all three categories of 
things that might not otherwise be backspace-over-able. :)


-tim





RE: delete lines

2006-08-10 Thread Max Dyckhoff
The problem is your setting of backspace. It sounds like currently bs is
equal to indent,start or something similar. You need
indent,start,eol. The easiest way to do this is simply put this in
your .vimrc file:

:set bs=2

That should do it!

Max

 -Original Message-
 From: Ben lemasurier [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 10, 2006 10:51 AM
 To: vim@vim.org
 Subject: delete lines
 
 Hey everyone,
 
 Is there a way to make it so that when I am editing something like
this:
 
 
 function foo() {
$blah;
$blah2;
 }
 
 And then I decide that I want to remove $blah2, so I start to press
 backspace from here:
 
 fucntion foo() {
 $blah;
 $blah2; - cursor here
 }
 
 and then when I get to the beginning of the line, it stops. Can I make
 it so that it will follow up to the end of $blah on the previous line?
 
 thanks!
 
 Ben


Re: delete lines

2006-08-10 Thread Christian J. Robinson
Today (Thu, 10 Aug 2006), Ben lemasurier wrote:

 And then I decide that I want to remove $blah2, so I start to press
 backspace from here:
 
 fucntion foo() {
$blah;
$blah2; - cursor here
 }
 
 and then when I get to the beginning of the line, it stops. Can I
 make it so that it will follow up to the end of $blah on the
 previous line?

Try :set backspace+=eol -- see :help 'backspace'.

- Christian

-- 
  They that can give up essential liberty to obtain a little temporary
   safety deserve neither liberty nor safety.  -- Ben Franklin
Christian J. Robinson [EMAIL PROTECTED] http://infynity.spodzone.com/
   PGP keys: 0x893B0EAF / 0xFB698360   http://infynity.spodzone.com/pgp


Re: delete lines

2006-08-10 Thread Meino Christian Cramer
From: Christian J. Robinson [EMAIL PROTECTED]
Subject: Re: delete lines
Date: Thu, 10 Aug 2006 12:00:45 -0600 (MDT)

Hi,

 Today (Thu, 10 Aug 2006), Ben lemasurier wrote:
 
  And then I decide that I want to remove $blah2, so I start to press
  backspace from here:
  
  fucntion foo() {
 $blah;
 $blah2; - cursor here
  }
  
  and then when I get to the beginning of the line, it stops. Can I
  make it so that it will follow up to the end of $blah on the
  previous line?
 
 Try :set backspace+=eol -- see :help 'backspace'.
 
 - Christian
 
 -- 
   They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.  -- Ben Franklin
 Christian J. Robinson [EMAIL PROTECTED] http://infynity.spodzone.com/
PGP keys: 0x893B0EAF / 0xFB698360   http://infynity.spodzone.com/pgp
 

is it also possible to enable the backspace key in normal mode --
the delete key is working in normal, so why should I miss the 
backspace key ?

:)


mcc


Re: delete lines

2006-08-10 Thread Tim Chase

is it also possible to enable the backspace key in normal mode --
the delete key is working in normal, so why should I miss the 
backspace key ?



:nnoremap BS X

(all typed literally with greater-than and less-than signs included)

should do the trick.

-tim





Re: delete lines

2006-08-10 Thread Tim Chase

:nnoremap BS X


with this I cannot cross lines (delete $ between line n+1 and line
n coming from line n+1 while backspacing and it is not possible to
delete the last (or in other words the first char after ^ ) char of a
line.



Something perhaps like

:nnoremap bs ibsrightesc

might do the trick.  One edge-case I found with this one is if 
you're on a blank line and use backspace, you delete the 
backspace, but end up on the last character of the previous line, 
thus if you have



abcd
X

with the cursor on the X, and hit backspace, you end up on top 
of the d on the previous line (rather than after it).  Thus, 
hitting backspace again will leave you with abd instead of 
abc as one would normally want.


Haven't yet found a good solution to that one.

-tim