Skip to content

Instantly share code, notes, and snippets.

View abatkin's full-sized avatar

Adam Batkin abatkin

View GitHub Profile
@abatkin
abatkin / modules.txt
Created May 29, 2012 21:21
Vim modules
ack.vim
ctrlp.vim
tabular
vim-bad-whitespace
vim-buffergator
vim-colors-solarized
vim-powerline
vimwiki
ZoomWin
@abatkin
abatkin / tabular.vim
Created May 29, 2012 21:20
.vim/after/plugin/tabular.vim
function! FormatTableLine(line)
let curr_line = a:line
" Get rid of all leading or trailing spaces
let curr_line = substitute(curr_line, '^[ ]\{1,\}\|[ ]\{1,\}$', '', 'g')
" Replace all tabs with " | "
let curr_line = substitute(curr_line, '\t', ' | ', 'g')
" Possibly insert a leading | (if there isn't already one)
@abatkin
abatkin / vimwiki.vim
Created May 29, 2012 21:19
.vim/after/ftplugin/vimwiki.vim
set wrap
set linebreak
set textwidth=0
set wrapmargin=0
@abatkin
abatkin / .vimrc
Created May 29, 2012 21:18
Work vimrc (on Windows)
call pathogen#infect()
let s:local_vim_dir = expand("~/.vim-local")
if isdirectory(s:local_vim_dir)
call pathogen#infect(s:local_vim_dir)
endif
syntax enable
filetype plugin indent on
@abatkin
abatkin / tabular.vim
Created April 5, 2012 20:03
Table formatting (with Tabular)
function! FormatTableLine(line)
let curr_line = a:line
" Get rid of all leading or trailing spaces
let curr_line = substitute(curr_line, '^[ ]\{1,\}\|[ ]\{1,\}$', '', 'g')
" Replace all tabs with " | "
let curr_line = substitute(curr_line, '\t', ' | ', 'g')
" Possibly insert a leading | (if there isn't already one)
@abatkin
abatkin / intellitype.txt
Created April 4, 2012 19:27
IntelliType Hacking
In the registry:
[HKEY_CURRENT_USER\Software\Microsoft\IntelliType Pro\ModelSpecific\1016\EventMapping\82]
The ModelSpecific\1016 stuff may be different depending on the keyboard
The 82 is the specific key (in this case, Favorite 5)
Reference here: http://xahlee.org/emacs/ms_keyboard/intellitype_rigistry.html
"Command"=dword:0000019c
@abatkin
abatkin / AutoHotkey.ahk
Last active January 28, 2021 17:49
Keyboard setup
; VirtuaWin - Switch to next desktop
sc169:: ; Forward
PostMessage, 1034, 1026, 0, , VirtuaWinMainClass
return
; VirtuaWin - Bring window to next desktop
+sc169:: ; Shift+Forward
PostMessage, 1049, 0, -1026, , VirtuaWinMainClass
return