Skip to content

Commit f4c1a8b

Browse files
committed
feat(python): add format tool
Signed-off-by: bbxytl <[email protected]>
1 parent e31f472 commit f4c1a8b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

config/filetype_bundles/python.vim

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" Author : bbxytl
55
66
" File Name : python.vim
7-
" Last Modified : 2021-03-03 17:46
7+
" Last Modified : 2024-02-22 17:41
88
" Describe :
99
"
1010
" ====================================================
@@ -35,4 +35,7 @@ let python_highlight_all = 1
3535
" let g:jedi#completions_command = "<C-Tab>"
3636
" let g:jedi#rename_command = "jr"
3737

38-
38+
Bundle 'tell-k/vim-autopep8'
39+
let g:autopep8_max_line_length=1000
40+
let g:autopep8_disable_show_diff=1
41+
let g:autopep8_on_save = 1

config/vimrc.bundles_complex

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
" Author : bbxytl
55
66
" File Name : vimrc.bundles_complex
7-
" Last Modified : 2022-06-16 12:44
7+
" Last Modified : 2024-02-22 17:07
88
" Describe :
99
" 默认补全工具使用 ycm, 可通过在 bundle 目录下建立
1010
" 软连接 vimrc.bundles_completion 来修改补全工具
@@ -25,6 +25,8 @@ noremap <F8> :Autoformat<CR>
2525
" au BufWrite * :Autoformat
2626
" let g:autoformat_verbosemode=1
2727
" let g:autoformat_autoindent = 1
28+
" let g:formatdef_autopep8 = "'autopep8 - --range '.a:firstline.' '.a:lastline"
29+
" let g:formatters_python = ['flake8']
2830
" 格式化shell, vim-autoformat 包含了此功能
2931
" Bundle 'z0mbix/vim-shfmt', { 'for': 'sh' }
3032
" 根据文件调用不同的插件

0 commit comments

Comments
 (0)