Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Bash added to the Vi mode indicator     - Ubuntu 14.04 installed NVIDIA graphics driver (Linux)

- To install MySQL 5.6 binary packages under CentOS 6.4 64bit (Database)

- Linux Network Programming - libnet Guide (Programming)

- To explore the Android ListView caching mechanism again (Programming)

- Netapp storage routine inspections and information gathering (Linux)

- Linux file system management partition, format, mount - label mount (Linux)

- Use DB2 federated access Oracle (Database)

- Linux 101 hack book reading notes (Linux)

- Java threads in the life cycle (Programming)

- Android Sets the system screen brightness (Programming)

- Use the command line MySQL database backup and recovery (Database)

- Linux System Getting Started Learning: After starting in Ubuntu or Debian, enter the command line (Linux)

- Why learn and use C language (Programming)

- Using the Android interface in Parcelable (Programming)

- How to forcibly change the Linux system password on a regular basis (Linux)

- How to use the beta / unstable version of the software in Debian library (Linux)

- Java List add duplicate the same object (Programming)

- Android in the coordinate system and a method to obtain the coordinates (Programming)

- Linux AS4 VPN server in conjunction with a firewall perfect (Linux)

- On FreeBSD 10.2 Bugzilla how to install and configure Apache SSL (Server)

  Bash added to the Vi mode indicator
  Add Date : 2018-11-21      
  With a long zsh the Vi command line editing mode, sometimes trance Where own patterns. As we all know, Vim status line can be displayed indicating mode, in order to illustrate the normal mode or insert mode. If this feature we can Vim zsh transplanted into the body, it would be perfect.

With a man zshzle looked at the documents, I found not difficult to implement, simply add the following to the .zshrc in:

function zle-line-init zle-keymap-select {
     VIMODE = "$ {$ {KEYMAP / vicmd / - NORMAL -} / (main | viins) / - INSERT -}"
     zle reset-prompt
zle -N zle-line-init
zle -N zle-keymap-select

RPROMPT = '% {$ fg [green]%} $ {VIMODE}% {$ reset_color%}'

Explain a little, we set the first variable VIMODE save the default state (insert), then use two widgets zle provided to replace the variable content and redraws the prompt. Then perform zle widgets, and set RPROMPT enable indicator appears on the right.
- Ubuntu users to install Gnome-Pie 0.6.5 (Linux)
- How to fix Ubuntu / Mint can not add PPA source of error (Linux)
- Vagrant Getting Start (Linux)
- floating IP in OpenStack neutron (Server)
- How to install Visual Studio Code on Ubuntu (Linux)
- How to ensure that the Internet will not be attacked (Linux)
- How to use the TF / SD card making Exynos 4412 u-boot boot disk in Ubuntu (Linux)
- Java Foundation - Getting Start (Programming)
- Sniffer install applications in Linux supplement (Linux)
- Ubuntu 14.04 Trusty Tahr User How to install Banshee 2.9.1 (Linux)
- Definition Format Oracle basis of various statements (Database)
- Use PuTTY key authentication mechanism for remote login Linux (Linux)
- Will Laravel become the most successful PHP framework? (Programming)
- How to upgrade to Ubuntu 14.04 Linux Kernel 4.4.1 LTS (Linux)
- After SSH change the default port, how to use Git (Linux)
- Simple to use multi-threaded programming under Linux mutex and condition variable (Programming)
- How to turn Java String into Date (Programming)
- Use py2exe to generate exe files Python script (Programming)
- shell script: MySQL startup script simple (Database)
- Use custom backup plans for Debian backupninja (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.