Skip to content

Instantly share code, notes, and snippets.

View tjdevries's full-sized avatar
🏠
Open Open Source: https://www.twitch.tv/teej_dv

TJ DeVries tjdevries

🏠
Open Open Source: https://www.twitch.tv/teej_dv
View GitHub Profile
-- Output to stderr:
busted: error: Cannot load helper script: /home/tj_chromebook/Git/neovim/test/functional/preload.lua
./test/functional/helpers.lua:5: module 'nvim.child_process_stream' not found:No LuaRocks module found for nvim.child_process_stream
no field package.preload['nvim.child_process_stream']
no file '/home/tj_chromebook/Git/neovim/build/nvim/child_process_stream.lua'
no file '/home/tj_chromebook/Git/neovim/.deps/usr/share/lua/5.1/nvim/child_process_stream.lua'
no file '/home/tj_chromebook/Git/neovim/.deps/usr/share/lua/5.1/nvim/child_process_stream/init.lua'
no file './nvim/child_process_stream.lua'
no file '/home/tj_chromebook/Git/neovim/.deps/usr/share/luajit-2.0.4/nvim/child_process_stream.lua'
no file '/usr/local/share/lua/5.1/nvim/child_process_stream.lua'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function! TestReturnHighlight()
if &spell
return '%#PreProc#%l%0'
else
return 'Not spelling and no colors'
endif
endfunction
function! SetStatuslineSnippet()
let l:str_stl = ''
@tjdevries
tjdevries / map_info.vim
Created February 17, 2017 16:58
Get some information about the mappings you currently have active in Vim
function! s:get_maps() abort
return split(execute('map'), "\n")
endfunction
function! s:get_dict(mapping) abort
let map_split = split(a:mapping, ' ')
let l:mode = map_split[0]
let l:map = map_split[2]
return maparg(l:map, l:mode, v:false, v:true)
endfunction
@tjdevries
tjdevries / uneven_paste.vim
Created March 30, 2017 18:05
Do some pasting things easily?
" Test text
" hello world
" some text
" here's more text
" 1
" 2
" 3
""
@tjdevries
tjdevries / search_syntax.vim
Created May 31, 2017 22:57
searching syntax
function! TestStuff() abort
normal! gg
let g:res = []
while search('^\S', 'W')
call insert(g:res, {
\ 'name': expand('<cword>'),
\ 'line': line('.'),
\ },
@tjdevries
tjdevries / overlength_highlight.vim
Last active June 28, 2017 21:51
Highlight overlength
let g:highlight_overlength = v:true
let g:highlight_overlength_length = 72
let g:load_overlength = v:true
" Use :call ToggleOverlength()
" to toggle whether or not you show highlights
function! ToggleOverlength() abort
let g:highlight_overlength = !g:highlight_overlength
if g:highlight_overlength
function x()
return 1, 2
end
function y()
local foo = {{x()}, {x()}}
return vim.tbl_flatten(foo)
end
(
(plain_value) @string
(#eq? @string "background-color")
) @matched
{
_callbacks = {
bytes = { <function 1> },
changedtree = { <function 2> },
child_added = {},
child_removed = {}
},
_children = {
lua = {
_callbacks = {