diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-08-24 12:34:24 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-08-24 12:34:24 +0200 |
commit | be8d039e02e4e4219639935aafa1194932e980e7 (patch) | |
tree | 875d2546e002b305f135c457518d0b070578c7db /ftplugin | |
parent | 38ce8e9cb6ad2fb99401f4dc13b9032547893b25 (diff) | |
download | vim-polyglot-be8d039e02e4e4219639935aafa1194932e980e7.tar.gz vim-polyglot-be8d039e02e4e4219639935aafa1194932e980e7.zip |
Remove vifm and test all filetypes
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/mail_vifm.vim | 66 | ||||
-rw-r--r-- | ftplugin/vifm-cmdedit.vim | 23 | ||||
-rw-r--r-- | ftplugin/vifm-edit.vim | 17 | ||||
-rw-r--r-- | ftplugin/vifm-rename.vim | 62 | ||||
-rw-r--r-- | ftplugin/vifm.vim | 50 |
5 files changed, 0 insertions, 218 deletions
diff --git a/ftplugin/mail_vifm.vim b/ftplugin/mail_vifm.vim deleted file mode 100644 index 4896b892..00000000 --- a/ftplugin/mail_vifm.vim +++ /dev/null @@ -1,66 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1 - -" Mail file type extension to pick files for attachments via vifm -" Maintainer: xaizek <xaizek@posteo.net> -" Last Change: June 22, 2020 - -" Insert attachment picked via vifm after 'Subject' header -function! s:AddMailAttachments() - call vifm#globals#Init() - - " XXX: similar code is in plugins/vifm.vim, but it's different in details - let l:listf = tempname() - - if !has('nvim') - if has('gui_running') - execute 'silent !' g:vifm_term g:vifm_exec - \ '--choose-files' shellescape(l:listf, 1) - \ g:vifm_exec_args - else - execute 'silent !' g:vifm_exec - \ '--choose-files' shellescape(l:listf, 1) - \ g:vifm_exec_args - endif - - redraw! - - call s:HandleRunResults(v:shell_error, l:listf) - else - " Work around handicapped neovim... - let callback = { 'listf': l:listf } - function! callback.on_exit(id, code, event) - buffer # - silent! bdelete! # - call s:HandleRunResults(a:code, self.listf) - endfunction - enew - call termopen(g:vifm_exec . ' --choose-files ' . shellescape(l:listf, 1) - \. ' ' . g:vifm_exec_args, callback) - - startinsert - endif -endfunction - -function! s:HandleRunResults(exitcode, listf) - if a:exitcode != 0 - echoerr 'Got non-zero code from vifm: ' . a:exitcode - call delete(a:listf) - return - endif - - let l:insert_pos = search('^Subject:', 'nw') - - if filereadable(a:listf) && l:insert_pos != 0 - for line in readfile(a:listf) - call append(l:insert_pos, 'Attach: '.escape(line, " ")) - let l:insert_pos += 1 - endfor - endif - call delete(a:listf) -endfunction - -nnoremap <buffer> <silent> <localleader>a :call <sid>AddMailAttachments()<cr> - -" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : - -endif diff --git a/ftplugin/vifm-cmdedit.vim b/ftplugin/vifm-cmdedit.vim deleted file mode 100644 index 42487b34..00000000 --- a/ftplugin/vifm-cmdedit.vim +++ /dev/null @@ -1,23 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1 - -" vifm command-line editing buffer filetype plugin -" Maintainer: xaizek <xaizek@posteo.net> -" Last Change: August 18, 2013 - -if exists("b:did_ftplugin") - finish -endif - -let b:did_ftplugin = 1 - -" Behave as vifm script file -runtime! ftplugin/vifm.vim - -" Use vifm script highlighting -set syntax=vifm - -call vifm#edit#Init() - -" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : - -endif diff --git a/ftplugin/vifm-edit.vim b/ftplugin/vifm-edit.vim deleted file mode 100644 index e9362bf7..00000000 --- a/ftplugin/vifm-edit.vim +++ /dev/null @@ -1,17 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1 - -" vifm command-line editing buffer filetype plugin -" Maintainer: xaizek <xaizek@posteo.net> -" Last Change: August 18, 2013 - -if exists("b:did_ftplugin") - finish -endif - -let b:did_ftplugin = 1 - -call vifm#edit#Init() - -" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : - -endif diff --git a/ftplugin/vifm-rename.vim b/ftplugin/vifm-rename.vim deleted file mode 100644 index 02f6b3c5..00000000 --- a/ftplugin/vifm-rename.vim +++ /dev/null @@ -1,62 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1 - -" Filetype plugin for vifm rename buffer -" Maintainer: xaizek <xaizek@posteo.net> -" Last Change: October 05, 2014 - -if exists("b:did_ftplugin") - finish -endif - -let b:did_ftplugin = 1 - -" Copy list of original file names -let s:files = getline(1, '$') - -" Closes window/tab/Vim when buffer is left alone in there -function! s:QuitIfOnlyWindow() - " Boil out if there is more than one window - if winbufnr(2) != -1 - return - endif - - " Just close tab with this single window or quit Vim with last tab - if tabpagenr('$') == 1 - bdelete - quit - else - close - endif -endfunction - -" Create a vertical split window for original file names and configure it -belowright vsplit __VifmRenameOrig__ -enew -call setline(1, s:files) -setlocal buftype=nofile -setlocal bufhidden=hide -setlocal noswapfile -setlocal nobuflisted -setlocal cursorbind -setlocal scrollbind -setlocal nocursorline - -" Free now useless list of file names -unlet s:files - -" Setup a hook in auxiliary local window to do not leave it alone, when it's -" useless -augroup VifmRenameAutoCmds - autocmd! * <buffer> - autocmd BufEnter <buffer> call s:QuitIfOnlyWindow() -augroup END - -" Go back to the original window and ensure it will remain synchronized with -" the auxiliary one -wincmd w -setlocal cursorbind -setlocal scrollbind - -" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : - -endif diff --git a/ftplugin/vifm.vim b/ftplugin/vifm.vim deleted file mode 100644 index abae28b3..00000000 --- a/ftplugin/vifm.vim +++ /dev/null @@ -1,50 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1 - -" vifmrc filetype plugin -" Maintainer: xaizek <xaizek@posteo.net> -" Last Change: July 08, 2016 -" Based On: Vim file type file by Bram Moolenaar - -if exists("b:did_ftplugin") - finish -endif - -let b:did_ftplugin = 1 - -let s:cpo_save = &cpo -set cpo-=C - -let b:undo_ftplugin = "setlocal formatoptions< comments< textwidth< commentstring<" - -" Break comment lines but not other lines -setlocal formatoptions-=t formatoptions+=croql - -" Set comment character -setlocal comments=:\" - -" Format comments to be up to 78 characters long -if &textwidth == 0 - setlocal textwidth=78 -endif - -" Comments start with a double quote -setlocal commentstring=\"%s - -" Move around comments -nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> -vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> - -" Let the matchit plugin know what items can be matched. -if exists("loaded_matchit") - let b:match_ignorecase = 0 - let b:match_words = '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>' -endif - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : - -endif |