Skip to content

Commit e36d07f

Browse files
committed
Fix some options resetting
* Do not reset indent options in undo_ftplugin (fix #14419) * Do not reset shiftwidth/expandtabl unless we've set them Also some cosmetic fixes
1 parent 20542b5 commit e36d07f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ftplugin/julia.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ setlocal fo-=t fo+=croql
2222
let b:julia_vim_loaded = 1
2323

2424
let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<"
25-
\ . " expandtab< shiftwidth<"
26-
\ . " define< fo< indentexpr< indentkeys< cinoptions< completefunc<"
25+
\ . " define< fo< cinoptions< completefunc<"
2726
\ . " | unlet! b:commentary_format"
2827
\ . " | unlet! b:smartcomment_force_linemode"
2928
\ . " | unlet! b:julia_vim_loaded"
30-
29+
3130
if !exists("g:julia_set_indentation") || g:julia_set_indentation != 0
3231
" As suggested by Style Guide.
3332
setlocal expandtab shiftwidth=4
33+
let b:undo_ftplugin .= " | setlocal expandtab< shiftwidth<"
3434
endif
3535

3636
" MatchIt plugin support
@@ -105,7 +105,7 @@ let b:smartcomment_force_linemode = 1 " for carlobaldassi/vim-smartcomment
105105

106106
if has("gui_win32")
107107
let b:browsefilter = "Julia Source Files (*.jl)\t*.jl\n"
108-
let b:undo_ftplugin = b:undo_ftplugin . " | unlet! b:browsefilter"
108+
let b:undo_ftplugin .= " | unlet! b:browsefilter"
109109
endif
110110

111111
" Lookup documents

indent/julia.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ setlocal indentkeys-=0{
1414
setlocal indentkeys-=0}
1515
setlocal nosmartindent
1616

17-
let b:undo_indent = "setl ai< inde< indk< si<"
17+
let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys< smartindent<"
1818

1919
" Only define the function once.
2020
if exists("*GetJuliaIndent")

0 commit comments

Comments
 (0)