aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/tutor.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/tutor.vim')
-rw-r--r--runtime/autoload/tutor.vim10
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/autoload/tutor.vim b/runtime/autoload/tutor.vim
index d2881f7f34..43d8a87886 100644
--- a/runtime/autoload/tutor.vim
+++ b/runtime/autoload/tutor.vim
@@ -2,6 +2,12 @@
" Setup: {{{1
function! tutor#SetupVim()
+ if &columns < 90
+ set columns=90
+ endif
+ if !exists('g:did_load_ftplugin') || g:did_load_ftplugin != 1
+ filetype plugin on
+ endif
if has('syntax')
if !exists('g:syntax_on') || g:syntax_on == 0
syntax on
@@ -245,13 +251,14 @@ endfunction
" Tutor Cmd: {{{1
function! s:Locale()
- let l:lang = ""
if exists('v:lang') && v:lang =~ '\a\a'
let l:lang = v:lang
elseif $LC_ALL =~ '\a\a'
let l:lang = $LC_ALL
elseif $LANG =~ '\a\a'
let l:lang = $LANG
+ else
+ let l:lang = 'en_US'
endif
return split(l:lang, '_')
endfunction
@@ -336,6 +343,7 @@ function! tutor#TutorCmd(tutor_name)
let l:to_open = l:tutors[l:tutor_to_open-1]
endif
+ call tutor#SetupVim()
exe "edit ".l:to_open
endfunction