Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
246 views
in Technique[技术] by (71.8m points)

My VIM configuration doesn't work with autocmd plugin

set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
set nu
set autoindent
set cindent
set encoding=utf-8
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
filetype plugin indent on
autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4
                                                                       

I added the last two lines into .vimrc but received this error message:

-bash: filetype: command not found
-bash: autocmd: command not found  

I haven't used this plugin before and what's the proper way to enable it? My purpose is to avoid the error message when I edit a file with vim on a Linux machine remotely:

TabError: inconsistent use of tabs and spaces in indentation
question from:https://stackoverflow.com/questions/65837664/my-vim-configuration-doesnt-work-with-autocmd-plugin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
-bash: filetype: command not found
-bash: autocmd: command not found

These errors seem to be printed by bash,
did you run something like source .vimrc?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...