From f70d5dc9b1f546bcfae67f067fe2e3b67f94ca45 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 3 Nov 2021 19:59:44 +0100 Subject: improving dotfiles --- vim/vim-potion/ftplugin/potion/folding.vim | 38 ----------------------- vim/vim-potion/ftplugin/potion/running.vim | 6 ---- vim/vim-potion/ftplugin/potion/sections.vim | 47 ----------------------------- 3 files changed, 91 deletions(-) delete mode 100644 vim/vim-potion/ftplugin/potion/folding.vim delete mode 100644 vim/vim-potion/ftplugin/potion/running.vim delete mode 100644 vim/vim-potion/ftplugin/potion/sections.vim (limited to 'vim/vim-potion/ftplugin') diff --git a/vim/vim-potion/ftplugin/potion/folding.vim b/vim/vim-potion/ftplugin/potion/folding.vim deleted file mode 100644 index d4cb32b..0000000 --- a/vim/vim-potion/ftplugin/potion/folding.vim +++ /dev/null @@ -1,38 +0,0 @@ -setlocal foldmethod=expr -setlocal foldexpr=GetPotionFold(v:lnum) - -function! s:NextNonBlankLine(lnum) - let numlines = line('$') - let current = a:lnum + 1 - - while current <= numlines - if getline(current) =~? '\v\S' - return current - endif - - let current += 1 - endwhile - - return -2 -endfunction - -function! s:IndentLevel(lnum) - return indent(a:lnum) / &shiftwidth -endfunction - -function! GetPotionFold(lnum) - if getline(a:lnum) =~? '\v^\s*$' - return '-1' - endif - - let this_indent = IndentLevel(a:lnum) - let next_indent = IndentLevel(NextNonBlankLine(a:lnum)) - - if next_indent == this_indent - return this_indent - elseif next_indent < this_indent - return this_indent - elseif next_indent > this_indent - return '>' . next_indent - endif -endfunction diff --git a/vim/vim-potion/ftplugin/potion/running.vim b/vim/vim-potion/ftplugin/potion/running.vim deleted file mode 100644 index d70adc0..0000000 --- a/vim/vim-potion/ftplugin/potion/running.vim +++ /dev/null @@ -1,6 +0,0 @@ -if !exists("g:potion_command") - let g:potion_command = "potion" -endif - -nnoremap r :call potion#running#PotionCompileAndRunFile() -nnoremap b :call potion#running#PotionShowBytecode() diff --git a/vim/vim-potion/ftplugin/potion/sections.vim b/vim/vim-potion/ftplugin/potion/sections.vim deleted file mode 100644 index 200415c..0000000 --- a/vim/vim-potion/ftplugin/potion/sections.vim +++ /dev/null @@ -1,47 +0,0 @@ -function! s:NextSection(type, backwards, visual) - - if a:visual - normal! gv - endif - - if a:type == 1 - let pattern = '\v(\n\n^\S|%^)' - let flags = 'e' - elseif a:type == 2 - let pattern = '\v^\S.*\=.*:$' - let flags = '' - endif - - if a:backwards - let dir = '?' - else - let dir = '/' - endif - - execute 'silent normal! ' . dir . pattern . dir . flags . "\r" - -endfunction - -noremap