summaryrefslogtreecommitdiff
path: root/config/vim/plugin/pickachu/main.py
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/pickachu/main.py
parentbcdb3419af4a28135e2e668cd61b49db72e95796 (diff)
removed shaders
Diffstat (limited to 'config/vim/plugin/pickachu/main.py')
-rw-r--r--config/vim/plugin/pickachu/main.py36
1 files changed, 0 insertions, 36 deletions
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')