diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-06-11 23:21:38 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-06-11 23:21:38 +0200 |
| commit | 252cea169185f5a57acb6913f622950bb27458f8 (patch) | |
| tree | 33bc09c6a5abd5bd46faec09c10de226a9993a5c /vim/autoload/Pl/Mod.vim | |
| parent | e19087bc292678a526a8c780bbdc58b38dcecc2c (diff) | |
Drop support for vim, cleanup nvim config
Diffstat (limited to 'vim/autoload/Pl/Mod.vim')
| -rw-r--r-- | vim/autoload/Pl/Mod.vim | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vim/autoload/Pl/Mod.vim b/vim/autoload/Pl/Mod.vim deleted file mode 100644 index fdfb571..0000000 --- a/vim/autoload/Pl/Mod.vim +++ /dev/null @@ -1,40 +0,0 @@ -let s:segment_mods = [] - -function! Pl#Mod#AddSegmentMod(action, properties) " {{{ - call add(s:segment_mods, [a:action, a:properties]) -endfunction " }}} -function! Pl#Mod#ApplySegmentMods(theme) " {{{ - let theme = deepcopy(a:theme) - - for mod in s:segment_mods - let [action, properties] = mod - - " We have to loop through the segments instead of using index() because some - " segments are lists! - let target_seg_idx = -1 - - for i in range(0, len(theme) - 1) - unlet! segment - let segment = theme[i] - - if type(segment) == type(properties.target_segment) && segment == properties.target_segment - let target_seg_idx = i - break - endif - endfor - - if action == 'insert_segment' - " Insert segment - if target_seg_idx != -1 - call insert(theme, properties.new_segment, (properties.where == 'before' ? target_seg_idx : target_seg_idx + 1)) - endif - elseif action == 'remove_segment' - " Remove segment - if target_seg_idx != -1 - call remove(theme, target_seg_idx) - endif - endif - endfor - - return theme -endfunction " }}} |