diff --git a/vim/.config/vim/autoload/oh_hai.vim b/vim/.config/vim/autoload/oh_hai.vim new file mode 100644 index 0000000..03bef66 --- /dev/null +++ b/vim/.config/vim/autoload/oh_hai.vim @@ -0,0 +1,22 @@ +function! oh_hai#hello() abort + echo "💖 Oh, hai 💖" +endfunction + +function! oh_hai#run(args) abort + let args = map( + \ a:args[:], + \ { _, v -> shellescape(v) }, + \ ) + let output = system(join(args)) + return split(output, '\r\?\n') +endfunction + +function! oh_hai#runner(args) abort + let namespace = substitue(a:filetype, '\W', '_', 'g') + let funcname = printf('oh_hai#runner#%s#new'), a:filetype) + try + return call(funcname, []) + catch /:E117: [^:]\+: oh_hai#runner#[^#]\+#new/ + throw printf('oh_hai: Runner is not found: %s', a:filetype) + endtry +endfunction diff --git a/vim/.config/vim/plugin/oh_hai.vim b/vim/.config/vim/plugin/oh_hai.vim new file mode 100644 index 0000000..0ac070a --- /dev/null +++ b/vim/.config/vim/plugin/oh_hai.vim @@ -0,0 +1,8 @@ +if exists('g:oh_hai_loaded') + finish +endif +let g:oh_hai_loaded = 1 + + + +command! OhHai call oh_hai#hello() diff --git a/vim/.config/vim/plugin/theme.vim b/vim/.config/vim/plugin/theme.vim index d4a35aa..a4849a4 100644 --- a/vim/.config/vim/plugin/theme.vim +++ b/vim/.config/vim/plugin/theme.vim @@ -15,5 +15,6 @@ if (has("termguicolors")) set termguicolors endif -colorscheme molokai + +colorscheme gruvbox set background=dark