?? ex69.sh
字號:
#!/bin/bash# Non-interactive use of 'vi' to edit a file.# Emulates 'sed'.E_BADARGS=65if [ -z "$1" ]then echo "Usage: `basename $0` filename" exit $E_BADARGSfiTARGETFILE=$1# Insert 2 lines in file, then save.#--------Begin here document-----------#vi $TARGETFILE <<x23LimitStringx23iThis is line 1 of the example file.This is line 2 of the example file.^[ZZx23LimitStringx23#----------End here document-----------## Note that ^[ above is a literal escape#+ typed by Control-V <Esc>.# Bram Moolenaar points out that this may not work with 'vim',#+ because of possible problems with terminal interaction.exit 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -