Skip to content

Instantly share code, notes, and snippets.

View dblanken's full-sized avatar

David Blankenship dblanken

View GitHub Profile
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "rake",
"task": "test",
"group": "test",
"problemMatcher": [
@dblanken
dblanken / init.vim
Created September 7, 2020 19:03
Prime's init.vim with nvim_lsp
syntax on
set guicursor=
set relativenumber
set nohlsearch
set hidden
set noerrorbells
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
@dblanken
dblanken / vim_plugin_exists.md
Last active August 12, 2021 09:57
Test vim plugin existence

How to test the existence of a plugin for your vimrc

I wanted to get this down since I find myself playing with plugins, but would like to not have to delete configuration of it in the event I need it again. There are also plugins that interact with eachother and I'd like to gracefully degrade if a plugin is not there. This is one option, to check the runtimepath of the system after the vimrc has ran.

From what I can tell, the only way to do this inside the vimrc would be to traverse all of the pack directories for the existence of the plugin, which seems duplicative of what vim already does.

The following should not be used in the vimrc, since the runtimepath is not yet set till after that happens. Any plugin configuration which depends on a check must be at least in the plugins folder, if not in the after folder somewhere.

**Note: This is for plugins that use the packages feature of vim and are auto loaded in the start folder or you have manually packadd! them in your vimrc. This will have no idea

@dblanken
dblanken / .vimrc
Created July 6, 2022 15:47
Vim9 .vimrc
# This is a small proof of concept of using vim9script for a vimrc
vim9script
source $VIMRUNTIME/defaults.vim
set number relativenumber
set signcolumn=yes
set laststatus=2
g:mapleader = ' '