我正在从vim中学习vimtutor,我目前正在学习第5课,他们在其中引入了外部命令前缀!command和外部命令后缀command!。我测试了命令ls并执行了以下操作:
输入:!ls后,我得到:
Desktop Downloads Music Public TEST
Documents Pictures Templates Videos
Press ENTER or type command to continue
当我看到文件夹和文件列表时,我知道它的作用就像在终端中键入ls,但是当我输入:ls!时,它得到了:
:ls!
1 %a "/tmp/
当我跑的时候
vim good.html
和
:verbose set et?
expandtab
Last set from ~/.vimrc
但当我跑
vim good.py
和
:verbose set et?
expandtab
Last set from /usr/share/vim/vim74/ftplugin/python.vim
我希望在.py中应用~/..vimrc文件,而不是python.vim
昨天我一切都很好,但今天突然改变了道路
请有人教我如何改变道路
在vim中使用!{cmd}时,默认情况下不清除前面命令的输出。例如,我在VIM:!中执行了两个外部命令。制造和!gcc。我打字的时候!gcc,以前的输出命令!make包括:
user@desktop:~$ vim
make: *** No targets specified and no makefile found. Stop.
shell returned 2
Press ENTER or type command to continue
gcc: fatal error: no input files
compilation terminated.
shell returne