Skip to content

Instantly share code, notes, and snippets.

Thore Weilbier weilbith

Block or report user

Report or block weilbith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@weilbith
weilbith / python.snippets
Created Mar 22, 2019
Secure empty lines before and after completed snippets with UltiSnips
View python.snippets
global !p
def on_jump(snippet, positions, function, arguments=None):
if not isinstance(positions, list):
positions = [positions]
for position in positions:
if position == "last":
position = len(snippet.tabstops) - 1
if position == snippet.tabstop:
@weilbith
weilbith / autoload_utils_layout.vim
Last active Mar 12, 2019
Dark Powered Vim - Fix The Broken Window Layout (file names are using '_' to simulate a '/', leveraging Vim's autload functionalities)
View autoload_utils_layout.vim
" Standard shape values when fail to retrieve a global variable.
let s:standard_width = 30
let s:standard_height = 10
" List of all windows, which should have a fixed size and/or position.
let g:layout_fixed_windows = [
\ {
\ 'buffer_name': 'Scratch',
@weilbith
weilbith / autoload_utils_location.vim
Last active Dec 15, 2018
Vim - Dynamic Location Lists
View autoload_utils_location.vim
" Cache a possibly filled location list for a hiding buffer.
" Check if there is a non-empty list for the current buffer.
" Stores the list to the cache and empty the original one.
" The location window will be closed.
"
" Arguments:
" buffer - buffer to create the cache for
"
function! utils#location#cache_location_list(buffer) abort
if get(g:, 'dynamic_location_list_disable', v:false) | return | endif
You can’t perform that action at this time.