Skip to content

Instantly share code, notes, and snippets.

@tpope
Created May 5, 2015 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tpope/9db79a12feb2207f05b5 to your computer and use it in GitHub Desktop.
Save tpope/9db79a12feb2207f05b5 to your computer and use it in GitHub Desktop.
nmap <script> <SID>: :<C-R>=getcmdline() =~ ',' ? "\0250" : ""<CR>
nmap <script> d<CR> <SID>:Dispatch<CR>
nmap <script> d<Space> <SID>:Dispatch<Space>
nmap <script> d! <SID>:Dispatch!
nmap <script> <SID>make <SID>:<C-R>=exists(':Make') > 1 ? 'Make' : 'make'<CR>
nmap <script> m<CR> <SID>make<CR>
nmap <script> m<Space> <SID>make<Space>
nmap <script> m! <SID>make!
" Is there a better mnemonic than =?
nmap <script> =<CR> :<C-R>=exists(':Start') > 1 ? 'Start' : 'shell'<CR><CR>
nmap <script> =<Space> :<C-R>=exists(':Start') > 1 ? 'Start ' : '!'<CR>
nmap <script> =! :<C-R>=exists(':Start') > 1 ? 'Start!' : '!'<CR>
nmap <script> =c :Console<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment