#我的 Vim 指令筆記
##vim 的三種模式 ###模式
輸入模式
:輸入內文。指揮模式
:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。執行模式
:文件存檔,離開等等行為。
###常用模式的切換
- 輸入模式 -> 指揮模式 : 鍵盤
Esc
# Run the last command as root | |
sudo !! | |
# Serve current directory tree at http://$HOSTNAME:8000/ | |
python -m SimpleHTTPServer | |
# Save a file you edited in vim without the needed permissions | |
:w !sudo tee % | |
# change to the previous working directory | |
cd - | |
# Runs previous command but replacing | |
^foo^bar |
/* | |
iflist.c : retrieve network interface information thru netlink sockets | |
(c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute | |
v1.0 : initial version - Feb 19th 2010 | |
This file was obtained at the following address : | |
http://www.iijlab.net/~jean/iflist.c |
## MAKEFILE V 1.3 ## | |
BIN = a.out | |
CC = gcc | |
CPLUS = g++ | |
LINK = g++ | |
OBJC = $(shell find ./src -name "*.c" | sed 's/\.c/\.o/g' | sed 's/\.\/src\//\.\/obj\//g') | |
OBJCPP = $(shell find ./src -name "*.cpp" | sed 's/\.cpp/\.opp/g' | sed 's/\.\/src\//\.\/obj\//g') | |
OBJ = $(OBJC) $(OBJCPP) |
#我的 Vim 指令筆記
##vim 的三種模式 ###模式
輸入模式
:輸入內文。指揮模式
:也叫指令模式,主要是進入到可以對文件做修改,複製,剪下貼上,游標移動等動作。執行模式
:文件存檔,離開等等行為。###常用模式的切換
Esc