commit 4364956abb20f0dae1840fdeebd129926a90eab6
parent dffac47f3fe754c8183c2d1c864db61d5b1f2ba2
Author: Jake Bauer <jbauer@paritybit.ca>
Date: Tue, 2 Feb 2021 20:47:36 -0500
Remove buftabline plugin
Diffstat:
5 files changed, 0 insertions(+), 507 deletions(-)
diff --git a/.config/nvim/bundle/vim-buftabline/LICENSE b/.config/nvim/bundle/vim-buftabline/LICENSE
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Aristotle Pagaltzis
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/.config/nvim/bundle/vim-buftabline/README.md b/.config/nvim/bundle/vim-buftabline/README.md
@@ -1,150 +0,0 @@
-<h1 align="center">Buftabline</h1>
-
-<div align="center">
-A well-integrated, low-configuration buffer list that lives in the tabline<br>
-<img src="https://raw.githubusercontent.com/ap/vim-buftabline/26302bf68bd417a97bada3978d4dbff0546f57ac/screenshot.png" width="871" height="585">
-</div>
-
-
-Buffer basics
--------------
-
-If you don’t know anything about buffers, the minimum you have to know is that
-a buffer in Vim essentially means a file, and if you set `hidden`, Vim can keep
-files open without necessarily displaying them on screen. You can then use the
-`:bnext` and `:bprev` commands to change which buffer is being displayed in the
-current window, and `:ls` to look at the list of buffers.
-
-If this is all news to you, you should probably add this to your configuration:
-
- set hidden
- nnoremap <C-N> :bnext<CR>
- nnoremap <C-P> :bprev<CR>
-
-For the full story, read [`:help windows.txt`][windows].
-
-
-Why this and not Vim tabs?
---------------------------
-
-Vim tabs are not very useful except in very particular circumstances.
-To understand why this is, you have to understand that the display in Vim
-has 3 layers of indirection:
-
-1. Buffers correspond to files.
-
- Not necessarily to files on disk, but in potentiality; i.e. a buffer becomes
- the content of a file when you do `:w`
-
-2. Windows correspond to rectangular areas on the screen, each associated with
- some buffer.
-
- Any window can be associated with any buffer, and any buffer with any
- window. You can change which buffer is shown in a window at any time, and
- you can split and resize windows to create any on-screen arrangement you
- want. So you could have 3 windows showing the same buffer, e.g. to work on
- several areas of a file at once.
-
- Note that while windows are always associated with a buffer - i.e. an area
- of the screen always shows some file –, a buffer need not be associated with
- any window – i.e. a file may be loaded without being shown on screen.
-
-3. Tabs correspond to entire screens, i.e. to an arrangement of windows.
-
- In other windowing environments this concept is often called a viewport,
- or a virtual desktop. Each window belongs to one particular tab. But note
- that a buffer can be shown in any window (or no window at all), so any file
- can appear any number of times in any number of tabs. Tabs and files do not
- have anything to do with each other.
-
-Now it is possible to open just one full-screen window in each tab, and in each
-window edit a different buffer, in effect associating tabs with files. But this
-only works if you stay away from any other window or buffer management, i.e. if
-you never create splits and never touch the buffer list. Even then there are
-parts of Vim (such as the help function and the netrw Explorer) that expect to
-be working with windows, not tabs, and so can easily inadvertently shatter the
-illusion.
-
-So if you consider what Vim tabs actually are, i.e. viewports, and you use Vim
-in a typical way, there are only very limited circumstances in which you will
-ever need such functionality, if at all.
-
-What the typical user wants when they think of tabs is simply the ability to
-open multiple files and then flip between them, which in Vim means they want
-buffers – not tabs.
-
-
-Buftabline vs. X
-----------------
-
-As of Nov 15, 2014, here is how Buftabline compares with some other plugins
-of which I am aware that they offer related functionality, roughly in order
-of their age.
-
-
-* [MiniBufExpl](http://www.vim.org/scripts/script.php?script_id=159)
-
- Obviously no rundown can be complete without the veteran of buffer list
- plugins, Mini Buffer Explorer. There are two major differences:
-
- 1. Buftabline uses the tabline while MiniBufExpl renders to a special buffer
- in a split. The tabline is newer than MiniBufExpl, and unlike a buffer, it
- is guaranteed to stick to the top of the screen within Vim, unaffected by
- any splits.
-
- 2. Because Buftabline uses the tabline, it cannot offer any functionality
- relating to the management of buffers: all it does is show you the list.
-
- OTOH, this also makes Buftabline very lightweight from a user perspective:
- Vim has plenty of facilities for managing buffers and with Buftabline you
- will be using those same as without it. Buftabline need not aspire to be
- your sole interface to Vim’s buffers.
-
-* [buftabs](http://www.vim.org/scripts/script.php?script_id=1664)
-
- Buftabs is what you get when you try to implement Buftabline on a Vim that
- does not yet have the `tabline`. It can only render your tabs near or at the
- bottom of the Vim screen, and you have the choice between trading in your
- `statusline` for the list, or having it flicker “behind” the command line. If
- MiniBufExpl is too heavy for you, buftabs is the best you can do in absence
- of the `tabline`.
-
- I used this for a long time.
-
-* [bufferline](https://github.com/bling/vim-bufferline)
-
- Essentially a newer rendition of buftabs.
-
-* [Airline](http://www.vim.org/scripts/script.php?script_id=4661)
-
- If you already use Airline, you do not need Buftabline: the functionality
- comes built in – see `:help airline-tabline`.
-
- If you do not already use Airline, you may not want to: it is far heavier
- than Buftabline, to the point of dragging down performance. C.f.
- [Pretty statuslines vs cursor speed][badperf]
-
-* [BufLine](http://www.vim.org/scripts/script.php?script_id=4940)
-
- This is very similar in scope and strategy to Buftabline, but not nearly as
- simple. The code is more than 5 times as long. There are lots of options and
- mappings so despite its limited scope compared to something like MiniBufExpl
- or Airline, it feels like a Big Plugin – one that requires a large up-front
- commitment. And subjective though this is, I will call its default colors
- ugly (while the ones in Buftabline depend entirely on your colorscheme), nor
- does it make any attempt to harmonise with the user colorscheme.
-
-* [WinTabs](https://github.com/zefei/vim-wintabs)
-
- This is another Big Plugin, though much, much better. It supports Vim tabs
- in addition to buffers, and tries to implement a functionality that is not
- native to Vim tabs: scoping buffers to certain tabs. This means it also
- needs to hook into sessions in order to support them, which it does. All in
- all, if you want to use Vim tabs (i.e. viewports), this is probably the best
- plugin for you – Buftabline will be too simplistic for your preferences.
-
-<!-- vim: et fenc=utf8
--->
-
-[windows]: http://vimdoc.sourceforge.net/htmldoc/windows.html
-[badperf]: https://www.reddit.com/r/vim/comments/2lw1fd/pretty_statuslines_vs_cursor_speed/
diff --git a/.config/nvim/bundle/vim-buftabline/doc/buftabline.txt b/.config/nvim/bundle/vim-buftabline/doc/buftabline.txt
@@ -1,140 +0,0 @@
-*buftabline.txt* Use the tabline to render buffer tabs
-
- BUFTABLINE by Aristotle Pagaltzis
-
-==============================================================================
-0. Contents *buftabline*
-
- 1. Intro ....................................... |buftabline-intro|
- 2. Configuration settings ...................... |buftabline-config|
- 3. Mappings .................................... |buftabline-mappings|
- 4. Tab coloring and colorscheme support ........ |buftabline-colors|
- 5. Source ...................................... |buftabline-source|
-
-
-==============================================================================
-1. Intro *buftabline-intro*
-
-This plugin takes over the 'tabline' and renders the buffer list in it instead
-of a tab list. It is designed with the ideal that it should Just Work: drop it
-into your setup and you're done. There is only minimal configurable behavior.
-
-
-==============================================================================
-2. Configuration settings *buftabline-config*
-
-Changes to any of the plugin's configuration settings at runtime will not take
-effect immediately unless you force an update: >
- :call buftabline#update(0)
-<
-
-*g:buftabline_show* number (default 2)
-
- The value of this option specifies when the line with buffer labels will
- be displayed:
- 0: never
- 1: only if there are at least two buffers
- 2: always
- This is analogous to the 'showtabline' setting, only for the |buftabline|.
-
-
-*g:buftabline_numbers* number (default 0)
-
- The value of this option specifies how to number the buffer labels:
- 0: no numbering
- 1: buffer number
- 2: ordinal number
- The buffer number corresponds to Vim's internal buffer number as shown by
- the |:ls| command, whereas the ordinal number is a simple sequential count
- from left to right.
-
-
-*g:buftabline_indicators* boolean (default off)
-
- When on, the buffer's state is indicated in the buffer label. Currently
- the only state indicated is whether the buffer is 'modified'.
-
-
-*g:buftabline_separators* boolean (default off)
-
- When on, a vertical line is drawn inbetween tabs. (This is not strictly
- correct. The effect is actually achieved by replacing the space on the
- left side of each tab with U+23B8 LEFT VERTICAL BOX LINE. Therefore the
- separator will be highlighted the same way as the tab to its left.)
-
-
-*g:buftabline_plug_max* number (default 10)
-
- The number of |buftabline-mappings| that will be created by the plugin.
- You can request more of them or turn off the functionality entirely by
- setting this to 0. Note it only has an effect before loading the plugin,
- not if you change it later.
-
-
-==============================================================================
-3. Mappings *buftabline-mappings*
-
-To switch buffers by their ordinal number (|g:buftabline_numbers| = 2) you can
-map keys to the |<Plug>| mappings provided by this plugin: >
- nmap <leader>1 <Plug>BufTabLine.Go(1)
- nmap <leader>2 <Plug>BufTabLine.Go(2)
- nmap <leader>3 <Plug>BufTabLine.Go(3)
- nmap <leader>4 <Plug>BufTabLine.Go(4)
- nmap <leader>5 <Plug>BufTabLine.Go(5)
- nmap <leader>6 <Plug>BufTabLine.Go(6)
- nmap <leader>7 <Plug>BufTabLine.Go(7)
- nmap <leader>8 <Plug>BufTabLine.Go(8)
- nmap <leader>9 <Plug>BufTabLine.Go(9)
- nmap <leader>0 <Plug>BufTabLine.Go(10)
-<
-There is also a |<Plug>| mapping which always switches to the last buffer: >
- nmap <leader>0 <Plug>BufTabLine.Go(-1)
-<
-On Mac OS, you probably want to use a |<D-| mapping instead, which will emulate
-the standard Cmd+1, Cmd+2, etc. keybindings for this feature: >
- nmap <D-1> <Plug>BufTabLine.Go(1)
- nmap <D-2> <Plug>BufTabLine.Go(2)
- nmap <D-3> <Plug>BufTabLine.Go(3)
- nmap <D-4> <Plug>BufTabLine.Go(4)
- nmap <D-5> <Plug>BufTabLine.Go(5)
- nmap <D-6> <Plug>BufTabLine.Go(6)
- nmap <D-7> <Plug>BufTabLine.Go(7)
- nmap <D-8> <Plug>BufTabLine.Go(8)
- nmap <D-9> <Plug>BufTabLine.Go(9)
- nmap <D-0> <Plug>BufTabLine.Go(10)
- " or to go to the last buffer:
- nmap <D-0> <Plug>BufTabLine.Go(-1)
-<
-You can ask for more (or fewer) than the default 10 <Plug> mappings using the
-|g:buftabline_plug_max| setting.
-
-==============================================================================
-4. Tab coloring and colorscheme support *buftabline-colors*
-
-This plugin uses several custom highlight groups to render the buffer tabs.
-The custom groups are linked to several other built-in Vim highlight groups
-that should provide a sensible default which automatically harmonizes with
-your |colorscheme|.
-
-However, if you dislike your colorscheme's chosen tabline colours, you can
-override the default links in your |vimrc| -- c.f. |:hi-link|.
-
-Or if you are a colorscheme designer (|44.1|), you can add support to your
-colorscheme for this plugin specifically.
-
-The highlight groups and their default links are as follows:
-
- Custom group Default link Meaning
- *BufTabLineCurrent* |TabLineSel| Buffer shown in current window
- *BufTabLineActive* |PmenuSel| Buffer shown in other window
- *BufTabLineHidden* |TabLine| Buffer not currently visible
- *BufTabLineFill* |TabLineFill| Empty area
-
-
-==============================================================================
-5. Source *buftabline-source*
-
-https://github.com/ap/vim-buftabline
-
-
-vim:tw=78:et:ft=help:norl:
diff --git a/.config/nvim/bundle/vim-buftabline/plugin/buftabline.vim b/.config/nvim/bundle/vim-buftabline/plugin/buftabline.vim
@@ -1,195 +0,0 @@
-" Vim global plugin for rendering the buffer list in the tabline
-" Licence: The MIT License (MIT)
-" Commit: $Format:%H$
-" {{{ Copyright (c) 2015 Aristotle Pagaltzis <pagaltzis@gmx.de>
-"
-" Permission is hereby granted, free of charge, to any person obtaining a copy
-" of this software and associated documentation files (the "Software"), to deal
-" in the Software without restriction, including without limitation the rights
-" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-" copies of the Software, and to permit persons to whom the Software is
-" furnished to do so, subject to the following conditions:
-"
-" The above copyright notice and this permission notice shall be included in
-" all copies or substantial portions of the Software.
-"
-" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-" THE SOFTWARE.
-" }}}
-
-if v:version < 700
- echoerr printf('Vim 7 is required for buftabline (this is only %d.%d)',v:version/100,v:version%100)
- finish
-endif
-
-scriptencoding utf-8
-
-hi default link BufTabLineCurrent TabLineSel
-hi default link BufTabLineActive PmenuSel
-hi default link BufTabLineHidden TabLine
-hi default link BufTabLineFill TabLineFill
-
-let g:buftabline_numbers = get(g:, 'buftabline_numbers', 0)
-let g:buftabline_indicators = get(g:, 'buftabline_indicators', 0)
-let g:buftabline_separators = get(g:, 'buftabline_separators', 0)
-let g:buftabline_show = get(g:, 'buftabline_show', 2)
-let g:buftabline_plug_max = get(g:, 'buftabline_plug_max', 10)
-
-function! buftabline#user_buffers() " help buffers are always unlisted, but quickfix buffers are not
- return filter(range(1,bufnr('$')),'buflisted(v:val) && "quickfix" !=? getbufvar(v:val, "&buftype")')
-endfunction
-
-let s:dirsep = fnamemodify(getcwd(),':p')[-1:]
-let s:centerbuf = winbufnr(0)
-function! buftabline#render()
- let show_num = g:buftabline_numbers == 1
- let show_ord = g:buftabline_numbers == 2
- let show_mod = g:buftabline_indicators
- let lpad = g:buftabline_separators ? nr2char(0x23B8) : ' '
-
- let bufnums = buftabline#user_buffers()
- let centerbuf = s:centerbuf " prevent tabline jumping around when non-user buffer current (e.g. help)
-
- " pick up data on all the buffers
- let tabs = []
- let path_tabs = []
- let tabs_per_tail = {}
- let currentbuf = winbufnr(0)
- let screen_num = 0
- for bufnum in bufnums
- let screen_num = show_num ? bufnum : show_ord ? screen_num + 1 : ''
- let tab = { 'num': bufnum }
- let tab.hilite = currentbuf == bufnum ? 'Current' : bufwinnr(bufnum) > 0 ? 'Active' : 'Hidden'
- if currentbuf == bufnum | let [centerbuf, s:centerbuf] = [bufnum, bufnum] | endif
- let bufpath = bufname(bufnum)
- if strlen(bufpath)
- let tab.path = fnamemodify(bufpath, ':p:~:.')
- let tab.sep = strridx(tab.path, s:dirsep, strlen(tab.path) - 2) " keep trailing dirsep
- let tab.label = tab.path[tab.sep + 1:]
- let pre = ( show_mod && getbufvar(bufnum, '&mod') ? '+' : '' ) . screen_num
- let tab.pre = strlen(pre) ? pre . ' ' : ''
- let tabs_per_tail[tab.label] = get(tabs_per_tail, tab.label, 0) + 1
- let path_tabs += [tab]
- elseif -1 < index(['nofile','acwrite'], getbufvar(bufnum, '&buftype')) " scratch buffer
- let tab.label = ( show_mod ? '!' . screen_num : screen_num ? screen_num . ' !' : '!' )
- else " unnamed file
- let tab.label = ( show_mod && getbufvar(bufnum, '&mod') ? '+' : '' )
- \ . ( screen_num ? screen_num : '*' )
- endif
- let tabs += [tab]
- endfor
-
- " disambiguate same-basename files by adding trailing path segments
- while len(filter(tabs_per_tail, 'v:val > 1'))
- let [ambiguous, tabs_per_tail] = [tabs_per_tail, {}]
- for tab in path_tabs
- if -1 < tab.sep && has_key(ambiguous, tab.label)
- let tab.sep = strridx(tab.path, s:dirsep, tab.sep - 1)
- let tab.label = tab.path[tab.sep + 1:]
- endif
- let tabs_per_tail[tab.label] = get(tabs_per_tail, tab.label, 0) + 1
- endfor
- endwhile
-
- " now keep the current buffer center-screen as much as possible:
-
- " 1. setup
- let lft = { 'lasttab': 0, 'cut': '.', 'indicator': '<', 'width': 0, 'half': &columns / 2 }
- let rgt = { 'lasttab': -1, 'cut': '.$', 'indicator': '>', 'width': 0, 'half': &columns - lft.half }
-
- " 2. sum the string lengths for the left and right halves
- let currentside = lft
- for tab in tabs
- let tab.label = lpad . get(tab, 'pre', '') . tab.label . ' '
- let tab.width = strwidth(strtrans(tab.label))
- if centerbuf == tab.num
- let halfwidth = tab.width / 2
- let lft.width += halfwidth
- let rgt.width += tab.width - halfwidth
- let currentside = rgt
- continue
- endif
- let currentside.width += tab.width
- endfor
- if currentside is lft " centered buffer not seen?
- " then blame any overflow on the right side, to protect the left
- let [lft.width, rgt.width] = [0, lft.width]
- endif
-
- " 3. toss away tabs and pieces until all fits:
- if ( lft.width + rgt.width ) > &columns
- let oversized
- \ = lft.width < lft.half ? [ [ rgt, &columns - lft.width ] ]
- \ : rgt.width < rgt.half ? [ [ lft, &columns - rgt.width ] ]
- \ : [ [ lft, lft.half ], [ rgt, rgt.half ] ]
- for [side, budget] in oversized
- let delta = side.width - budget
- " toss entire tabs to close the distance
- while delta >= tabs[side.lasttab].width
- let delta -= remove(tabs, side.lasttab).width
- endwhile
- " then snip at the last one to make it fit
- let endtab = tabs[side.lasttab]
- while delta > ( endtab.width - strwidth(strtrans(endtab.label)) )
- let endtab.label = substitute(endtab.label, side.cut, '', '')
- endwhile
- let endtab.label = substitute(endtab.label, side.cut, side.indicator, '')
- endfor
- endif
-
- if len(tabs) | let tabs[0].label = substitute(tabs[0].label, lpad, ' ', '') | endif
-
- let swallowclicks = '%'.(1 + tabpagenr('$')).'X'
- return swallowclicks . join(map(tabs,'printf("%%#BufTabLine%s#%s",v:val.hilite,strtrans(v:val.label))'),'') . '%#BufTabLineFill#'
-endfunction
-
-function! buftabline#update(zombie)
- set tabline=
- if tabpagenr('$') > 1 | set guioptions+=e showtabline=2 | return | endif
- set guioptions-=e
- if 0 == g:buftabline_show
- set showtabline=1
- return
- elseif 1 == g:buftabline_show
- " account for BufDelete triggering before buffer is actually deleted
- let bufnums = filter(buftabline#user_buffers(), 'v:val != a:zombie')
- let &g:showtabline = 1 + ( len(bufnums) > 1 )
- elseif 2 == g:buftabline_show
- set showtabline=2
- endif
- set tabline=%!buftabline#render()
-endfunction
-
-augroup BufTabLine
-autocmd!
-autocmd VimEnter * call buftabline#update(0)
-autocmd TabEnter * call buftabline#update(0)
-autocmd BufAdd * call buftabline#update(0)
-autocmd BufDelete * call buftabline#update(str2nr(expand('<abuf>')))
-augroup END
-
-for s:n in range(1, g:buftabline_plug_max) + ( g:buftabline_plug_max > 0 ? [-1] : [] )
- let s:b = s:n == -1 ? -1 : s:n - 1
- execute printf("noremap <silent> <Plug>BufTabLine.Go(%d) :<C-U>exe 'b'.get(buftabline#user_buffers(),%d,'')<cr>", s:n, s:b)
-endfor
-unlet! s:n s:b
-
-if v:version < 703
- function s:transpile()
- let [ savelist, &list ] = [ &list, 0 ]
- redir => src
- silent function buftabline#render
- redir END
- let &list = savelist
- let src = substitute(src, '\n\zs[0-9 ]*', '', 'g')
- let src = substitute(src, 'strwidth(strtrans(\([^)]\+\)))', 'strlen(substitute(\1, ''\p\|\(.\)'', ''x\1'', ''g''))', 'g')
- return src
- endfunction
- exe "delfunction buftabline#render\n" . s:transpile()
- delfunction s:transpile
-endif
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
@@ -3,7 +3,6 @@ source ~/.config/nvim/autoload/spell.vim
"Plugins Used: {{{
" iceberg.vim — (colour scheme)
-" vim-buftabline — (shows open buffers using the tabline at the top)
" vim-commentary — (shortcuts for (un)commenting lines/blocks of code)
" vim-css-color – (highlight CSS hex colours with their actual colours)
" vim-fastline — (my custom status bar)