teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

ミスタイプ

2020/09/07 08:42

投稿

pastelkona
pastelkona

スコア31

answer CHANGED
@@ -1,20 +1,20 @@
1
1
  解決ではないがとりあえずやりたいことはできたので解決とします。
2
2
 
3
3
  備考:
4
- au BufRead,DufNewFile *.py set &filetype=‘python’
4
+ au BufRead,BufNewFile *.py set &filetype=‘python’
5
5
  とinit.vimに入れるとpython.vim内のecho ‘This is the python’が実行されThis is the pythonと表示される。
6
6
  しかしながら当然エラーが出る。
7
7
  Error detected while processing BufReadPost Autocommands for “*.py”:
8
8
  E518: Unknown option: &filetype=‘python’
9
9
 
10
10
  また次の文でもエラーに違いはあるものの、 this is pythonが出る。
11
- au BufRead,DufNewFile *.py set &filetype=python
11
+ au BufRead,BufNewFile *.py set &filetype=python
12
- au BufRead,DufNewFile *.py &filetype=python
12
+ au BufRead,BufNewFile *.py &filetype=python
13
13
 
14
14
  次の文ではthis is pythonが出ない。
15
- au BufRead,DufNewFile *.py setfiletype python
15
+ au BufRead,BufNewFile *.py setfiletype python
16
- au BufRead,DufNewFile *.py echo ‘python’
16
+ au BufRead,BufNewFile *.py echo ‘python’
17
17
 
18
18
  とりあえず .pyのときだけして欲しい処理は関数python_configにまとめて
19
- au BufRead,DufNewFile *.py call python_config()
19
+ au BufRead,BufNewFile *.py call python_config()
20
20
  としました。(初めから大人しくそうしてればよかったですね。)