This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"chuck this in ~/.vim/nerdtree_plugin/coffee_filter.vim (see what I did there?) | |
if exists("g:loaded_nerdtree_js_filter") | |
finish | |
endif | |
let g:loaded_nerdtree_js_filter = 1 | |
let s:extMatch = '\.\(js\|js\.map\)$' | |
call g:NERDTree.AddPathFilter("FilterCoffee") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call NERDTreeAddKeyMap({'key': 't', 'callback': 'NERDTreeMyOpenInTab', 'scope': 'FileNode', 'override': 1 }) | |
function NERDTreeMyOpenInTab(node) | |
call a:node.open({'reuse': "all", 'where': 't'}) | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fu! NERDTreeFindPrevBuf() | |
if g:NERDTree.IsOpen() | |
NERDTreeClose | |
elseif (!filereadable(bufname('%')) || (bufname('%') == '__Tag_List__') || (bufname('%') == '__Tagbar__')) | |
echo "Previous buf not valid or readable file." | |
NERDTree | |
else | |
NERDTreeFind | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Chuck this in [a vim runtime]/nerdtree_plugin/gitignore_filter.vim | |
if exists("loaded_nerdtree_gitignore_filter") | |
finish | |
endif | |
let loaded_nerdtree_gitignore_filter = 1 | |
call NERDTreeAddPathFilter('NERDTreeGitIgnoreFilter') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module OpsWorks | |
module RailsConfiguration | |
def self.determine_database_adapter(app_name, app_config, app_root_path, options = {}) | |
options = { | |
:consult_gemfile => true, | |
:force => false | |
}.update(options) | |
if options[:force] || app_config[:database][:adapter].blank? | |
# a bunch of confusing shit | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -f /tmp/tmux-cpu ]; then | |
cat /tmp/tmux-cpu | |
else | |
echo "???" | |
fi | |
CPU=`mpstat 1 1` && echo $CPU | awk '{printf("%2.f", $(NF-8) + $(NF-6)) }' > /tmp/tmux-cpu & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Demo nerdtree plugin to override the default 'o' mapping and make it not | |
"reuse windows. | |
" | |
"Chuck this in | |
" ~/.vim/nerdtree_plugin/nerdtree_custom_open.vim | |
" | |
"or somewhere like | |
" ~/.vim/bundle/nerdtree_plugin/nerdtree_custom_open.vim | |
" | |
"if using pathogen or similar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ============================================================================ | |
" File: git.vim | |
" Description: Expt. plugin to add git flags to the UI | |
" Maintainer: | |
" License: 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 http://sam.zoy.org/wtfpl/COPYING for more details. | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists("g:loaded_nerdtree_open_multiple") | |
finish | |
endif | |
let g:loaded_nerdtree_open_multiple=1 | |
vnoremap <buffer> o :call <SID>OpenMultiple()<cr> | |
function! s:OpenMultiple() range | |
let curLine = a:firstline | |
while curLine <= a:lastline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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)) | |
return | |
endif | |
vsplit |