LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-18-2011, 09:45 AM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Vim change until character


In Vim, I can change the text up until the next instance of "X" using this command:

Code:
cfX
The problem is that it includes "X". What if I want to change until, but not including, "X"?
 
Old 06-18-2011, 10:55 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I think you can use
Code:
ctX
It works for me in ViM 7.3.177
 
1 members found this post helpful.
Old 06-18-2011, 11:29 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Snark1994 View Post
I think you can use
Code:
ctX
It works for me in ViM 7.3.177
Thanks, that works. It's probably a newer Vim-specific feature, since I never saw it in any of the vi or Vim tutorials I saw.

Actually, I just tried in in vi (Arch Linux comes with the original vi), and "t" works there, too!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change character set in Linux Jackie_2008 Linux - Software 2 10-10-2010 01:00 PM
help me to change the character set hosney00ux Solaris / OpenSolaris 4 08-18-2009 06:43 AM
Character under cursor in Vim 7.0. judgex Programming 1 08-14-2006 08:06 PM
Change default character encoding alepou192 Ubuntu 2 05-23-2005 04:56 AM
indentation character in vim rhoekstra Linux - General 0 02-17-2005 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:23 AM.

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
Open Source Consulting | Domain Registration