Skip to content

Instantly share code, notes, and snippets.

View Uroc327's full-sized avatar

Constantin Runge Uroc327

  • Bavaria, Germany
View GitHub Profile
@Uroc327
Uroc327 / autoswap_wmctrl.vim
Last active January 1, 2016 10:49 — forked from dprelec/autoswap_linux.vim
This is a version of autoswap_mac.vim from Damian Conway's vim talk that works (or at least tries to) with wmctrl. This does not depend on any stupid titlestrings for vim. Instead it fetches the pid for the swap file and brings the associated window up.
" Vim global plugin for automatin response to swapfiles (from autoswap_mac.vim from Damian Conway)
" Last Change: 2013 Dec 25
" Maintainer: Constantin Runge <[email protected]>
" License: other
if exists("loaded_autoswap")
finish
endif
let loaded_autoswap = 1
@dprelec
dprelec / autoswap_linux.vim
Created December 20, 2013 13:03
Fixes to Damian Conway's autoswap_mac.vim to work on Linux. Uses xdotool for raising windows.
" Vim global plugin for automating response to swapfiles
" Maintainer: Damian Conway
" License: This file is placed in the public domain.
"#############################################################
"## ##
"## Note that this plugin only works for Vim sessions ##
"## running in Terminal on MacOS X. And only if your ##
"## Vim configuration includes: ##
"## ##
#!/usr/bin/env bash
mcdir="$HOME/.minecraft"
downloader="wget --no-check-certificate -q -O"
os="linux"
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64"
echo "Determining installed LWJGL version..."
installed="$(unzip -p $mcdir/bin/lwjgl.jar | strings | grep '^[0-9]*\.[0-9]*\.[0-9]*')"
echo "LWJGL $installed installed"
@codebrainz
codebrainz / gist:2153795
Created March 21, 2012 22:29
CTAGS - Add D, GLSL, Ferite and Vala support (untested)
Index: parsers.h
===================================================================
--- parsers.h (revision 781)
+++ parsers.h (working copy)
@@ -26,11 +26,14 @@
CppParser, \
CsharpParser, \
CobolParser, \
+ DParser, \
DosBatchParser, \
@aperson
aperson / update_lwjgl.sh
Last active February 4, 2024 20:20
Updates the lwjgl that minecraft uses.
#!/usr/bin/env bash
echo "Determining OS..."
if [[ "$(uname -s)" == "Linux" ]]; then
mcdir="$HOME/.minecraft/"
downloader="wget --no-check-certificate -q -O"
os="linux"
natives="libjinput-linux libjinput-linux64 liblwjgl liblwjgl64 libopenal libopenal64"
elif [[ "$(uname -s)" == "Darwin" ]]; then
@canton7
canton7 / 0main.md
Last active January 17, 2025 06:09
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))