Skip to content

Instantly share code, notes, and snippets.

View majutsushi's full-sized avatar

Jan Larres majutsushi

View GitHub Profile
// ==UserScript==
// @name JIRA: Prevent Alt+[123] hijacking
// @include *RapidBoard.jsp*
// @version 1
// @grant none
// ==/UserScript==
// From https://jira.atlassian.com/browse/JSWSERVER-12296
document.body.addEventListener('keypress', function (event) {
@majutsushi
majutsushi / gist:901860
Created April 4, 2011 15:46
Automatically create dir to write file to if it doesn't exist
" Automatically create dir to write file to if it doesn't exist
function! AutoMkDir()
let required_dir = expand("<afile>:p:h")
if !isdirectory(required_dir)
if confirm("Directory '" . required_dir . "' doesn't exist.", "&Abort\n&Create it") != 2
bdelete
return
endif
try
@majutsushi
majutsushi / taglist.patch
Created April 4, 2011 14:08
Fix Tlist_Refresh_Folds bug
diff --git a/vim/.vim/bundle/taglist/plugin/taglist.vim b/vim/.vim/bundle/taglist/plugin/taglist.vim
index 59901f6..74487a1 100644
--- a/vim/.vim/bundle/taglist/plugin/taglist.vim
+++ b/vim/.vim/bundle/taglist/plugin/taglist.vim
@@ -4097,6 +4097,11 @@ endfunction
" window. Used after entering a tab. If this is not done, then the folds
" are not properly created for taglist windows displayed in multiple tabs.
function! s:Tlist_Refresh_Folds()
+
+ if g:Tlist_Show_One_File