Gut vim configs to remove external deps

Now that we use Helix, let's pare back vim a bit. This mainly drops
vundle and anything depending on something installed by vundle. Doing
this removes the external plugins, closes a security concern, reduces
the number of steps I need to take to bootstrap my homedir on a new
host, and cuts a lot of cruft out of my homedir.

The only loss here is ALE on systems that lack Helix, but if I'm going
to use vim to write code, I should use vim-lsp or something instead for
consistency with Helix.
This commit is contained in:
Trysdyn Black 2023-12-30 20:34:47 -08:00
parent 2c7852627b
commit 8aeab7241d
4 changed files with 1 additions and 156 deletions

View file

@ -1,82 +0,0 @@
" %%base16_template: vim-airline-themes##default %%
let g:airline#themes#base16#palette = {}
" GUI color definitions
let s:gui00 = '#000000'
let s:gui01 = '#202020'
let s:gui02 = '#311647'
let s:gui03 = '#606060'
let s:gui04 = '#b0b0b0'
let s:gui05 = '#f0f0f0'
let s:gui06 = '#c0c0c0'
let s:gui07 = '#ffffff'
let s:gui08 = '#ed008c'
let s:gui09 = '#f7941d'
let s:gui0A = '#f7c61d'
let s:gui0B = '#8dc73f'
let s:gui0C = '#65cdcd'
let s:gui0D = '#3f7fff'
let s:gui0E = '#9f4fdf'
let s:gui0F = '#a16946'
" Terminal color definitions
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists("base16colorspace") && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "10"
let s:cterm02 = "11"
let s:cterm04 = "12"
let s:cterm06 = "13"
let s:cterm09 = "09"
let s:cterm0F = "14"
endif
let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(
\ [ s:gui01, s:gui04, s:cterm01, s:cterm04 ],
\ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ],
\ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ])
let g:airline#themes#base16#palette.normal_modified = {
\ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]}
let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(
\ [ s:gui01, s:gui0B, s:cterm01, s:cterm0B ],
\ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ],
\ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ])
let g:airline#themes#base16#palette.insert_modified = {
\ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]}
let g:airline#themes#base16#palette.replace = airline#themes#generate_color_map(
\ [ s:gui01, s:gui0E, s:cterm01, s:cterm0E ],
\ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ],
\ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ])
let g:airline#themes#base16#palette.replace_modified = {
\ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]}
let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(
\ [ s:gui01, s:gui09, s:cterm01, s:cterm09 ],
\ [ s:gui04, s:gui02, s:cterm04, s:cterm02 ],
\ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ])
let g:airline#themes#base16#palette.visual_modified = {
\ 'airline_c' : [ s:gui07, s:gui01, s:cterm07, s:cterm01 ]}
let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(
\ [ s:gui01, s:gui01, s:cterm01, s:cterm01 ],
\ [ s:gui04, s:gui01, s:cterm04, s:cterm01 ],
\ [ s:gui05, s:gui01, s:cterm05, s:cterm01 ])
" %%base16_template_end%%

View file

View file

@ -1,6 +0,0 @@
" Remove the gutter that shows markdown nesting level by default
:set foldcolumn=0
" Auto chdir to where the pandoc file is opened so pandoc calls and
" markdown hypertext links work dir-relative.
:lchdir %:p:h

67
.vimrc
View file

@ -9,41 +9,12 @@ set nocompatible
" Make backspace work as expected on all platforms
set backspace=indent,eol,start
" Start Vundle, temporarily set some values
set rtp+=~/.vim/bundle/Vundle.vim
filetype off
call vundle#begin()
" Plugin execution
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-pandoc/vim-pandoc'
Plugin 'vim-pandoc/vim-pandoc-syntax'
Plugin 'tpope/vim-surround'
Plugin 'mhinz/vim-startify'
Plugin 'vim-airline/vim-airline'
Plugin 'dense-analysis/ale'
Plugin 'elixir-editors/vim-elixir'
Plugin 'rodjek/vim-puppet'
" End Vundle startup, reset changed values as desired
call vundle#end()
filetype plugin indent on
" Formatters for ale to reformat documents into a unified structure
let g:ale_fixers={
\'*': ['remove_trailing_lines', 'trim_whitespace'],
\'python': ['autopep8', 'black', 'isort'],
\'elixir': ['mix_format']
\}
" Visual themeing
set termguicolors "Enable 256 colors
set t_Co=256 "Limit vim to 256 colors
set scrolloff=5 "Always display 5 lines below cursor when scrolling
colorscheme base16 "Use my custom built color scheme
let g:airline_theme='base16' "Use the scheme for airline too
set background=dark "Inform vim I use a black background terminal
let g:airline_powerline_fonts=1 "Use powerline glyphs in airline
" Set UTF-8 default
set encoding=utf-8
@ -76,44 +47,6 @@ set wildignorecase
" Syntax Highlighting
syntax on
" Word count in plaintext formats
let g:airline#extensions#wordcount#enabled=1
let g:airline#extensions#wordcount#filetypes=['help', 'markdown', 'rst', 'org', 'text', 'asciidoc', 'tex', 'mail', 'pandoc']
" Directories for backup files
set backupdir=~/.vim/backup
set directory=~/.vim/backup
" Disable markdown spelling by default
let g:pandoc#modules#disabled=["spell"]
" Fixes to pandoc's rules to make markdown less ugly
let g:pandoc#syntax#codeblocks#embeds#langs=["python", "bash=sh", "sh"]
let g:pandoc#syntax#conceal#blacklist=["ellipses", "quotes"]
let g:pandoc#syntax#conceal#urls=1
" Create the file if you follow an orphaned link
let g:pandoc#hypertext#create_if_no_alternates_exists=1
" Make link follows split horizontally since most of my terms are tall
" Also work around a netrw bug that opens everything no-modify
let g:pandoc#hypertext#split_open_cmd="botright split +set\\ modifiable"
" Allow folding at fold markers to let me collapse sub-sections of lists
let g:pandoc#folding#vim_markers_in_comments_only=0
" Unfold everything by default
set foldlevel=99
" Bracketed paste
let &t_ti=&t_ti . "\e[?2004h"
let &t_te="\e[?2004l" . &t_te
function XTermPasteBegin(ret)
set pastetoggle=<Esc>[201~
set paste
return a:ret
endfunction
map <expr> <Esc>[200~ XTermPasteBegin("i")
imap <expr> <Esc>[200~ XTermPasteBegin("")
cmap <Esc>[200~ <nop>
cmap <Esc>[201~ <nop>