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
{ | |
"application/classes/*.php": { | |
"command": "class" | |
}, | |
"application/config/*.php": { | |
"command": "aconfig" | |
}, | |
"application/classes/controller/*.php": { | |
"command": "controller" | |
}, |
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
{ | |
"application/classes/controller/*.php": { | |
"command": "controller" | |
}, | |
"modules/prosoftxp_ad/classes/controller/*.php": { | |
"command": "ADcontroller" | |
}, | |
"modules/prosoftxp_cs/classes/controller/*.php": { | |
"command": "CScontroller" | |
}, |
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
" Style 1: Using :execute | |
nnoremap <Leader>x :execute some_expression().'some_command'<CR> | |
" Style 2: Using <expr> mapping | |
nnoremap <expr> <Leader>x ':'.some_expression().'some_command<CR>' | |
" Style 3: Using the expression register | |
nnoremap <Leader>x :<C-R>=some_expression()<CR>some_command<CR> |
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 | |
# Show changes that are only on the current branch. | |
# Useful when working on a feature branch | |
# | |
# USAGE: | |
# git since [COMMAND] [PARENT-BRANCH] | |
# | |
# COMMAND defaults to log | |
# |
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 | |
SITE_BASE=/home/tommcdo/sites # Base directory into which sites are installed | |
LOCAL_TLD=local # TLD for local sites, e.g. http://mysite.local | |
DOC_ROOT=public_html # Subdirectory of main folder for document root | |
# Ensure root privileges | |
if [[ $EUID -ne 0 ]]; then | |
echo >&2 "This script can only be run as root" | |
exit |
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
" Add configuration here |
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
function! s:browser_from_model() | |
normal gg | |
call search('Model_DataSource_.', 'e') | |
normal ye | |
sp | |
execute "Ag \"'name' => '".tolower(@@)."'\" modules/browsers/classes" | |
execute "normal \<CR>" | |
ccl | |
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
""" Fuzzy search | |
function! Fuzzy(text) | |
call FuzzyClear() | |
let text = '\c'.substitute(a:text, '.\zs', '.\\{-}', 'g')[:-6] | |
let b:fuzzy_last = text | |
call search(text) | |
call FuzzyHL(a:text) | |
let @/ = text | |
execute "nmap n :<C-U>call FuzzyN('n', '".escape(a:text, "'")."')<CR>" |
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
""" Vdebug maps and settings | |
" I already have most of my usable <F*> keys mapped to other things, and many | |
" of them aren't usable in my desktop environment (stolen by the window manager | |
" or the terminal emulator). These mappings are easier to remember, and for | |
" 'Vdebug mode', they are all borrowed from edit commands which would otherwise | |
" by of no use while debugging. | |
" All of the Vdebug commands are always available with mappings beginning with | |
" <Leader>v. This can get tedious, so I've created 'Vdebug mode' that can be |
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
function! TrailingWhitespaceToggle(...) | |
let hlgroup = a:0 ? a:0 : 'Search' | |
if !exists('s:trailing_whitespace_match') | |
let s:trailing_whitespace_match = matchadd(hlgroup, '\s\+$') | |
echo 'Trailing whitespace on' | |
else | |
call matchdelete(s:trailing_whitespace_match) | |
unlet s:trailing_whitespace_match | |
echo 'Trailing whitespace off' | |
endif |