Skip to content

Instantly share code, notes, and snippets.

Error detected while processing /home/bjorn/config/vim/nvimrc:
line 337:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/bjorn/.local/lib/python2.7/site-packages/neovim-0.0.6-py2.7.egg/neovim/__init__.py", line 34, in start_host
with PluginHost(vim, discovered_plugins=[ScriptHost]) as host:
File "/home/bjorn/.local/lib/python2.7/site-packages/neovim-0.0.6-py2.7.egg/neovim/plugin_host.py", line 46, in __enter__
self.install_plugins()
File "/home/bjorn/.local/lib/python2.7/site-packages/neovim-0.0.6-py2.7.egg/neovim/plugin_host.py", line 69, in install_plugins
self.discover_plugins()
" Vundle {{{
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
Plugin 'SirVer/ultisnips'
filetype plugin indent on
" }}}
import sys
import neovim
from threading import Thread
from time import sleep
vim = neovim.connect(sys.argv[1])
buf = vim.current.buffer
def thread():
sleep(0.2)
for i in range(100):
from subprocess import Popen, PIPE
class NvimClipboard(object):
def __init__(self, vim):
self.provides = ['clipboard']
def sel_name(self, reg):
return 'clipboard' if reg == '+' else 'primary'
def clipboard_get(self, reg):
import xerox
class NvimClipboard(object):
def __init__(self, vim):
self.provides = ['clipboard']
def clipboard_get(self, reg):
txt = xerox.paste()
# emulate vim behavior
if txt.endswith('\n'):
@bfredl
bfredl / tree_test.c
Last active August 7, 2016 12:43
kbtree itr test
#include "kbtree.h"
#include <stdlib.h>
#include <stdbool.h>
KBTREE_INIT(test, int, kb_generic_cmp)
#define N 5000
int main() {
kbtree_t(test) *b = kb_init(test, KB_DEFAULT_SIZE);
int nums[N];
kbitr_t itr;
@bfredl
bfredl / polltest.py
Last active August 28, 2016 19:16
Poll test
import zmq
import neovim
import threading
from time import sleep
@neovim.plugin
class PollTest(object):
def __init__(self, vim):
self.vim = vim
self.ctx = zmq.Context.instance()
diff --git a/pangoterm.c b/pangoterm.c
index 5985b51..7d93af6 100644
--- a/pangoterm.c
+++ b/pangoterm.c
@@ -2187,8 +2187,8 @@ void pangoterm_init_font(PangoTerm *pt) {
int height = pango_font_metrics_get_ascent(metrics) + pango_font_metrics_get_descent(metrics);
- pt->cell_width_pango = width;
pt->cell_width = PANGO_PIXELS_CEIL(width);
@bfredl
bfredl / tshl.lua
Last active February 29, 2020 13:59
cquery = [[
(ERROR) @ErrorMsg
"break" @keyword
"case" @keyword
"continue" @keyword
"do" @keyword
"else" @keyword
"for" @keyword
"if" @keyword
@bfredl
bfredl / git2.nobj.c
Last active September 20, 2020 09:55
/***********************************************************************************************
************************************************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!! Warning this file was generated from a set of *.nobj.lua definition files !!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
************************************************************************************************
***********************************************************************************************/
#include "luajit-2.0/lua.h"
#include "luajit-2.0/lauxlib.h"