summaryrefslogtreecommitdiff
path: root/config/vim/plugin
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2021-12-05 22:02:25 +0000
committerdavidovski <david@davidovski.xyz>2021-12-05 22:02:25 +0000
commit74452dfb1735e7347459f3b024770ce285f7c96d (patch)
tree7c3a812c3d6e7c135b5924e2d353e6daac2353fd /config/vim/plugin
parentbcdb3419af4a28135e2e668cd61b49db72e95796 (diff)
removed shaders
Diffstat (limited to 'config/vim/plugin')
-rw-r--r--config/vim/plugin/pickachu.vim45
-rw-r--r--config/vim/plugin/pickachu/__init__.py0
-rw-r--r--config/vim/plugin/pickachu/__pycache__/__init__.cpython-39.pycbin142 -> 0 bytes
-rw-r--r--config/vim/plugin/pickachu/__pycache__/apps.cpython-39.pycbin1107 -> 0 bytes
-rw-r--r--config/vim/plugin/pickachu/__pycache__/main.cpython-39.pycbin719 -> 0 bytes
-rw-r--r--config/vim/plugin/pickachu/__pycache__/processors.cpython-39.pycbin1896 -> 0 bytes
-rw-r--r--config/vim/plugin/pickachu/apps.py68
-rw-r--r--config/vim/plugin/pickachu/main.py36
-rw-r--r--config/vim/plugin/pickachu/processors.py80
-rw-r--r--config/vim/plugin/rainbow_parentheses.vim13
10 files changed, 0 insertions, 242 deletions
diff --git a/config/vim/plugin/pickachu.vim b/config/vim/plugin/pickachu.vim
deleted file mode 100644
index 259bac7..0000000
--- a/config/vim/plugin/pickachu.vim
+++ /dev/null
@@ -1,45 +0,0 @@
-"Script: Pickachu
-"Version: 0.0.1
-"Copyright: Copyright (C) 2018 Doug Beney
-"Licence:
-"Website: https://dougie.io
-
-if !has('python3')
- echo "You need Vim Python3 support to use this plugin. If you're using NeoVim, try running `pip3 install neovim` to resolve this issue."
-endif
-
-if !exists('g:pickachu_default_app')
- let g:pickachu_default_app = "color"
-endif
-
-if !exists("g:pickachu_default_command")
- let g:pickachu_default_command = "zenity"
-endif
-
-if !exists("g:pickachu_default_date_format")
- let g:pickachu_default_date_format = "%m/%d/%Y"
-endif
-
-if !exists("g:pickachu_default_color_format")
- let g:pickachu_default_color_format = "hex"
-endif
-
-function! s:pickachuCompletion(ArgLead, CmdLine, CursorPos)
- let options = ['color', 'date', 'file']
- return options
-endfunction
-
-command! -nargs=* -complete=customlist,<SID>pickachuCompletion Pickachu call Pickachu(<f-args>)
-
-python3 import sys
-python3 import vim
-python3 sys.path.append(vim.eval('expand("<sfile>:h")'))
-
-function! Pickachu(...)
-python3 << EOF
-from pickachu.main import MainFunction
-MainFunction()
-EOF
-endfunction
-
-" vim: noexpandtab
diff --git a/config/vim/plugin/pickachu/__init__.py b/config/vim/plugin/pickachu/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/config/vim/plugin/pickachu/__init__.py
+++ /dev/null
diff --git a/config/vim/plugin/pickachu/__pycache__/__init__.cpython-39.pyc b/config/vim/plugin/pickachu/__pycache__/__init__.cpython-39.pyc
deleted file mode 100644
index c18ad9c..0000000
--- a/config/vim/plugin/pickachu/__pycache__/__init__.cpython-39.pyc
+++ /dev/null
Binary files differ
diff --git a/config/vim/plugin/pickachu/__pycache__/apps.cpython-39.pyc b/config/vim/plugin/pickachu/__pycache__/apps.cpython-39.pyc
deleted file mode 100644
index c564bcc..0000000
--- a/config/vim/plugin/pickachu/__pycache__/apps.cpython-39.pyc
+++ /dev/null
Binary files differ
diff --git a/config/vim/plugin/pickachu/__pycache__/main.cpython-39.pyc b/config/vim/plugin/pickachu/__pycache__/main.cpython-39.pyc
deleted file mode 100644
index c35190e..0000000
--- a/config/vim/plugin/pickachu/__pycache__/main.cpython-39.pyc
+++ /dev/null
Binary files differ
diff --git a/config/vim/plugin/pickachu/__pycache__/processors.cpython-39.pyc b/config/vim/plugin/pickachu/__pycache__/processors.cpython-39.pyc
deleted file mode 100644
index 1cf1153..0000000
--- a/config/vim/plugin/pickachu/__pycache__/processors.cpython-39.pyc
+++ /dev/null
Binary files differ
diff --git a/config/vim/plugin/pickachu/apps.py b/config/vim/plugin/pickachu/apps.py
deleted file mode 100644
index 00a6826..0000000
--- a/config/vim/plugin/pickachu/apps.py
+++ /dev/null
@@ -1,68 +0,0 @@
-import vim
-import subprocess
-from . import processors
-
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# name: apps.py
-# description: this function contains a dictionary object
-# where you can easily add new apps with processor
-# functions to handle their output. Note: a
-# processor is optional.
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-ZENITY_COMMAND = vim.eval("g:pickachu_default_command")
-# Note: This is not the final date format that displays on
-# the users' buffer. This is the format we force
-# Zenity/Qarma to provide us.
-RETURNED_DATE_FORMAT = "%m/%d/%Y"
-if ZENITY_COMMAND == 'qarma':
- RETURNED_DATE_FORMAT = "MM/dd/yy"
-
-apps = {
- 'date': {
- 'cmd': ZENITY_COMMAND,
- 'processor': processors.dateProcessor,
- 'options': [
- '--calendar',
- '--date-format=' + RETURNED_DATE_FORMAT
- ]
- },
- 'file': {
- 'cmd': ZENITY_COMMAND,
- 'options': [
- '--file-selection'
- ]
- },
- 'color': {
- 'cmd': ZENITY_COMMAND,
- 'options': [
- '--color-selection'
- ],
- 'processor': processors.colorProcessor
- }
-}
-
-def runApp(choosenApp, format=None):
- app = apps.get(choosenApp, None)
- if app:
- output = None
- try:
- command_array = [app['cmd']]
- if app.get('options', False):
- for option in app['options']:
- command_array.append(option)
- # Logging
- command_array.append('2> /tmp/pickachu_log')
- output = subprocess.check_output(command_array).decode('utf-8')
- except:
- return None
-
- if app.get('processor', None):
- if format:
- return app['processor'](output.rstrip(), format)
- else:
- return app['processor'](output.rstrip())
- else:
- return output.rstrip()
- else:
- print("App does not exist.")
diff --git a/config/vim/plugin/pickachu/main.py b/config/vim/plugin/pickachu/main.py
deleted file mode 100644
index d9a42b3..0000000
--- a/config/vim/plugin/pickachu/main.py
+++ /dev/null
@@ -1,36 +0,0 @@
-import vim
-from . import apps
-
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# name: main.py
-# description: This file evaluates the command arguments
-# provided by the user, calls the runApp function,
-# and inserts valid output to the user's buffer.
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-DEFAULT_APP = vim.eval('g:pickachu_default_app')
-
-
-def MainFunction():
- # This section is for getting the
- # arguments from the user's Vim
- # command.
- arglength = int(vim.eval('a:0'))
- CHOOSEN_APP = DEFAULT_APP
- CHOOSEN_FORMAT = None
- if arglength > 0:
- CHOOSEN_APP = vim.eval('a:1')
- if arglength > 1:
- CHOOSEN_FORMAT = vim.eval('a:2')
-
- # We run apps.py's runApp function to get an output.
- output = apps.runApp(CHOOSEN_APP, CHOOSEN_FORMAT)
-
- # Now, if runApp gave us an output, we can use the
- # Vim API to print the output to the user's buffer.
- if output:
- pos_y, pos_x = vim.current.window.cursor
- vim.current.line = vim.current.line[:pos_x+1] + output + vim.current.line[pos_x+1:]
- vim.current.window.cursor = (pos_y, pos_x + len(output))
- else:
- print('Pickachu - Canceled')
diff --git a/config/vim/plugin/pickachu/processors.py b/config/vim/plugin/pickachu/processors.py
deleted file mode 100644
index 0fe04c1..0000000
--- a/config/vim/plugin/pickachu/processors.py
+++ /dev/null
@@ -1,80 +0,0 @@
-import vim
-from datetime import datetime
-
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# name: processors.py
-# description: this file contains functions that process data
-# from the runapp function (in app.py).
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-
-DEFAULT_DATE_FORMAT = vim.eval("g:pickachu_default_date_format")
-DEFAULT_COLOR_FORMAT = vim.eval("g:pickachu_default_color_format")
-
-def dateProcessor(input, format=DEFAULT_DATE_FORMAT):
- try:
- dateObj = datetime.strptime(input, '%m/%d/%Y')
- except(ValueError):
- dateObj = datetime.strptime(input, '%m/%d/%y')
- return dateObj.strftime(format)
-
-def colorProcessor(input, format=DEFAULT_COLOR_FORMAT):
- # The system color picker returned an rgba value
- if 'rgba' in input:
- strip = input.strip('rgba)(')
- array = strip.split(',')
- # Round the alpha value to two decimal placed
- array[3] = round(float(array[3]), 2)
- rgba_string = "rgba("
- values = ",".join(str(x) for x in array)
- rgba_string += values + ")"
- return rgba_string
- # The system color picker returned an rgb value
- elif 'rgb' in input:
- # RGB as input
- if format == 'rgb':
- return input
- else:
- # Strip 'rgb' and parenthesis
- strip = input.strip('rgb)(')
- array = strip.split(',')
-
- if format == 'hex':
- hex = '#%02x%02x%02x' % (int(array[0]), int(array[1]), int(array[2]))
- return hex.upper()
- elif format == 'rgba':
- rgba_string = "rgba("
- array.append(1)
- values = ",".join(str(x) for x in array)
- rgba_string += values + ")"
- return rgba_string
- return array
- # The system olor picker returned a hex
- elif '#' in input:
- # If there is a '#' in input,
- # they are most likely using Qarma instead of Zenity
- # or any other program that outputs hex
- if format == 'hex':
- return input
- else:
- hex = input.lstrip('#')
- rgb_array = tuple(int(hex[i:i+2], 16) for i in (0, 2 ,4))
-
- if format == 'rgb':
- rgb_string = "rgb("
- for i in range(0, len(rgb_array)):
- rgb_string += str(rgb_array[i])
- if i < len(rgb_array) - 1:
- rgb_string += ", "
- else:
- rgb_string += ")"
- return rgb_string
- elif format == 'rgba':
- rgba_string = "rgba("
- for i in range(0, len(rgb_array)):
- rgba_string += str(rgb_array[i])
- if i < len(rgb_array) - 1:
- rgba_string += ", "
- else:
- rgba_string += ", 1)"
- return rgba_string
- return None
diff --git a/config/vim/plugin/rainbow_parentheses.vim b/config/vim/plugin/rainbow_parentheses.vim
deleted file mode 100644
index 20ce8e5..0000000
--- a/config/vim/plugin/rainbow_parentheses.vim
+++ /dev/null
@@ -1,13 +0,0 @@
-"==============================================================================
-" Description: Rainbow colors for parentheses, based on rainbow_parenthsis.vim
-" by Martin Krischik and others.
-"==============================================================================
-" GetLatestVimScripts: 3772 1 :AutoInstall: rainbow_parentheses.zip
-
-com! RainbowParenthesesToggle cal rainbow_parentheses#toggle()
-com! RainbowParenthesesToggleAll cal rainbow_parentheses#toggleall()
-com! RainbowParenthesesActivate cal rainbow_parentheses#activate()
-com! RainbowParenthesesLoadRound cal rainbow_parentheses#load(0)
-com! RainbowParenthesesLoadSquare cal rainbow_parentheses#load(1)
-com! RainbowParenthesesLoadBraces cal rainbow_parentheses#load(2)
-com! RainbowParenthesesLoadChevrons cal rainbow_parentheses#load(3)