This repository was archived by the owner on Jun 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ With isort you can sort python imports. It can see and sort them in order according to PEP8.
2+
3+ we'll set up codefmt and configure the vroom environment, then jump into some
4+ examples.
5+
6+ :source $VROOMDIR/setupvroom.vim
7+
8+ :let g:repeat_calls = []
9+ :function FakeRepeat(...)<CR>
10+ | call add(g:repeat_calls, a:000)<CR>
11+ :endfunction
12+ :call maktaba#test#Override('repeat#set', 'FakeRepeat')
13+
14+ :call codefmt#SetWhetherToPerformIsAvailableChecksForTesting(0)
15+
16+ The isort formatter/sorter expects you to have isort executable
17+ installed on your system.
18+
19+ % f()
20+ :FormatCode isort
21+ ! isort .*
22+ $ f()
23+
24+ The name or path of the isort executable can be configured via the
25+ isort_executable flag if the default of "isort" doesn't work.
26+
27+ You can format any buffer with black specifying the formatter explicitly.
28+ Here's an example:
29+
30+ @clear
31+ %import sys
32+ %import os
33+
34+ :FormatCode isort
35+ ! isort .*
36+ $ import os
37+ $ import sys
38+ import os
39+ import sys
40+ @end
You can’t perform that action at this time.
0 commit comments