习惯性的敲一下Tab键好处挺多的:
-
节省时间,提高效率。敲几个字母就能出来。
-
对于记不住的命令,我们只需敲头几个字母,补全一下就知道我们需要的命令是什么。
-
目录路径补全,较短的路径手工敲还行,太长的路径要是没有补全功能真的是会累死人的。
vim tab.py
#!/usr/bin/python
# python startup file
import readline
import os
# tab completion
readline.parse_and_bind('tab: complete')
# history file
histfile = os.path.join(os.environ['HOME'], '.pythonhistory')
import tab
之后就可以使用tab键补齐了。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20456558/viewspace-1151213/
,如需转载,请注明出处,否则将追究法律责任。