<commit_before>m4_include(user_config.m4)m4_dnl
" Function Keys
" -------------
" F3  - Toggle Tagbar
" F4  - Select buffer
" F5  - YCM Recompile and Regenerate diagnostics
" F6  - Generate ctags
" F7  - Python lint
" F10 - Syntax Group under cursor
" F11 - Toggle paste
set shell=/bin/bash " Vim doesn't like fish
scriptencoding utf-8
set encoding=utf-8

" Automatically start a server
" This is required for vimtex but likely useful in other contexts.
" Client-server requires an X11 connection, use $DISPLAY to see if available.
" There might be a better way to check if a server connect has been made
" but I couldn't find out.
if empty(v:servername) && exists('*remote_startserver') && !empty($DISPLAY)
	call remote_startserver('VIM')
endif

" Environment
if empty($XDG_CONFIG_HOME)
  let g:xdg_config_home = $HOME . "/.config"
else
  let g:xdg_config_home = $XDG_CONFIG_HOME
endif
if empty($XDG_DATA_HOME)
  let g:xdg_data_home = $HOME . "/.local/share"
else
  let g:xdg_data_home = $XDG_DATA_HOME
endif
if empty($XDG_CACHE_HOME)
  let g:xdg_cache_home = $HOME . "/.cache"
else
  let g:xdg_cache_home = $XDG_CACHE_HOME
endif
" Double slash // causes vim to record file names using the absolute path.
let &directory = g:xdg_cache_home . "/vim/swap//"
let &backupdir = g:xdg_cache_home . "/vim/backup//"
let &undodir = g:xdg_cache_home . "/vim/undo//"
if v:version < 801
	" mkdir(..., 'p') fails if the directory already exists for older vim
	silent! call mkdir(&directory, 'p')
	silent! call mkdir(&backupdir, 'p')
	silent! call mkdir(&undodir, 'p')
else
	call mkdir(&directory, 'p')
	call mkdir(&backupdir, 'p')
	call mkdir(&undodir, 'p')
endif

let &viminfo .= ",'1000,n" . g:xdg_cache_home . "/vim/viminfo"

" Run :PluginInstall to install or update plugins managed by Vundle
" Vundle
filetype off

" Add Vundle to the runtime path
let s:bundledir = g:xdg_data_home . "/vim/bundle"
let &runtimepath .= "," . s:bundledir . "/Vundle.vim"
call vundle#begin(s:bundledir)

" Let Vundle manage Vundle. Required
Plugin 'VundleVim/Vundle.vim'  " MIT

" I have forked some plugins to add my own changes.
" I also fork rarely maintained or unpopular plugins in order to protect myself
" if they become compromised. You can usually find the original from my fork
" on GitHub if you'd rather not trust my copy.

"                                               License
"                                               -------
Plugin 'airblade/vim-gitgutter'               " MIT
Plugin 'alfredodeza/coveragepy.vim'           " Apache 2.0
Plugin 'chrisbra/csv.vim'                     " Vim
Plugin 'chrisbra/Recover.vim'                 " Vim
Plugin 'chriskempson/base16-vim'              " MIT
Plugin 'ctrlpvim/ctrlp.vim'                   " Vim
Plugin 'editorconfig/editorconfig-vim'        " BSD 2-Clause
Plugin 'edkolev/tmuxline.vim',                " MIT
Plugin 'edlanglois/lark-syntax.vim'           " MIT
Plugin 'edlanglois/latex-unicoder.vim'        " MIT
Plugin 'edlanglois/vim-edict'                 " MIT
Plugin 'edlanglois/vim-fish'                  " MIT
Plugin 'edlanglois/vim-gdl-syntax'            " MIT
Plugin 'edlanglois/vim-hledger-syntax'        " MIT
Plugin 'edlanglois/vim-qrc'                   " GPL 3.0
Plugin 'edlanglois/vim-textobj-parameter'     " MIT
Plugin 'edlanglois/vim-tmux-focus-events'     " MIT
Plugin 'edlanglois/vim-toml'                  " MIT
Plugin 'edlanglois/vimwiki'                   " MIT
Plugin 'google/vim-codefmt'                   " Apache 2.0
Plugin 'google/vim-glaive'                    " Apache 2.0
Plugin 'google/vim-maktaba'                   " Apache 2.0
Plugin 'honza/vim-snippets'                   " MIT
Plugin 'hynek/vim-python-pep8-indent'         " CC0 1.0 Universal
Plugin 'Julian/vim-textobj-variable-segment'  " MIT
Plugin 'kana/vim-textobj-user'                " MIT
Plugin 'lervag/vimtex'                        " MIT
Plugin 'majutsushi/tagbar'                    " Vim
Plugin 'mileszs/ack.vim'                      " Vim
Plugin 'morhetz/gruvbox'                      " MIT
Plugin 'plytophogy/vim-virtualenv'            " Vim
Plugin 'psliwka/vim-smoothie'                 " MIT
Plugin 'rdnetto/YCM-Generator'                " GPL 3.0
Plugin 'SirVer/ultisnips'                     " GPL 3.0
Plugin 'tpope/vim-commentary'                 " Vim
Plugin 'tpope/vim-fugitive'                   " Vim
Plugin 'tpope/vim-repeat'                     " Vim
Plugin 'tpope/vim-surround'                   " Vim
Plugin 'tpope/vim-unimpaired'                 " Vim
Plugin 'vim-airline/vim-airline'              " MIT
Plugin 'vim-airline/vim-airline-themes'       " MIT
Plugin 'vim-python/python-syntax'             " MIT
Plugin 'w0rp/ale'                             " BSD 2-Clause
m4_ifelse(m4_user_config_ALLOW_LICENSE_AGPL,true,
Plugin 'moll/vim-bbye'                        " GNU AGPL v3
)m4_dnl
m4_ifelse(m4_user_config_ALLOW_LICENSE_WTFPL,true,
Plugin 'Konfekt/FastFold'                     " WTFPL (French)
Plugin 'scrooloose/nerdtree'                  " WTFPL
Plugin 'Xuyuanp/nerdtree-git-plugin'          " WTFPL
)m4_dnl
m4_ifelse(m4_user_config_ALLOW_LICENSE_NONE,true,
Plugin 'edlanglois/vim-HiLinkTrace'           " None
Plugin 'JamshedVesuna/vim-markdown-preview'   " None
" Must go after nerdtree
Plugin 'edlanglois/nerdtree-chmod'            " None
)m4_dnl
m4_ifelse(m4_user_config_LIGHTWEIGHT,true,,
" Heavywight plugins
Plugin 'Valloric/YouCompleteMe'               " GPL 3.0
)m4_dnl<commit_msg>vim: Update nerdtree source (GitHub repo transferred)<commit_after>m4_include(user_config.m4)m4_dnl
" Function Keys
" -------------
" F3  - Toggle Tagbar
" F4  - Select buffer
" F5  - YCM Recompile and Regenerate diagnostics
" F6  - Generate ctags
" F7  - Python lint
" F10 - Syntax Group under cursor
" F11 - Toggle paste
set shell=/bin/bash " Vim doesn't like fish
scriptencoding utf-8
set encoding=utf-8

" Automatically start a server
" This is required for vimtex but likely useful in other contexts.
" Client-server requires an X11 connection, use $DISPLAY to see if available.
" There might be a better way to check if a server connect has been made
" but I couldn't find out.
if empty(v:servername) && exists('*remote_startserver') && !empty($DISPLAY)
	call remote_startserver('VIM')
endif

" Environment
if empty($XDG_CONFIG_HOME)
  let g:xdg_config_home = $HOME . "/.config"
else
  let g:xdg_config_home = $XDG_CONFIG_HOME
endif
if empty($XDG_DATA_HOME)
  let g:xdg_data_home = $HOME . "/.local/share"
else
  let g:xdg_data_home = $XDG_DATA_HOME
endif
if empty($XDG_CACHE_HOME)
  let g:xdg_cache_home = $HOME . "/.cache"
else
  let g:xdg_cache_home = $XDG_CACHE_HOME
endif
" Double slash // causes vim to record file names using the absolute path.
let &directory = g:xdg_cache_home . "/vim/swap//"
let &backupdir = g:xdg_cache_home . "/vim/backup//"
let &undodir = g:xdg_cache_home . "/vim/undo//"
if v:version < 801
	" mkdir(..., 'p') fails if the directory already exists for older vim
	silent! call mkdir(&directory, 'p')
	silent! call mkdir(&backupdir, 'p')
	silent! call mkdir(&undodir, 'p')
else
	call mkdir(&directory, 'p')
	call mkdir(&backupdir, 'p')
	call mkdir(&undodir, 'p')
endif

let &viminfo .= ",'1000,n" . g:xdg_cache_home . "/vim/viminfo"

" Run :PluginInstall to install or update plugins managed by Vundle
" Vundle
filetype off

" Add Vundle to the runtime path
let s:bundledir = g:xdg_data_home . "/vim/bundle"
let &runtimepath .= "," . s:bundledir . "/Vundle.vim"
call vundle#begin(s:bundledir)

" Let Vundle manage Vundle. Required
Plugin 'VundleVim/Vundle.vim'  " MIT

" I have forked some plugins to add my own changes.
" I also fork rarely maintained or unpopular plugins in order to protect myself
" if they become compromised. You can usually find the original from my fork
" on GitHub if you'd rather not trust my copy.

"                                               License
"                                               -------
Plugin 'airblade/vim-gitgutter'               " MIT
Plugin 'alfredodeza/coveragepy.vim'           " Apache 2.0
Plugin 'chrisbra/csv.vim'                     " Vim
Plugin 'chrisbra/Recover.vim'                 " Vim
Plugin 'chriskempson/base16-vim'              " MIT
Plugin 'ctrlpvim/ctrlp.vim'                   " Vim
Plugin 'editorconfig/editorconfig-vim'        " BSD 2-Clause
Plugin 'edkolev/tmuxline.vim',                " MIT
Plugin 'edlanglois/lark-syntax.vim'           " MIT
Plugin 'edlanglois/latex-unicoder.vim'        " MIT
Plugin 'edlanglois/vim-edict'                 " MIT
Plugin 'edlanglois/vim-fish'                  " MIT
Plugin 'edlanglois/vim-gdl-syntax'            " MIT
Plugin 'edlanglois/vim-hledger-syntax'        " MIT
Plugin 'edlanglois/vim-qrc'                   " GPL 3.0
Plugin 'edlanglois/vim-textobj-parameter'     " MIT
Plugin 'edlanglois/vim-tmux-focus-events'     " MIT
Plugin 'edlanglois/vim-toml'                  " MIT
Plugin 'edlanglois/vimwiki'                   " MIT
Plugin 'google/vim-codefmt'                   " Apache 2.0
Plugin 'google/vim-glaive'                    " Apache 2.0
Plugin 'google/vim-maktaba'                   " Apache 2.0
Plugin 'honza/vim-snippets'                   " MIT
Plugin 'hynek/vim-python-pep8-indent'         " CC0 1.0 Universal
Plugin 'Julian/vim-textobj-variable-segment'  " MIT
Plugin 'kana/vim-textobj-user'                " MIT
Plugin 'lervag/vimtex'                        " MIT
Plugin 'majutsushi/tagbar'                    " Vim
Plugin 'mileszs/ack.vim'                      " Vim
Plugin 'morhetz/gruvbox'                      " MIT
Plugin 'plytophogy/vim-virtualenv'            " Vim
Plugin 'psliwka/vim-smoothie'                 " MIT
Plugin 'rdnetto/YCM-Generator'                " GPL 3.0
Plugin 'SirVer/ultisnips'                     " GPL 3.0
Plugin 'tpope/vim-commentary'                 " Vim
Plugin 'tpope/vim-fugitive'                   " Vim
Plugin 'tpope/vim-repeat'                     " Vim
Plugin 'tpope/vim-surround'                   " Vim
Plugin 'tpope/vim-unimpaired'                 " Vim
Plugin 'vim-airline/vim-airline'              " MIT
Plugin 'vim-airline/vim-airline-themes'       " MIT
Plugin 'vim-python/python-syntax'             " MIT
Plugin 'w0rp/ale'                             " BSD 2-Clause
m4_ifelse(m4_user_config_ALLOW_LICENSE_AGPL,true,
Plugin 'moll/vim-bbye'                        " GNU AGPL v3
)m4_dnl
m4_ifelse(m4_user_config_ALLOW_LICENSE_WTFPL,true,
Plugin 'Konfekt/FastFold'                     " WTFPL (French)
Plugin 'preservim/nerdtree'                   " WTFPL
Plugin 'Xuyuanp/nerdtree-git-plugin'          " WTFPL
)m4_dnl
m4_ifelse(m4_user_config_ALLOW_LICENSE_NONE,true,
Plugin 'edlanglois/vim-HiLinkTrace'           " None
Plugin 'JamshedVesuna/vim-markdown-preview'   " None
" Must go after nerdtree
Plugin 'edlanglois/nerdtree-chmod'            " None
)m4_dnl
m4_ifelse(m4_user_config_LIGHTWEIGHT,true,,
" Heavywight plugins
Plugin 'Valloric/YouCompleteMe'               " GPL 3.0
)m4_dnl
{'fraction_non_alphanumeric': 0.10396129974443227, 'fraction_numerical': 0.01113545089448704, 'mean_word_length': 2.3182919442761962, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '82872', 'n_tokens_mistral': 3878, 'n_tokens_neox': 3614, 'n_words': 919}