We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43e42ee commit cf178b0Copy full SHA for cf178b0
2 files changed
autoload/sj/cue.vim
@@ -1,3 +1,15 @@
1
+function! sj#cue#SplitImports()
2
+ let pattern = '^import\s\+\(\%(\k\+\s\+\)\=\%(".*"\)\)$'
3
+
4
+ if getline('.') =~ pattern
5
+ call sj#Keeppatterns('s/' . pattern . '/import (\r\1\r)/')
6
+ normal! k==
7
+ return 1
8
+ else
9
+ return 0
10
+ endif
11
+endfunction
12
13
function! sj#cue#SplitStructLiteral()
14
let [from, to] = sj#LocateBracesOnLine('{', '}')
15
ftplugin/cue/splitjoin.vim
@@ -3,7 +3,7 @@ if !exists('b:splitjoin_split_callbacks')
\ 'sj#cue#SplitStructLiteral',
\ 'sj#cue#SplitArray',
\ 'sj#cue#SplitArgs',
- \ 'sj#go#SplitImports',
+ \ 'sj#cue#SplitImports',
\ ]
endif
0 commit comments