LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-13-2010, 08:19 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Rep: Reputation: 51
Erasing from the cursor up to the beginning of the following word in Vim.


In a wide family of "ancient" text editors, by pressing ^T you erased from the cursor up to the beginning of the following word. If we use '_' to represent the cursor, the thing was like this:
Code:
want to feel _           at home with vim.
If I now hold <CNTL> down and press <T>, the result will be
Code:
want to feel at home with vim.
Many times I have consulted and even tried to systematically study vim's man page. Sometimes I consulted it with profit, sometimes not. This is one of the latter. Greetings.

Last edited by stf92; 12-13-2010 at 08:31 PM.
 
Old 12-13-2010, 08:24 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Well greetings to you to. It looks like vim is not like those other editors. I don't believe that this is the correct forum to make a post that is nothing more than a statement.
 
Old 12-13-2010, 08:26 PM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
What's the question?
 
Old 12-13-2010, 08:30 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Original Poster
Rep: Reputation: 51
I beg your pardon. I forgot to ask the question, which is "what's an equivalent keystroke or keystroke combination in Vim?
 
Old 12-13-2010, 08:32 PM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by stf92 View Post
I beg your pardon. I forgot to ask the question, which is "what's an equivalent keystroke or keystroke combination in Vim?
dw?
 
Old 12-13-2010, 08:34 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
I agree,

dw

is probably what you want there.
 
Old 12-13-2010, 08:36 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Original Poster
Rep: Reputation: 51
You are right. I never imagined. I gave 'dw' a more restricted use. Thanks.

EDIT: w is a movement. And pressed where the cursor is in my example, it goes to the beginning of 'at home with ...'. Hence, dw does the same movement, but erasing as the cursor moves. I mean, it's quite logical.

Last edited by stf92; 12-13-2010 at 08:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off




All times are GMT -5. The time now is 09:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration