aboutsummaryrefslogtreecommitdiffhomepage
path: root/.vim/my/autoload
diff options
context:
space:
mode:
Diffstat (limited to '.vim/my/autoload')
-rw-r--r--.vim/my/autoload/autosave.vim70
-rw-r--r--.vim/my/autoload/dummy.vim39
2 files changed, 0 insertions, 109 deletions
diff --git a/.vim/my/autoload/autosave.vim b/.vim/my/autoload/autosave.vim
deleted file mode 100644
index 0c34d0e..0000000
--- a/.vim/my/autoload/autosave.vim
+++ /dev/null
@@ -1,70 +0,0 @@
-scriptencoding utf-8
-
-
-
-if !exists('g:autosave_interval_ms')
- let g:autosave_interval_ms = 10 * 1000
-endif
-
-if !exists('g:autosave_silent')
- let g:autosave_silent = v:true
-endif
-
-
-
-function! autosave#handler(timer_id) abort
- if !&modified
- return
- endif
- if &readonly
- return
- endif
- if &buftype !=# ''
- return
- endif
- if expand('%') ==# ''
- return
- endif
-
- if !g:autosave_silent
- echohl Comment
- echo 'Auto-saving...'
- echohl None
- endif
-
- silent! write
-
- if !g:autosave_silent
- echohl Comment
- echo 'Saved.'
- echohl None
- endif
-endfunction
-
-
-function! autosave#enable() abort
- if has('+timers')
- echohl Error
- echo "Feature '+timers' not available."
- echohl None
- return
- endif
- if exists('b:autosave_timer')
- return
- endif
-
- let b:autosave_timer = timer_start(
- \ g:autosave_interval_ms,
- \ 'autosave#handler',
- \ { 'repeat': -1 })
-endfunction
-
-
-function! autosave#disable() abort
- if !exists('b:autosave_timer')
- return
- endif
-
- call timer_stop('b:autosave_timer')
- unlet b:autosave_timer
-endfunction
diff --git a/.vim/my/autoload/dummy.vim b/.vim/my/autoload/dummy.vim
deleted file mode 100644
index 3019bdf..0000000
--- a/.vim/my/autoload/dummy.vim
+++ /dev/null
@@ -1,39 +0,0 @@
-scriptencoding utf-8
-
-
-
-let s:text = {}
-
-let s:text.lipsum = [
- \ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
- \ 'incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis',
- \ 'nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
- \ 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore',
- \ 'eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt',
- \ 'in culpa qui officia deserunt mollit anim id est laborum.',
- \ ]
-
-let s:text.lipsum1 = join(s:text.lipsum)
-
-let s:text.quickbrownfox = 'The quick brown fox jumps over the lazy dog.'
-
-let s:text.ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-
-let s:text.abc = 'abcdefghijklmnopqrstuvwxyz'
-
-let s:text.hiragana = 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん'
-
-let s:text.katakana = 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン'
-
-let s:text.ihatovo = 'あのイーハトーヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモリーオ市、郊外のぎらぎらひかる草の波。'
-
-
-
-function! dummy#insert(type)
- call append(line('.'), get(s:text, a:type, ''))
-endfunction
-
-
-function! dummy#complete(arglead, cmdline, cursorpos) abort
- return sort(filter(keys(s:text), {idx, val -> val[0:len(a:arglead)-1] =~? a:arglead}))
-endfunction