forked from scudco/dotfiles
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
271 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
vim-peepopen | ||
============= | ||
|
||
A plugin for the Vim text editor. PeepOpen provides fuzzy search of filenames and paths in a programming project. | ||
|
||
Installation | ||
------------ | ||
|
||
Get the PeepOpen.app and open it at least once to approve the Mac OS X security dialog. | ||
|
||
Standard: | ||
|
||
Copy `peepopen.vim` to your `~/.vim/plugin` directory. | ||
|
||
With Tim Pope's [Pathogen](http://github.com/tpope/vim-pathogen): | ||
|
||
Copy the entire `vim-peepopen` plugin directory to your `~/.vim/bundle` directory. | ||
|
||
Usage | ||
----- | ||
|
||
`<Leader>p` opens the current project directory with the PeepOpen application. | ||
|
||
Use the [vim-rooter](http://github.com/airblade/vim-rooter) plugin for automatic assignment of the current working directory for projects stored in Git. | ||
|
||
(Leader is mapped to '\' by default) | ||
|
||
Credits | ||
------- | ||
|
||
- Initial Vim Plugin by [Andrew Stewart](http://www.airbladesoftware.com/). | ||
- Some plugin boilerplate from [Rein Henrichs](http://reinh.com/). | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
" plugin/peepopen.vim | ||
" Author: Geoffrey Grosenbach <boss@topfunky.com> | ||
" License: MIT License | ||
|
||
" Install this file as plugin/peepopen.vim. | ||
|
||
" ============================================================================ | ||
|
||
" Exit quickly when: | ||
" - this plugin was already loaded (or disabled) | ||
" - when 'compatible' is set | ||
if &cp || exists("g:peepopen_loaded") && g:peepopen_loaded | ||
finish | ||
endif | ||
let g:peepopen_loaded = 1 | ||
|
||
let s:save_cpo = &cpo | ||
set cpo&vim | ||
|
||
function s:LaunchPeepOpenViaVim() | ||
let cwd = getcwd() | ||
silent exe "!open -a PeepOpen " . shellescape(cwd) | ||
endfunction | ||
|
||
command! PeepOpen :call <SID>LaunchPeepOpenViaVim() | ||
|
||
noremap <unique> <script> <Plug>PeepOpen <SID>Launch | ||
noremap <SID>Launch :call <SID>LaunchPeepOpenViaVim()<CR> | ||
if !hasmapto('<Plug>PeepOpen') | ||
map <unique> <silent> <Leader>p <Plug>PeepOpen | ||
endif | ||
|
||
let &cpo = s:save_cpo | ||
unlet s:save_cpo | ||
|
||
" vim:set sw=2 sts=2: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
au! BufRead,BufNewFile *.json setfiletype json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
au BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mkd,*.mkdn set filetype=mkd |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
" Vim syntax file | ||
" Language: JSON | ||
" Maintainer: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> | ||
" Last Change: 2009-06-16 | ||
" Version: 0.4 | ||
" {{{1 | ||
|
||
" Syntax setup {{{2 | ||
" For version 5.x: Clear all syntax items | ||
" For version 6.x: Quit when a syntax file was already loaded | ||
|
||
if !exists("main_syntax") | ||
if version < 600 | ||
syntax clear | ||
elseif exists("b:current_syntax") | ||
finish | ||
endif | ||
let main_syntax = 'json' | ||
endif | ||
|
||
" Syntax: Strings {{{2 | ||
syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape | ||
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript. | ||
syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+ | ||
|
||
" Syntax: Escape sequences {{{3 | ||
syn match jsonEscape "\\["\\/bfnrt]" contained | ||
syn match jsonEscape "\\u\x\{4}" contained | ||
|
||
" Syntax: Strings should always be enclosed with quotes. | ||
syn match jsonNoQuotes "\<\a\+\>" | ||
|
||
" Syntax: Numbers {{{2 | ||
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" | ||
|
||
" Syntax: An integer part of 0 followed by other digits is not allowed. | ||
syn match jsonNumError "-\=\<0\d\.\d*\>" | ||
|
||
" Syntax: Boolean {{{2 | ||
syn keyword jsonBoolean true false | ||
|
||
" Syntax: Null {{{2 | ||
syn keyword jsonNull null | ||
|
||
" Syntax: Braces {{{2 | ||
syn match jsonBraces "[{}\[\]]" | ||
|
||
" Define the default highlighting. {{{1 | ||
" For version 5.7 and earlier: only when not done already | ||
" For version 5.8 and later: only when an item doesn't have highlighting yet | ||
if version >= 508 || !exists("did_json_syn_inits") | ||
if version < 508 | ||
let did_json_syn_inits = 1 | ||
command -nargs=+ HiLink hi link <args> | ||
else | ||
command -nargs=+ HiLink hi def link <args> | ||
endif | ||
HiLink jsonString String | ||
HiLink jsonEscape Special | ||
HiLink jsonNumber Number | ||
HiLink jsonBraces Operator | ||
HiLink jsonNull Function | ||
HiLink jsonBoolean Boolean | ||
|
||
HiLink jsonNumError Error | ||
HiLink jsonStringSQ Error | ||
HiLink jsonNoQuotes Error | ||
delcommand HiLink | ||
endif | ||
|
||
let b:current_syntax = "json" | ||
if main_syntax == 'json' | ||
unlet main_syntax | ||
endif | ||
|
||
" Vim settings {{{2 | ||
" vim: ts=8 fdm=marker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
" Vim syntax file | ||
" Language: Markdown | ||
" Maintainer: Ben Williams <benw@plasticboy.com> | ||
" URL: http://plasticboy.com/markdown-vim-mode/ | ||
" Version: 9 | ||
" Last Change: 2009 May 18 | ||
" Remark: Uses HTML syntax file | ||
" Remark: I don't do anything with angle brackets (<>) because that would too easily | ||
" easily conflict with HTML syntax | ||
" TODO: Handle stuff contained within stuff (e.g. headings within blockquotes) | ||
|
||
|
||
" Read the HTML syntax to start with | ||
if version < 600 | ||
so <sfile>:p:h/html.vim | ||
else | ||
runtime! syntax/html.vim | ||
unlet b:current_syntax | ||
endif | ||
|
||
if version < 600 | ||
syntax clear | ||
elseif exists("b:current_syntax") | ||
finish | ||
endif | ||
|
||
" don't use standard HiLink, it will not work with included syntax files | ||
if version < 508 | ||
command! -nargs=+ HtmlHiLink hi link <args> | ||
else | ||
command! -nargs=+ HtmlHiLink hi def link <args> | ||
endif | ||
|
||
syn spell toplevel | ||
syn case ignore | ||
syn sync linebreaks=1 | ||
|
||
"additions to HTML groups | ||
syn region htmlBold start=/\\\@<!\(^\|\A\)\@=\*\@<!\*\*\*\@!/ end=/\\\@<!\*\@<!\*\*\*\@!\($\|\A\)\@=/ contains=@Spell,htmlItalic | ||
syn region htmlItalic start=/\\\@<!\(^\|\A\)\@=\*\@<!\*\*\@!/ end=/\\\@<!\*\@<!\*\*\@!\($\|\A\)\@=/ contains=htmlBold,@Spell | ||
syn region htmlBold start=/\\\@<!\(^\|\A\)\@=_\@<!___\@!/ end=/\\\@<!_\@<!___\@!\($\|\A\)\@=/ contains=htmlItalic,@Spell | ||
syn region htmlItalic start=/\\\@<!\(^\|\A\)\@=_\@<!__\@!/ end=/\\\@<!_\@<!__\@!\($\|\A\)\@=/ contains=htmlBold,@Spell | ||
|
||
" [link](URL) | [link][id] | [link][] | ||
syn region mkdLink matchgroup=mkdDelimiter start="\!\?\[" end="\]\ze\s*[[(]" contains=@Spell nextgroup=mkdURL,mkdID skipwhite oneline | ||
syn region mkdID matchgroup=mkdDelimiter start="\[" end="\]" contained | ||
syn region mkdURL matchgroup=mkdDelimiter start="(" end=")" contained | ||
|
||
" Link definitions: [id]: URL (Optional Title) | ||
" TODO handle automatic links without colliding with htmlTag (<URL>) | ||
syn region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite | ||
syn region mkdLinkDefTarget start="<\?\zs\S" excludenl end="\ze[>[:space:]\n]" contained nextgroup=mkdLinkTitle,mkdLinkDef skipwhite skipnl oneline | ||
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained | ||
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained | ||
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained | ||
|
||
"define Markdown groups | ||
syn match mkdLineContinue ".$" contained | ||
syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/ | ||
syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/ | ||
syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_$/ | ||
syn match mkdRule /^\s*-\{3,}$/ | ||
syn match mkdRule /^\s*\*\{3,5}$/ | ||
syn match mkdListItem "^\s*[-*+]\s\+" | ||
syn match mkdListItem "^\s*\d\+\.\s\+" | ||
syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ | ||
syn match mkdLineBreak / \+$/ | ||
syn region mkdCode start=/\\\@<!`/ end=/\\\@<!`/ | ||
syn region mkdCode start=/\s*``[^`]*/ end=/[^`]*``\s*/ | ||
syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell | ||
syn region mkdCode start="<pre[^>]*>" end="</pre>" | ||
syn region mkdCode start="<code[^>]*>" end="</code>" | ||
|
||
"HTML headings | ||
syn region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell | ||
syn region htmlH2 start="^\s*##" end="\($\|#\+\)" contains=@Spell | ||
syn region htmlH3 start="^\s*###" end="\($\|#\+\)" contains=@Spell | ||
syn region htmlH4 start="^\s*####" end="\($\|#\+\)" contains=@Spell | ||
syn region htmlH5 start="^\s*#####" end="\($\|#\+\)" contains=@Spell | ||
syn region htmlH6 start="^\s*######" end="\($\|#\+\)" contains=@Spell | ||
syn match htmlH1 /^.\+\n=\+$/ contains=@Spell | ||
syn match htmlH2 /^.\+\n-\+$/ contains=@Spell | ||
|
||
"highlighting for Markdown groups | ||
HtmlHiLink mkdString String | ||
HtmlHiLink mkdCode String | ||
HtmlHiLink mkdBlockquote Comment | ||
HtmlHiLink mkdLineContinue Comment | ||
HtmlHiLink mkdListItem Identifier | ||
HtmlHiLink mkdRule Identifier | ||
HtmlHiLink mkdLineBreak Todo | ||
HtmlHiLink mkdLink htmlLink | ||
HtmlHiLink mkdURL htmlString | ||
HtmlHiLink mkdID Identifier | ||
HtmlHiLink mkdLinkDef mkdID | ||
HtmlHiLink mkdLinkDefTarget mkdURL | ||
HtmlHiLink mkdLinkTitle htmlString | ||
|
||
HtmlHiLink mkdDelimiter Delimiter | ||
|
||
let b:current_syntax = "mkd" | ||
|
||
delcommand HtmlHiLink | ||
" vim: ts=8 |
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
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