Welcome to OStack Knowledge Sharing 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 Answer

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?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...