Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Bash added to the Vi mode indicator     - Getting Started with Linux system to learn: how to get the process ID (PID) in the script (Linux)

- CentOS minimal network is unavailable resolved (Linux)

- Linux nice program origin of the name (Linux)

- Linux Network Programming - signal blocking and shielding (block, unblock) (Programming)

- MySQL + Corosync + Pacemaker + DRBD build highly available MySQL (Server)

- Java memory model subclasses (Programming)

- ARM assembler instruction debugging method (Programming)

- Ubuntu 15.10 15.04 14.10 14.04 Install Ubuntu Tweak (Linux)

- Shorewall firewall settings under Ubuntu (Linux)

- KVM QEMU virtual machine installation configuration under CentOS (Linux)

- Java Concurrency - multiple threads of HelloWorld (Programming)

- How to configure security management services under Linux (Linux)

- How to protect the Apache website under Linux system (Linux)

- How to install and configure a VNC server on CentOS 7.0 (Server)

- To install Ganglia (Linux)

- Java code JIT compiler-friendly Mody (Programming)

- Ease of use "Explain Shell" script to understand Shell command (Linux)

- MySQL 5.7.9 source compiler installation instructions (Database)

- Getting Started with Linux: Learn how to install and access CentOS 7 Remote Desktop on a VPS (Server)

- MySQL Basic tutorial: About varchar (N) (Database)

  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.
- Apache Spark1.1.0 deployment and development environment to build (Server)
- Build RPM package uses Docker mirror (Linux)
- Spark read more HBase tables a RDD (Server)
- To configure Samba to share files with Windows under CentOS (Linux)
- IOwait Linux system monitoring diagnostic tools (Linux)
- To install and deploy PHP environment under the CentOS (Server)
- Oracle 11g through SCN do incremental backup repair standby library detailed process (Database)
- Zookeeper Rights Management and Quota Management (Server)
- Using packet capture libpcap be reconciliation package in Ubuntu 14.04 64 bits (Linux)
- Install GAMIT / GLOBK 10.50 software under Ubuntu 14.04 (Linux)
- Linux learning portal: CentOS 6.4 system kernel upgrade (Linux)
- Migrate Oracle database files to ASM (Database)
- VirtualBox snapshots (Linux)
- MySQL performance view and configure finishing Daquan (Database)
- Download Google Android source code under Ubuntu 4.4 (Linux)
- Java to create a table in the database SYBase (Database)
- Linux memory Cache Analysis (Linux)
- Oracle database online redo logs are several methods of recovery of deleted (Database)
- How to ensure that the Internet will not be attacked (Linux)
- Linux using DenyHosts prevents ssh cracks (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.