Skip to content

Commit 2853f47

Browse files
authored
Merge pull request #29 from markx/master
Add commands to toggle modes
2 parents 6614327 + cbcb96a commit 2853f47

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

plugin/parinfer.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ try
1111
catch
1212
endtry
1313

14+
function! s:toggleMode()
15+
if g:parinfer_mode == "indent"
16+
let g:parinfer_mode = "paren"
17+
else
18+
let g:parinfer_mode = "indent"
19+
endif
20+
endfunction
21+
22+
function! s:turnOff()
23+
let g:parinfer_mode = "off"
24+
endfunction
25+
26+
command! ParinferToggleMode call <SID>toggleMode()
27+
command! ParinferOff call <SID>turnOff()
28+
1429
function! s:indentparen()
1530
if has('nvim') && g:parinfer_mode != "off"
1631
try

0 commit comments

Comments
 (0)