简体   繁体   中英

How do you make Vim key mappings similar to ZZ?

In Vim you can save all your files and quit by typing ZZ . How can I create a similar mapping but for a different key? Some keys like h , j , k , and l it seems like this would not be possible. Are there any keys that you could do a similar mapping to ZZ ?

Derobert is correct. There is nothing special about the ZZ type of key combination.

For example, you can create a key shortcut to save all your files without quitting when you type "__" (two underscores) by putting the following in your .vimrc:

nmap __ :wa<CR>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM