Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > vi command mode in bash, ctrl + L behavior

vi command mode in bash, ctrl + L behavior
Thread Tools
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Sep 15, 2007, 11:39 AM
 
I am running bash 3.2 in xterm in X11, and being a lover of all things vi/vim, I finally changed my line-edit mode to vi using:

set -o vi

Does anyone know how to set that default other than adding it to the .bash_profile, etc.? Actually, the question I had was the following. I read in a book that the

ctrl + L

behavior, which clears screen in the default emacs-like mode, should also work to clear the screen in vi mode. However I just get the printed character: ^L, which is annoying since it's the ONLY emacs command I actually can remember. It's really useful . Anyway, does anyone know how I can preserve the ctrl+L behavior in vi mode to clear the screen?

Thanks ...
     
~bash $  (op)
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Oct 8, 2007, 09:48 PM
 
add this to your .bashrc, etc:

bind -m vi-insert ā€œ\C-lā€:clear-screen
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:38 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2