Skip to content

Instantly share code, notes, and snippets.

Martin Grenfell scrooloose

Block or report user

Report or block scrooloose

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
View override_tab_mapping.vim
call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 })
function NERDTreeMyOpenInTab(node)
call{'reuse': "all", 'where': 't'})
View foo.vim
"put this in your vimrc
"note: I'll probably add :NERDTreeSecondary after work tonight
autocmd vimenter * call s:CheckToSplitTwoTrees()
function! s:CheckToSplitTwoTrees()
if argc() != 1 || !isdirectory(argv(0))
View gitignore_filter.vim
"Chuck this in [a vim runtime]/nerdtree_plugin/gitignore_filter.vim
if exists("loaded_nerdtree_gitignore_filter")
let loaded_nerdtree_gitignore_filter = 1
call NERDTreeAddPathFilter('NERDTreeGitIgnoreFilter')
#Author: Martin Grenfell []
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# for more details.
#This script hijacks calls to svn and adds color and pagination to
View foo.js
function() {
$.get('/admin/purchases', function(data) {
View epic_hacks.vim
"stick this shit in a markdown ftplugin
"Open a markdown file.
"Use the :MdLive command.
"Save the file and it will update
command MdLive call s:InitMarkdownHacks()
autocmd bufwritepost <buffer> call s:CheckToBuildMd()

sudo apt-get install build-essential ruby-dev libxml++2.6-dev libsqlite3-dev nodejs sudo gem install rails cd /tmp rails new test cd test rails server

now go to http://localhost:3000 in your browser, you should see a welcome page.

View projects.vim
" Usage:
" Create a project from the current nerdtree with
" :NERDTreeProjectSave <name>
" Load a project with
" :NERDTreeProjectLoad <name>
" Delete a project with
" :NERDTreeProjectRm <name>
scrooloose / hax0r.vim
Created Jan 10, 2012 — forked from asgeo1/hax0r.vim
NERDTree custom mappings to make i and s reuse existing windows
View hax0r.vim
let g:NERDTreeCustomReuseWindows = '1'
call NERDTreeAddKeyMap({
\ 'key': 'w',
\ 'scope': 'all',
\ 'callback': 'NERDTreeCustomToggleReuse',
\ 'quickhelpText': 'Toggle use existing windows' })
function! NERDTreeCustomToggleReuse()
let g:NERDTreeCustomReuseWindows = g:NERDTreeCustomReuseWindows ? 0 : 1
View visual-search-mappings.vim
"visual search mappings
function! s:VSetSearch()
let temp = @@
norm! gvy
let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g')
let @@ = temp
vnoremap * :<C-u>call <SID>VSetSearch()<CR>//<CR>
vnoremap # :<C-u>call <SID>VSetSearch()<CR>??<CR>
You can’t perform that action at this time.