LinuxQuestions.org
Visit Jeremy's Blog.
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-29-2010, 05:48 AM   #1
noony123
Member
 
Registered: Oct 2010
Posts: 167

Rep: Reputation: 0
Change VI shortcuts


Hi all.

Can i change shortcuts of vi to something of my own.

For example, dd is use to cut the line. Can i use simply 'd' to delete the line instead ?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-29-2010, 07:42 AM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
The mappings option may help http://www.linux.com/archive/feed/54936
 
1 members found this post helpful.
Old 12-29-2010, 07:50 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Hi,
Quote:
Originally Posted by noony123 View Post
Can i change shortcuts of vi to something of my own.

For example, dd is use to cut the line. Can i use simply 'd' to delete the line instead ?
As stated by harry edwards, you can change your mapping, but do be careful with that.

dd isn't one "command", its 2.

The first d initiates, the second one tells vi what to do. This can be a d (dd), but the following also exist. Examples: d2d dl, dh and d<motion>.
If you alias/map dd to d, other commands might fail to work.

Hope this helps.
 
2 members found this post helpful.
Old 12-29-2010, 11:14 PM   #4
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
thanks a lot guys
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Change Document Viewer shortcuts Ubuntu213 Linux - Software 2 11-05-2010 02:14 PM
Cannot change keyboard shortcuts at Debian Squeeze ge0rge007 Debian 3 12-02-2009 10:40 AM
HOWTO: Change Keyboard Shortcuts in Iceweasel / Firefox fields LinuxQuestions.org Member Success Stories 0 03-07-2009 07:49 PM
how change shortcuts on text mode? xcore_on Linux - Newbie 2 05-16-2006 02:07 AM
kde "keyboard shortcuts": can't change modifiers & says no windows key peb Linux - Newbie 0 01-02-2004 04:41 PM


All times are GMT -5. The time now is 09:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration