Bash sets vi as the default editing mode

Source: Internet
Author: User
Bash sets vi as the default editing mode to edit the/etc/inputrc file, sets the global readline configuration, adds the following command: www.2cto.com # Ilikevimode, sets the default editing mode to visetediting-modevi # emacsmodesettings, e... bash sets vi as the default editing mode to edit the/etc/inputrc file, sets the global readline configuration, and adds the following command: www.2cto.com # I like vi mode, set the default editing mode to viset editing-mode vi # emacs mode settings, and emacs mode configuration command $ if mode = emacs #... # vi mode settings, vi mode configuration command $ else # Ctrl + l: clear screen, clear screen "\ C-l": clear-screen # Ctrl + p: p Revious-history, the previous historical command "\ C-p": previous-history # Ctrl + n: next-history, and the last historical command "\ C-n ": next-history # Ctrl + e: press esc, ESC key, you know "\ C-e": "\ e" $ endif description: the/etc/inputrc file is the global configuration file of libreadline. the personal configuration file is ~ /. The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. both Emacs and vi editing modes are available. the Readline library has des additional functions to maintain a list of previusly-entered command lines, to recall and perhaps reedit those lines, and perform csh-like his Specified expansion on previous commands. the history facilites are also placed into a separate library, the History library, as part of the build process. the History library may be used without Readline in applications which desire its capabilities. readline is free software, distributed under the terms of the GNU General Public License, version 3. this means that if you want to use Readline in a pro Gram that you release or distribute to anyone, the program must be free software and have a GPL-compatible license. if you wowould like advice on making your license GPL-compatible, contact licensing@gnu.org. bash provides convenient and quick editing of command lines through readline library, including various shortcut keys for command editing and command history operations.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.