From b3777d53a9c81b6d0f59264719b57917bd05bdc8 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Sun, 29 Jun 2025 16:19:32 -0500 Subject: [PATCH] Cleaning up some vim plugins --- .gitmodules | 3 + base/.vim/bundle/FastFold | 1 + base/.vim/bundle/SimpylFold | 1 - base/.vim/bundle/vim-template | 1 - base/.vim/templates/=template=.bash | 124 ---------------------------- base/.vim/templates/=template=.py | 9 -- base/.vimrc | 11 +-- 7 files changed, 8 insertions(+), 142 deletions(-) create mode 160000 base/.vim/bundle/FastFold delete mode 160000 base/.vim/bundle/SimpylFold delete mode 160000 base/.vim/bundle/vim-template delete mode 100644 base/.vim/templates/=template=.bash delete mode 100644 base/.vim/templates/=template=.py diff --git a/.gitmodules b/.gitmodules index 88ad13a6..ca0cc7f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,6 @@ [submodule "base/.vim/bundle/vim-groovy"] path = base/.vim/bundle/vim-groovy url = https://github.com/thecodesmith/vim-groovy +[submodule "base/.vim/bundle/FastFold"] + path = base/.vim/bundle/FastFold + url = https://github.com/Konfekt/FastFold diff --git a/base/.vim/bundle/FastFold b/base/.vim/bundle/FastFold new file mode 160000 index 00000000..c1ddfa1a --- /dev/null +++ b/base/.vim/bundle/FastFold @@ -0,0 +1 @@ +Subproject commit c1ddfa1a0e00316d1161ce11438ec980348b8cb9 diff --git a/base/.vim/bundle/SimpylFold b/base/.vim/bundle/SimpylFold deleted file mode 160000 index ff4c8519..00000000 --- a/base/.vim/bundle/SimpylFold +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff4c85197c5555715093c08a8d4f9d493c4d80cd diff --git a/base/.vim/bundle/vim-template b/base/.vim/bundle/vim-template deleted file mode 160000 index df6d29a8..00000000 --- a/base/.vim/bundle/vim-template +++ /dev/null @@ -1 +0,0 @@ -Subproject commit df6d29a8549a13db026818c27a6b060978db7a3d diff --git a/base/.vim/templates/=template=.bash b/base/.vim/templates/=template=.bash deleted file mode 100644 index 6c666151..00000000 --- a/base/.vim/templates/=template=.bash +++ /dev/null @@ -1,124 +0,0 @@ -#! /bin/bash -# -# %FILE% -# Copyright (C) %YEAR% %USER% <%MAIL%> -# -# Distributed under terms of the %LICENSE% license. -# -set -e - -# Read-only set-once variables -declare -r _name="$(basename -- "$0")" -# Options -declare -i _opthelp -declare -i _optverbose -# Working variables -declare -a _args -declare _return - -# Helper functions -log() { - # Print a line to the terminal if _optverbose is greater than $2 - # $2 defaults to 0 - # loglevel 0: Daily-use messages - # loglevel 1: Detailed but not quite debugging - # loglevel 2: Definitely debugging - [ -z "$1" ] && return 1 - if (( _optverbose >= ${2:-0} )); then - printf "%s\\n" "$1" - fi -} -warn() { - # Print a yellow line to the terminal, respecting _optverbose - [ -z "$1" ] && return 1 - if (( _optverbose >= ${2:-0} )); then - if [ -t 1 ]; then - printf "\\e[33m%s\\e[0m\\n" "$1" - else - printf "WARN: %s\\n" "$1" - fi - fi -} -error() { - # Print a red line to the terminal, exit if $2 is specified - [ -z "$1" ] && return 1 - if [ -t 2 ]; then - printf "\\e[31m%s\\e[0m\\n" "$1" 1>&2 - else - printf "ERROR: %s\\n" "$1" 1>&2 - fi - [ -z "$2" ] && return - exit "${2:-1}" -} -has() { - # Parse out all arguments and try to find them in path - # If an argument cannot be found, set _return and fail - for prog in "$@"; do - if ! command -v "$prog" > /dev/null 2>&1; then - _return="$prog" - return 1 - fi - done - return 0 -} - -# Core program functions -printhelp() { - cat << EOF -Usage: $_name [OPTION]... - - -h Print this help text - -v Print more status messages. Stacks - -Copyright (c) %YEAR% %MAIL% -Licensed under the %LICENSE% license -EOF -} - -# Main -main() { - # Parse out arguments - while [ -n "$1" ]; do - # Parse out flags - while getopts ":hv" opt; do - case $opt in - h) - _opthelp=1 - ;; - v) - _optverbose+=1 - ;; - :) - error "Option requires argument: -$OPTARG" 2 - ;; - *) - error "Invalid option: -$OPTARG" 2 - ;; - esac - done - # Store arguments - shift $((OPTIND - 1)) - if [ -n "$1" ]; then - _args+=("$1") - shift - fi - unset OPTIND - done - # Early hook for help - [ -n "$_opthelp" ] && printhelp && exit 0 - # Validate critical options - # TODO: That - # Validate core program dependencies - log "Validating dependencies" 2 - if ! has basename; then - error "Failed to find program: $_return" 1 - fi - - # Do the do - # TODO: The do%HERE% - warn "Nothing to do" - exit 0 -} - -main "$@" - diff --git a/base/.vim/templates/=template=.py b/base/.vim/templates/=template=.py deleted file mode 100644 index 8fbde901..00000000 --- a/base/.vim/templates/=template=.py +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env python3 -# -*- coding: utf-8 -*- -# vim:fenc=utf-8 -# -# Copyright © %YEAR% %USER% <%MAIL%> -# -# Distributed under terms of the %LICENSE% license. - -%HERE% diff --git a/base/.vimrc b/base/.vimrc index e1f6c288..3cf1ef36 100644 --- a/base/.vimrc +++ b/base/.vimrc @@ -13,7 +13,6 @@ endif set autoread " Automatically read when a file is changed outside of Vim set clipboard=unnamedplus " Use XA_PRIMARY clipboard by default set encoding=utf-8 -set foldmethod=syntax set hidden " Allow buffer switching without saving set incsearch " Search while you type set laststatus=2 " Always show statusbar @@ -21,16 +20,14 @@ set list set listchars=tab:>·,trail:· set modeline set modelines=5 -set nofoldenable " Fuck autofolding set number set t_Co=256 set viminfo='20,<1000,s1000 " Increase buffer size +" Folding +set foldmethod=syntax +"nnoremap za +set nofoldenable " Fuck autofolding -" Templates -let g:email = 'jacob@babor.tech' -let g:user = 'Jacob Babor' -let g:license = 'MIT' -let g:templates_directory = [ '~/.vim/templates' ] " Lightline set noshowmode let g:lightline = {