Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash added to the Vi mode indicator     - Compile and install LNMP under CentOS 6.5 (Server)

- Ubuntu installed Komodo editor by PPA (Linux)

- Moosefs Distributed File System Configuration (Server)

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

- Linux and Windows virtual machine shared folders ---- Linux install VMware tools (Linux)

- E: Sub-process / usr / bin / dpkg returned an error code (1) error solution (Linux)

- Debugging with GDB tool Go (Programming)

- RHEL7 unattended automatic installation DHCP + TFTP + SYSLINUX + TFTP + Kickstart (Linux)

- HBase table data processing tab (Database)

- Java semaphores (Programming)

- The array of C language (Programming)

- To create a file in Linux directory by setfacl (Linux)

- GAMIT 10.50 installed in Ubuntu 12.04 system (Linux)

- CentOS 5.x install Lua 5.2.3 error (LIBS = -lncurses) (Linux)

- Use ldap implement Windows Remote Desktop Ubuntu Linux (Linux)

- The YUM package management under Linux (Linux)

- Git you do not know about some of the things (Linux)

- Spring REST Exception Handling (Programming)

- ntop monitoring software configuration and installation (Linux)

- Use this one-time password via SSH secure login Linux (Programming)

 
         
  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:

VIMODE = '- INSERT -'
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.
     
         
         
         
  More:      
 
- Git delete files (Linux)
- Linux unpack the tar file to a different directory (Linux)
- HttpClient4 usage upgrade from HttpClient3 (Programming)
- An Example of GoldenGate Extract Process Hang Problem Solving (Database)
- Briefly explain the invasion of the four-level denial of service attack DoS Linux server (Linux)
- Linux initialization init systems - Systemd (Linux)
- Common DDOS attacks (Linux)
- How to install Visual Studio Code on Ubuntu (Linux)
- Firewall chapter of Linux server security configuration (Linux)
- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)
- Linux system Passwd file detailed analysis (Linux)
- Java learning problems encountered (Programming)
- SecureCRT remote connection Ubuntu fails to solve the case (Linux)
- Java MVC CRUD examples (Programming)
- Security: Unix operating system intrusion tracking Strikes Back (Linux)
- Ubuntu 14.04 modify environment variables (Linux)
- CentOS 6 rapid deployment of Java applications (Linux)
- Nginx concerning the location and rewrite applications proxy_pass (Server)
- Oracle VirtualBox Problem Solving Case (Linux)
- Android Studio commonly used shortcuts and how to follow the Eclipse Shortcuts (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.