From 7a7c647c221f8c9bd583e6373f6b183d3a0e201d Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Sat, 18 May 2024 18:50:38 -0700 Subject: [PATCH] dot_vim --- .vim/after/ftplugin/go.vim | 1 - .vim/after/ftplugin/haskell.vim | 2 - .vim/after/ftplugin/qf.vim | 3 - .vim/after/syntax/cocoa_keywords.vim | 28 - .vim/after/syntax/objc_enhanced.vim | 59 - .vim/autoload/airline/themes/barak.vim | 61 - .vim/autoload/genutils.vim | 1954 ------------------- .vim/autoload/lookupfile.vim | 472 ----- .vim/autoload/objc/cocoacomplete.vim | 215 --- .vim/autoload/objc/man.vim | 160 -- .vim/autoload/objc/method_builder.vim | 124 -- .vim/autoload/objc/method_list.vim | 115 -- .vim/autoload/objc/pum_snippet.vim | 87 - .vim/autoload/pathogen.vim | 328 ---- .vim/autoload/plug.vim | 2812 ---------------------------- .vim/autoload/pythoncomplete.vim | 625 ------- .vim/autoload/rubycomplete.vim | 530 ------ .vim/autoload/snipMate.vim | 433 ----- .vim/buftabs.vim | 309 --- .vim/charm.vim | 18 - .vim/closetag.vim | 327 ---- .vim/coc-settings.json | 34 - .vim/colors/barak.vim | 110 -- .vim/colors/baraknew.vim | 434 ----- .vim/colors/dante.vim | 83 - .vim/colors/ir_black.vim | 212 --- .vim/colors/lucius.vim | 346 ---- .vim/colors/ps_color.vim | 469 ----- .vim/colors/zenburn.vim | 245 --- .vim/doc/NERD_tree.txt | 1077 ----------- .vim/doc/bufexplorer.txt | 442 ----- .vim/doc/cocoa.txt | 151 -- .vim/doc/matchit.txt | 406 ---- .vim/doc/project.txt | 710 ------- .vim/doc/ps_color.txt | 603 ------ .vim/doc/snipMate.txt | 286 --- .vim/doc/tags | 354 ---- .vim/doc/vcscommand.txt | 819 -------- .vim/filetype.vim | 147 -- .vim/ftdetect/proto.vim | 1 - .vim/ftdetect/scala.vim | 3 - .vim/ftplugin/html_snip_helper.vim | 10 - .vim/ftplugin/objc_cocoa_mappings.vim | 70 - .vim/indent/cpp.vim | 92 - .vim/indent/gohtmltmpl.vim | 54 - .vim/indent/haskell.vim | 96 - .vim/indent/javascript.vim | 330 ---- .vim/indent/mako.vim | 353 ---- .vim/indent/python.vim | 196 -- .vim/indent/scala.vim | 85 - .vim/init.vim | 3 - .vim/lua/lir_setup.lua | 88 - .vim/lua/lualine_setup.lua | 28 - .vim/markdown_cheatsheet.md | 376 ---- .vim/nvim.lua | 678 ------- .vim/plugin/AppleT.vim | 73 - .vim/plugin/a.vim | 840 --------- .vim/plugin/bclose.vim | 70 - .vim/plugin/camelcasemotion.vim | 449 ----- .vim/plugin/cocoa.vim | 16 - .vim/plugin/cscope_maps.vim | 166 -- .vim/plugin/cscopemenu.vim | 24 - .vim/plugin/genutils.vim | 996 ---------- .vim/plugin/gotags.vim | 27 - .vim/plugin/matchit.vim | 812 -------- .vim/plugin/vcsbzr.vim | 257 --- .vim/plugin/vcscommand.vim | 1402 -------------- .vim/plugin/vcscvs.vim | 445 ----- .vim/plugin/vcsgit.vim | 248 --- .vim/plugin/vcshg.vim | 273 --- .vim/plugin/vcssvk.vim | 258 --- .vim/plugin/vcssvn.vim | 283 --- .vim/plugin/vim-scmdiff/NEWS | 24 - .vim/plugin/vim-scmdiff/README | 22 - .vim/plugin/vim-scmdiff/TODO | 11 - .vim/plugin/vim-scmdiff/scmdiff.vim | 160 -- .vim/skeletons/svelte.skel | 9 - .vim/skeletons/vue.skel | 19 - .vim/syntax/c.vim | 377 ---- .vim/syntax/cvsannotate.vim | 45 - .vim/syntax/gitannotate.vim | 44 - .vim/syntax/haskell.vim | 355 ---- .vim/syntax/hgannotate.vim | 40 - .vim/syntax/java.vim | 9 - .vim/syntax/javascript.vim | 247 --- .vim/syntax/lilypond-words | 1040 ---------- .vim/syntax/lilypond-words.vim | 3 - .vim/syntax/lilypond.vim | 83 - .vim/syntax/mako.vim | 83 - .vim/syntax/mediawiki.vim | 304 --- .vim/syntax/mkd.vim | 104 - .vim/syntax/motd.vim | 23 - .vim/syntax/nvpscript.vim | 72 - .vim/syntax/proto.vim | 105 -- .vim/syntax/scala.vim | 153 -- .vim/syntax/snippet.vim | 19 - .vim/syntax/svkannotate.vim | 42 - .vim/syntax/svnannotate.vim | 40 - .vim/syntax/vcscommit.vim | 31 - .vim/syntax_checkers/go/golintc.vim | 42 - .vim/syntax_checkers/go/gonyet.vim | 49 - .vim/syntax_checkers/go/govetshadow.vim | 52 - .vim/tabbar.vim | 1646 ---------------- .vim/usnips/c.snippets | 87 - .vim/usnips/cpp.snippets | 27 - .vim/usnips/go.snippets | 565 ------ dot_vim/after/ftplugin/go.vim | 1 + dot_vim/after/ftplugin/haskell.vim | 2 + dot_vim/after/ftplugin/qf.vim | 3 + dot_vim/after/syntax/cocoa_keywords.vim | 28 + dot_vim/after/syntax/objc_enhanced.vim | 59 + dot_vim/autoload/airline/themes/barak.vim | 61 + dot_vim/autoload/genutils.vim | 1954 +++++++++++++++++++ dot_vim/autoload/lookupfile.vim | 472 +++++ dot_vim/autoload/objc/cocoacomplete.vim | 215 +++ dot_vim/autoload/objc/man.vim | 160 ++ dot_vim/autoload/objc/method_builder.vim | 124 ++ dot_vim/autoload/objc/method_list.vim | 115 ++ dot_vim/autoload/objc/pum_snippet.vim | 87 + dot_vim/autoload/pathogen.vim | 328 ++++ dot_vim/autoload/plug.vim | 2812 ++++++++++++++++++++++++++++ dot_vim/autoload/pythoncomplete.vim | 625 +++++++ dot_vim/autoload/rubycomplete.vim | 530 ++++++ dot_vim/autoload/snipMate.vim | 433 +++++ dot_vim/buftabs.vim | 309 +++ dot_vim/charm.vim | 18 + dot_vim/closetag.vim | 327 ++++ dot_vim/coc-settings.json | 34 + dot_vim/colors/barak.vim | 110 ++ dot_vim/colors/baraknew.vim | 434 +++++ dot_vim/colors/dante.vim | 83 + dot_vim/colors/ir_black.vim | 212 +++ dot_vim/colors/lucius.vim | 346 ++++ dot_vim/colors/ps_color.vim | 469 +++++ dot_vim/colors/zenburn.vim | 245 +++ dot_vim/doc/NERD_tree.txt | 1077 +++++++++++ dot_vim/doc/bufexplorer.txt | 442 +++++ dot_vim/doc/cocoa.txt | 151 ++ dot_vim/doc/matchit.txt | 406 ++++ dot_vim/doc/project.txt | 710 +++++++ dot_vim/doc/ps_color.txt | 603 ++++++ dot_vim/doc/snipMate.txt | 286 +++ dot_vim/doc/tags | 354 ++++ dot_vim/doc/vcscommand.txt | 819 ++++++++ dot_vim/filetype.vim | 147 ++ dot_vim/ftdetect/proto.vim | 1 + dot_vim/ftdetect/scala.vim | 3 + dot_vim/ftplugin/html_snip_helper.vim | 10 + dot_vim/ftplugin/objc_cocoa_mappings.vim | 70 + dot_vim/indent/cpp.vim | 92 + dot_vim/indent/gohtmltmpl.vim | 54 + dot_vim/indent/haskell.vim | 96 + dot_vim/indent/javascript.vim | 330 ++++ dot_vim/indent/mako.vim | 353 ++++ dot_vim/indent/python.vim | 196 ++ dot_vim/indent/scala.vim | 85 + dot_vim/init.vim | 3 + dot_vim/lua/lir_setup.lua | 88 + dot_vim/lua/lualine_setup.lua | 28 + dot_vim/markdown_cheatsheet.md | 376 ++++ dot_vim/nvim.lua | 678 +++++++ dot_vim/plugin/AppleT.vim | 73 + dot_vim/plugin/a.vim | 840 +++++++++ dot_vim/plugin/bclose.vim | 70 + dot_vim/plugin/camelcasemotion.vim | 449 +++++ dot_vim/plugin/cocoa.vim | 16 + dot_vim/plugin/cscope_maps.vim | 166 ++ dot_vim/plugin/cscopemenu.vim | 24 + dot_vim/plugin/genutils.vim | 996 ++++++++++ dot_vim/plugin/gotags.vim | 27 + dot_vim/plugin/matchit.vim | 812 ++++++++ dot_vim/plugin/vcsbzr.vim | 257 +++ dot_vim/plugin/vcscommand.vim | 1402 ++++++++++++++ dot_vim/plugin/vcscvs.vim | 445 +++++ dot_vim/plugin/vcsgit.vim | 248 +++ dot_vim/plugin/vcshg.vim | 273 +++ dot_vim/plugin/vcssvk.vim | 258 +++ dot_vim/plugin/vcssvn.vim | 283 +++ dot_vim/plugin/vim-scmdiff/NEWS | 24 + dot_vim/plugin/vim-scmdiff/README | 22 + dot_vim/plugin/vim-scmdiff/TODO | 11 + dot_vim/plugin/vim-scmdiff/scmdiff.vim | 160 ++ dot_vim/skeletons/svelte.skel | 9 + dot_vim/skeletons/vue.skel | 19 + dot_vim/syntax/c.vim | 377 ++++ dot_vim/syntax/cvsannotate.vim | 45 + dot_vim/syntax/gitannotate.vim | 44 + dot_vim/syntax/haskell.vim | 355 ++++ dot_vim/syntax/hgannotate.vim | 40 + dot_vim/syntax/java.vim | 9 + dot_vim/syntax/javascript.vim | 247 +++ dot_vim/syntax/lilypond-words | 1040 ++++++++++ dot_vim/syntax/lilypond-words.vim | 3 + dot_vim/syntax/lilypond.vim | 83 + dot_vim/syntax/mako.vim | 83 + dot_vim/syntax/mediawiki.vim | 304 +++ dot_vim/syntax/mkd.vim | 104 + dot_vim/syntax/motd.vim | 23 + dot_vim/syntax/nvpscript.vim | 72 + dot_vim/syntax/proto.vim | 105 ++ dot_vim/syntax/scala.vim | 153 ++ dot_vim/syntax/snippet.vim | 19 + dot_vim/syntax/svkannotate.vim | 42 + dot_vim/syntax/svnannotate.vim | 40 + dot_vim/syntax/vcscommit.vim | 31 + dot_vim/syntax_checkers/go/golintc.vim | 42 + dot_vim/syntax_checkers/go/gonyet.vim | 49 + dot_vim/syntax_checkers/go/govetshadow.vim | 52 + dot_vim/tabbar.vim | 1646 ++++++++++++++++ dot_vim/usnips/c.snippets | 87 + dot_vim/usnips/cpp.snippets | 27 + dot_vim/usnips/go.snippets | 565 ++++++ 212 files changed, 30625 insertions(+), 30625 deletions(-) delete mode 100644 .vim/after/ftplugin/go.vim delete mode 100644 .vim/after/ftplugin/haskell.vim delete mode 100644 .vim/after/ftplugin/qf.vim delete mode 100644 .vim/after/syntax/cocoa_keywords.vim delete mode 100644 .vim/after/syntax/objc_enhanced.vim delete mode 100644 .vim/autoload/airline/themes/barak.vim delete mode 100755 .vim/autoload/genutils.vim delete mode 100755 .vim/autoload/lookupfile.vim delete mode 100644 .vim/autoload/objc/cocoacomplete.vim delete mode 100644 .vim/autoload/objc/man.vim delete mode 100644 .vim/autoload/objc/method_builder.vim delete mode 100644 .vim/autoload/objc/method_list.vim delete mode 100644 .vim/autoload/objc/pum_snippet.vim delete mode 100644 .vim/autoload/pathogen.vim delete mode 100644 .vim/autoload/plug.vim delete mode 100644 .vim/autoload/pythoncomplete.vim delete mode 100644 .vim/autoload/rubycomplete.vim delete mode 100644 .vim/autoload/snipMate.vim delete mode 100644 .vim/buftabs.vim delete mode 100644 .vim/charm.vim delete mode 100644 .vim/closetag.vim delete mode 100644 .vim/coc-settings.json delete mode 100644 .vim/colors/barak.vim delete mode 100644 .vim/colors/baraknew.vim delete mode 100644 .vim/colors/dante.vim delete mode 100644 .vim/colors/ir_black.vim delete mode 100644 .vim/colors/lucius.vim delete mode 100644 .vim/colors/ps_color.vim delete mode 100644 .vim/colors/zenburn.vim delete mode 100644 .vim/doc/NERD_tree.txt delete mode 100644 .vim/doc/bufexplorer.txt delete mode 100644 .vim/doc/cocoa.txt delete mode 100644 .vim/doc/matchit.txt delete mode 100644 .vim/doc/project.txt delete mode 100644 .vim/doc/ps_color.txt delete mode 100644 .vim/doc/snipMate.txt delete mode 100644 .vim/doc/tags delete mode 100644 .vim/doc/vcscommand.txt delete mode 100644 .vim/filetype.vim delete mode 100644 .vim/ftdetect/proto.vim delete mode 100644 .vim/ftdetect/scala.vim delete mode 100644 .vim/ftplugin/html_snip_helper.vim delete mode 100644 .vim/ftplugin/objc_cocoa_mappings.vim delete mode 100644 .vim/indent/cpp.vim delete mode 100644 .vim/indent/gohtmltmpl.vim delete mode 100644 .vim/indent/haskell.vim delete mode 100644 .vim/indent/javascript.vim delete mode 100644 .vim/indent/mako.vim delete mode 100644 .vim/indent/python.vim delete mode 100644 .vim/indent/scala.vim delete mode 100644 .vim/init.vim delete mode 100644 .vim/lua/lir_setup.lua delete mode 100644 .vim/lua/lualine_setup.lua delete mode 100644 .vim/markdown_cheatsheet.md delete mode 100644 .vim/nvim.lua delete mode 100644 .vim/plugin/AppleT.vim delete mode 100644 .vim/plugin/a.vim delete mode 100644 .vim/plugin/bclose.vim delete mode 100644 .vim/plugin/camelcasemotion.vim delete mode 100644 .vim/plugin/cocoa.vim delete mode 100644 .vim/plugin/cscope_maps.vim delete mode 100644 .vim/plugin/cscopemenu.vim delete mode 100755 .vim/plugin/genutils.vim delete mode 100644 .vim/plugin/gotags.vim delete mode 100755 .vim/plugin/matchit.vim delete mode 100644 .vim/plugin/vcsbzr.vim delete mode 100644 .vim/plugin/vcscommand.vim delete mode 100644 .vim/plugin/vcscvs.vim delete mode 100644 .vim/plugin/vcsgit.vim delete mode 100755 .vim/plugin/vcshg.vim delete mode 100644 .vim/plugin/vcssvk.vim delete mode 100644 .vim/plugin/vcssvn.vim delete mode 100644 .vim/plugin/vim-scmdiff/NEWS delete mode 100644 .vim/plugin/vim-scmdiff/README delete mode 100644 .vim/plugin/vim-scmdiff/TODO delete mode 100644 .vim/plugin/vim-scmdiff/scmdiff.vim delete mode 100644 .vim/skeletons/svelte.skel delete mode 100644 .vim/skeletons/vue.skel delete mode 100644 .vim/syntax/c.vim delete mode 100644 .vim/syntax/cvsannotate.vim delete mode 100644 .vim/syntax/gitannotate.vim delete mode 100644 .vim/syntax/haskell.vim delete mode 100755 .vim/syntax/hgannotate.vim delete mode 100644 .vim/syntax/java.vim delete mode 100644 .vim/syntax/javascript.vim delete mode 100644 .vim/syntax/lilypond-words delete mode 100644 .vim/syntax/lilypond-words.vim delete mode 100644 .vim/syntax/lilypond.vim delete mode 100644 .vim/syntax/mako.vim delete mode 100644 .vim/syntax/mediawiki.vim delete mode 100644 .vim/syntax/mkd.vim delete mode 100644 .vim/syntax/motd.vim delete mode 100644 .vim/syntax/nvpscript.vim delete mode 100644 .vim/syntax/proto.vim delete mode 100644 .vim/syntax/scala.vim delete mode 100644 .vim/syntax/snippet.vim delete mode 100644 .vim/syntax/svkannotate.vim delete mode 100644 .vim/syntax/svnannotate.vim delete mode 100644 .vim/syntax/vcscommit.vim delete mode 100644 .vim/syntax_checkers/go/golintc.vim delete mode 100644 .vim/syntax_checkers/go/gonyet.vim delete mode 100644 .vim/syntax_checkers/go/govetshadow.vim delete mode 100644 .vim/tabbar.vim delete mode 100644 .vim/usnips/c.snippets delete mode 100644 .vim/usnips/cpp.snippets delete mode 100644 .vim/usnips/go.snippets create mode 100644 dot_vim/after/ftplugin/go.vim create mode 100644 dot_vim/after/ftplugin/haskell.vim create mode 100644 dot_vim/after/ftplugin/qf.vim create mode 100644 dot_vim/after/syntax/cocoa_keywords.vim create mode 100644 dot_vim/after/syntax/objc_enhanced.vim create mode 100644 dot_vim/autoload/airline/themes/barak.vim create mode 100755 dot_vim/autoload/genutils.vim create mode 100755 dot_vim/autoload/lookupfile.vim create mode 100644 dot_vim/autoload/objc/cocoacomplete.vim create mode 100644 dot_vim/autoload/objc/man.vim create mode 100644 dot_vim/autoload/objc/method_builder.vim create mode 100644 dot_vim/autoload/objc/method_list.vim create mode 100644 dot_vim/autoload/objc/pum_snippet.vim create mode 100644 dot_vim/autoload/pathogen.vim create mode 100644 dot_vim/autoload/plug.vim create mode 100644 dot_vim/autoload/pythoncomplete.vim create mode 100644 dot_vim/autoload/rubycomplete.vim create mode 100644 dot_vim/autoload/snipMate.vim create mode 100644 dot_vim/buftabs.vim create mode 100644 dot_vim/charm.vim create mode 100644 dot_vim/closetag.vim create mode 100644 dot_vim/coc-settings.json create mode 100644 dot_vim/colors/barak.vim create mode 100644 dot_vim/colors/baraknew.vim create mode 100644 dot_vim/colors/dante.vim create mode 100644 dot_vim/colors/ir_black.vim create mode 100644 dot_vim/colors/lucius.vim create mode 100644 dot_vim/colors/ps_color.vim create mode 100644 dot_vim/colors/zenburn.vim create mode 100644 dot_vim/doc/NERD_tree.txt create mode 100644 dot_vim/doc/bufexplorer.txt create mode 100644 dot_vim/doc/cocoa.txt create mode 100644 dot_vim/doc/matchit.txt create mode 100644 dot_vim/doc/project.txt create mode 100644 dot_vim/doc/ps_color.txt create mode 100644 dot_vim/doc/snipMate.txt create mode 100644 dot_vim/doc/tags create mode 100644 dot_vim/doc/vcscommand.txt create mode 100644 dot_vim/filetype.vim create mode 100644 dot_vim/ftdetect/proto.vim create mode 100644 dot_vim/ftdetect/scala.vim create mode 100644 dot_vim/ftplugin/html_snip_helper.vim create mode 100644 dot_vim/ftplugin/objc_cocoa_mappings.vim create mode 100644 dot_vim/indent/cpp.vim create mode 100644 dot_vim/indent/gohtmltmpl.vim create mode 100644 dot_vim/indent/haskell.vim create mode 100644 dot_vim/indent/javascript.vim create mode 100644 dot_vim/indent/mako.vim create mode 100644 dot_vim/indent/python.vim create mode 100644 dot_vim/indent/scala.vim create mode 100644 dot_vim/init.vim create mode 100644 dot_vim/lua/lir_setup.lua create mode 100644 dot_vim/lua/lualine_setup.lua create mode 100644 dot_vim/markdown_cheatsheet.md create mode 100644 dot_vim/nvim.lua create mode 100644 dot_vim/plugin/AppleT.vim create mode 100644 dot_vim/plugin/a.vim create mode 100644 dot_vim/plugin/bclose.vim create mode 100644 dot_vim/plugin/camelcasemotion.vim create mode 100644 dot_vim/plugin/cocoa.vim create mode 100644 dot_vim/plugin/cscope_maps.vim create mode 100644 dot_vim/plugin/cscopemenu.vim create mode 100755 dot_vim/plugin/genutils.vim create mode 100644 dot_vim/plugin/gotags.vim create mode 100755 dot_vim/plugin/matchit.vim create mode 100644 dot_vim/plugin/vcsbzr.vim create mode 100644 dot_vim/plugin/vcscommand.vim create mode 100644 dot_vim/plugin/vcscvs.vim create mode 100644 dot_vim/plugin/vcsgit.vim create mode 100755 dot_vim/plugin/vcshg.vim create mode 100644 dot_vim/plugin/vcssvk.vim create mode 100644 dot_vim/plugin/vcssvn.vim create mode 100644 dot_vim/plugin/vim-scmdiff/NEWS create mode 100644 dot_vim/plugin/vim-scmdiff/README create mode 100644 dot_vim/plugin/vim-scmdiff/TODO create mode 100644 dot_vim/plugin/vim-scmdiff/scmdiff.vim create mode 100644 dot_vim/skeletons/svelte.skel create mode 100644 dot_vim/skeletons/vue.skel create mode 100644 dot_vim/syntax/c.vim create mode 100644 dot_vim/syntax/cvsannotate.vim create mode 100644 dot_vim/syntax/gitannotate.vim create mode 100644 dot_vim/syntax/haskell.vim create mode 100755 dot_vim/syntax/hgannotate.vim create mode 100644 dot_vim/syntax/java.vim create mode 100644 dot_vim/syntax/javascript.vim create mode 100644 dot_vim/syntax/lilypond-words create mode 100644 dot_vim/syntax/lilypond-words.vim create mode 100644 dot_vim/syntax/lilypond.vim create mode 100644 dot_vim/syntax/mako.vim create mode 100644 dot_vim/syntax/mediawiki.vim create mode 100644 dot_vim/syntax/mkd.vim create mode 100644 dot_vim/syntax/motd.vim create mode 100644 dot_vim/syntax/nvpscript.vim create mode 100644 dot_vim/syntax/proto.vim create mode 100644 dot_vim/syntax/scala.vim create mode 100644 dot_vim/syntax/snippet.vim create mode 100644 dot_vim/syntax/svkannotate.vim create mode 100644 dot_vim/syntax/svnannotate.vim create mode 100644 dot_vim/syntax/vcscommit.vim create mode 100644 dot_vim/syntax_checkers/go/golintc.vim create mode 100644 dot_vim/syntax_checkers/go/gonyet.vim create mode 100644 dot_vim/syntax_checkers/go/govetshadow.vim create mode 100644 dot_vim/tabbar.vim create mode 100644 dot_vim/usnips/c.snippets create mode 100644 dot_vim/usnips/cpp.snippets create mode 100644 dot_vim/usnips/go.snippets diff --git a/.vim/after/ftplugin/go.vim b/.vim/after/ftplugin/go.vim deleted file mode 100644 index 8e50908..0000000 --- a/.vim/after/ftplugin/go.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal tabstop=2 shiftwidth=2 nolist diff --git a/.vim/after/ftplugin/haskell.vim b/.vim/after/ftplugin/haskell.vim deleted file mode 100644 index bcf2803..0000000 --- a/.vim/after/ftplugin/haskell.vim +++ /dev/null @@ -1,2 +0,0 @@ -setlocal omnifunc=necoghc#omnifunc -let g:ycm_key_invoke_completion = '' diff --git a/.vim/after/ftplugin/qf.vim b/.vim/after/ftplugin/qf.vim deleted file mode 100644 index 895d7ac..0000000 --- a/.vim/after/ftplugin/qf.vim +++ /dev/null @@ -1,3 +0,0 @@ -nmap { (qf_previous_file) -nmap } (qf_next_file) -nmap dd .Reject diff --git a/.vim/after/syntax/cocoa_keywords.vim b/.vim/after/syntax/cocoa_keywords.vim deleted file mode 100644 index 90a5427..0000000 --- a/.vim/after/syntax/cocoa_keywords.vim +++ /dev/null @@ -1,28 +0,0 @@ -" Description: Syntax highlighting for the cocoa.vim plugin. -" Adds highlighting for Cocoa keywords (classes, types, etc.). -" Last Generated: September 08, 2009 - -" Cocoa Functions -syn keyword cocoaFunction containedin=objcMessage NSAccessibilityActionDescription NSAccessibilityPostNotification NSAccessibilityRaiseBadArgumentException NSAccessibilityRoleDescription NSAccessibilityRoleDescriptionForUIElement NSAccessibilityUnignoredAncestor NSAccessibilityUnignoredChildren NSAccessibilityUnignoredChildrenForOnlyChild NSAccessibilityUnignoredDescendant NSAllHashTableObjects NSAllMapTableKeys NSAllMapTableValues NSAllocateCollectable NSAllocateMemoryPages NSAllocateObject NSApplicationLoad NSApplicationMain NSAvailableWindowDepths NSBeep NSBeginAlertSheet NSBeginCriticalAlertSheet NSBeginInformationalAlertSheet NSBestDepth NSBitsPerPixelFromDepth NSBitsPerSampleFromDepth NSClassFromString NSColorSpaceFromDepth NSCompareHashTables NSCompareMapTables NSContainsRect NSConvertGlyphsToPackedGlyphs NSConvertHostDoubleToSwapped NSConvertHostFloatToSwapped NSConvertSwappedDoubleToHost NSConvertSwappedFloatToHost NSCopyBits NSCopyHashTableWithZone NSCopyMapTableWithZone NSCopyMemoryPages NSCopyObject NSCountFrames NSCountHashTable NSCountMapTable NSCountWindows NSCountWindowsForContext NSCreateFileContentsPboardType NSCreateFilenamePboardType NSCreateHashTable NSCreateHashTableWithZone NSCreateMapTable NSCreateMapTableWithZone NSCreateZone NSDeallocateMemoryPages NSDeallocateObject NSDecimalAdd NSDecimalCompact NSDecimalCompare NSDecimalCopy NSDecimalDivide NSDecimalIsNotANumber NSDecimalMultiply NSDecimalMultiplyByPowerOf10 NSDecimalNormalize NSDecimalPower NSDecimalRound NSDecimalString NSDecimalSubtract NSDecrementExtraRefCountWasZero NSDefaultMallocZone NSDisableScreenUpdates NSDivideRect NSDottedFrameRect NSDrawBitmap NSDrawButton NSDrawColorTiledRects NSDrawDarkBezel NSDrawGrayBezel NSDrawGroove NSDrawLightBezel NSDrawNinePartImage NSDrawThreePartImage NSDrawTiledRects NSDrawWhiteBezel NSDrawWindowBackground NSEnableScreenUpdates NSEndHashTableEnumeration NSEndMapTableEnumeration NSEnumerateHashTable NSEnumerateMapTable NSEqualPoints NSEqualRanges NSEqualRects NSEqualSizes NSEraseRect NSEventMaskFromType NSExtraRefCount NSFileTypeForHFSTypeCode NSFrameAddress NSFrameRect NSFrameRectWithWidth NSFrameRectWithWidthUsingOperation NSFreeHashTable NSFreeMapTable NSFullUserName NSGetAlertPanel NSGetCriticalAlertPanel NSGetFileType NSGetFileTypes NSGetInformationalAlertPanel NSGetSizeAndAlignment NSGetUncaughtExceptionHandler NSGetWindowServerMemory NSHFSTypeCodeFromFileType NSHFSTypeOfFile NSHashGet NSHashInsert NSHashInsertIfAbsent NSHashInsertKnownAbsent NSHashRemove NSHeight NSHighlightRect NSHomeDirectory NSHomeDirectoryForUser NSHostByteOrder NSIncrementExtraRefCount NSInsetRect NSIntegralRect NSInterfaceStyleForKey NSIntersectionRange NSIntersectionRect NSIntersectsRect NSIsControllerMarker NSIsEmptyRect NSIsFreedObject NSJavaBundleCleanup NSJavaBundleSetup NSJavaClassesForBundle NSJavaClassesFromPath NSJavaNeedsToLoadClasses NSJavaNeedsVirtualMachine NSJavaObjectNamedInPath NSJavaProvidesClasses NSJavaSetup NSJavaSetupVirtualMachine NSLocationInRange NSLog NSLogPageSize NSLogv NSMakeCollectable NSMakePoint NSMakeRange NSMakeRect NSMakeSize NSMapGet NSMapInsert NSMapInsertIfAbsent NSMapInsertKnownAbsent NSMapMember NSMapRemove NSMaxRange NSMaxX NSMaxY NSMidX NSMidY NSMinX NSMinY NSMouseInRect NSNextHashEnumeratorItem NSNextMapEnumeratorPair NSNumberOfColorComponents NSOffsetRect NSOpenStepRootDirectory NSPageSize NSPerformService NSPlanarFromDepth NSPointFromCGPoint NSPointFromString NSPointInRect NSPointToCGPoint NSProtocolFromString NSRangeFromString NSReadPixel NSRealMemoryAvailable NSReallocateCollectable NSRecordAllocationEvent NSRectClip NSRectClipList NSRectFill NSRectFillList NSRectFillListUsingOperation NSRectFillListWithColors NSRectFillListWithColorsUsingOperation NSRectFillListWithGrays NSRectFillUsingOperation NSRectFromCGRect NSRectFromString NSRectToCGRect NSRecycleZone NSRegisterServicesProvider NSReleaseAlertPanel NSResetHashTable NSResetMapTable NSReturnAddress NSRoundDownToMultipleOfPageSize NSRoundUpToMultipleOfPageSize NSRunAlertPanel NSRunAlertPanelRelativeToWindow NSRunCriticalAlertPanel NSRunCriticalAlertPanelRelativeToWindow NSRunInformationalAlertPanel NSRunInformationalAlertPanelRelativeToWindow NSSearchPathForDirectoriesInDomains NSSelectorFromString NSSetFocusRingStyle NSSetShowsServicesMenuItem NSSetUncaughtExceptionHandler NSSetZoneName NSShouldRetainWithZone NSShowAnimationEffect NSShowsServicesMenuItem NSSizeFromCGSize NSSizeFromString NSSizeToCGSize NSStringFromCGAffineTransform NSStringFromCGPoint NSStringFromCGRect NSStringFromCGSize NSStringFromClass NSStringFromHashTable NSStringFromMapTable NSStringFromPoint NSStringFromProtocol NSStringFromRange NSStringFromRect NSStringFromSelector NSStringFromSize NSStringFromUIEdgeInsets NSSwapBigDoubleToHost NSSwapBigFloatToHost NSSwapBigIntToHost NSSwapBigLongLongToHost NSSwapBigLongToHost NSSwapBigShortToHost NSSwapDouble NSSwapFloat NSSwapHostDoubleToBig NSSwapHostDoubleToLittle NSSwapHostFloatToBig NSSwapHostFloatToLittle NSSwapHostIntToBig NSSwapHostIntToLittle NSSwapHostLongLongToBig NSSwapHostLongLongToLittle NSSwapHostLongToBig NSSwapHostLongToLittle NSSwapHostShortToBig NSSwapHostShortToLittle NSSwapInt NSSwapLittleDoubleToHost NSSwapLittleFloatToHost NSSwapLittleIntToHost NSSwapLittleLongLongToHost NSSwapLittleLongToHost NSSwapLittleShortToHost NSSwapLong NSSwapLongLong NSSwapShort NSTemporaryDirectory NSUnionRange NSUnionRect NSUnregisterServicesProvider NSUpdateDynamicServices NSUserName NSValue NSWidth NSWindowList NSWindowListForContext NSZoneCalloc NSZoneFree NSZoneFromPointer NSZoneMalloc NSZoneName NSZoneRealloc UIAccessibilityPostNotification UIApplicationMain UIEdgeInsetsEqualToEdgeInsets UIEdgeInsetsFromString UIEdgeInsetsInsetRect UIEdgeInsetsMake UIGraphicsBeginImageContext UIGraphicsEndImageContext UIGraphicsGetCurrentContext UIGraphicsGetImageFromCurrentImageContext UIGraphicsPopContext UIGraphicsPushContext UIImageJPEGRepresentation UIImagePNGRepresentation UIImageWriteToSavedPhotosAlbum UIRectClip UIRectFill UIRectFillUsingBlendMode UIRectFrame UIRectFrameUsingBlendMode NSAssert NSAssert1 NSAssert2 NSAssert3 NSAssert4 NSAssert5 NSCAssert NSCAssert1 NSCAssert2 NSCAssert3 NSCAssert4 NSCAssert5 NSCParameterAssert NSDecimalMaxSize NSGlyphInfoAtIndex NSLocalizedString NSLocalizedStringFromTable NSLocalizedStringFromTableInBundle NSLocalizedStringWithDefaultValue NSParameterAssert NSURLResponseUnknownLength NS_VALUERETURN UIDeviceOrientationIsLandscape UIDeviceOrientationIsPortrait UIDeviceOrientationIsValidInterfaceOrientation UIInterfaceOrientationIsLandscape UIInterfaceOrientationIsPortrait - -" Cocoa Classes -syn keyword cocoaClass containedin=objcMessage NSATSTypesetter NSActionCell NSAffineTransform NSAlert NSAnimation NSAnimationContext NSAppleEventDescriptor NSAppleEventManager NSAppleScript NSApplication NSArchiver NSArray NSArrayController NSAssertionHandler NSAtomicStore NSAtomicStoreCacheNode NSAttributeDescription NSAttributedString NSAutoreleasePool NSBezierPath NSBitmapImageRep NSBox NSBrowser NSBrowserCell NSBundle NSButton NSButtonCell NSCIImageRep NSCachedImageRep NSCachedURLResponse NSCalendar NSCalendarDate NSCell NSCharacterSet NSClassDescription NSClipView NSCloneCommand NSCloseCommand NSCoder NSCollectionView NSCollectionViewItem NSColor NSColorList NSColorPanel NSColorPicker NSColorSpace NSColorWell NSComboBox NSComboBoxCell NSComparisonPredicate NSCompoundPredicate NSCondition NSConditionLock NSConnection NSConstantString NSControl NSController NSCountCommand NSCountedSet NSCreateCommand NSCursor NSCustomImageRep NSData NSDate NSDateComponents NSDateFormatter NSDatePicker NSDatePickerCell NSDecimalNumber NSDecimalNumberHandler NSDeleteCommand NSDictionary NSDictionaryController NSDirectoryEnumerator NSDistantObject NSDistantObjectRequest NSDistributedLock NSDistributedNotificationCenter NSDockTile NSDocument NSDocumentController NSDrawer NSEPSImageRep NSEntityDescription NSEntityMapping NSEntityMigrationPolicy NSEnumerator NSError NSEvent NSException NSExistsCommand NSExpression NSFetchRequest NSFetchRequestExpression NSFetchedPropertyDescription NSFileHandle NSFileManager NSFileWrapper NSFont NSFontDescriptor NSFontManager NSFontPanel NSFormCell NSFormatter NSGarbageCollector NSGetCommand NSGlyphGenerator NSGlyphInfo NSGradient NSGraphicsContext NSHTTPCookie NSHTTPCookieStorage NSHTTPURLResponse NSHashTable NSHelpManager NSHost NSImage NSImageCell NSImageRep NSImageView NSIndexPath NSIndexSet NSIndexSpecifier NSInputManager NSInputServer NSInputStream NSInvocation NSInvocationOperation NSKeyedArchiver NSKeyedUnarchiver NSLayoutManager NSLevelIndicator NSLevelIndicatorCell NSLocale NSLock NSLogicalTest NSMachBootstrapServer NSMachPort NSManagedObject NSManagedObjectContext NSManagedObjectID NSManagedObjectModel NSMapTable NSMappingModel NSMatrix NSMenu NSMenuItem NSMenuItemCell NSMenuView NSMessagePort NSMessagePortNameServer NSMetadataItem NSMetadataQuery NSMetadataQueryAttributeValueTuple NSMetadataQueryResultGroup NSMethodSignature NSMiddleSpecifier NSMigrationManager NSMoveCommand NSMovie NSMovieView NSMutableArray NSMutableAttributedString NSMutableCharacterSet NSMutableData NSMutableDictionary NSMutableIndexSet NSMutableParagraphStyle NSMutableSet NSMutableString NSMutableURLRequest NSNameSpecifier NSNetService NSNetServiceBrowser NSNib NSNibConnector NSNibControlConnector NSNibOutletConnector NSNotification NSNotificationCenter NSNotificationQueue NSNull NSNumber NSNumberFormatter NSObject NSObjectController NSOpenGLContext NSOpenGLPixelBuffer NSOpenGLPixelFormat NSOpenGLView NSOpenPanel NSOperation NSOperationQueue NSOutlineView NSOutputStream NSPDFImageRep NSPICTImageRep NSPageLayout NSPanel NSParagraphStyle NSPasteboard NSPathCell NSPathComponentCell NSPathControl NSPersistentDocument NSPersistentStore NSPersistentStoreCoordinator NSPipe NSPointerArray NSPointerFunctions NSPopUpButton NSPopUpButtonCell NSPort NSPortCoder NSPortMessage NSPortNameServer NSPositionalSpecifier NSPredicate NSPredicateEditor NSPredicateEditorRowTemplate NSPreferencePane NSPrintInfo NSPrintOperation NSPrintPanel NSPrinter NSProcessInfo NSProgressIndicator NSPropertyDescription NSPropertyListSerialization NSPropertyMapping NSPropertySpecifier NSProtocolChecker NSProxy NSQuickDrawView NSQuitCommand NSRandomSpecifier NSRangeSpecifier NSRecursiveLock NSRelationshipDescription NSRelativeSpecifier NSResponder NSRuleEditor NSRulerMarker NSRulerView NSRunLoop NSSavePanel NSScanner NSScreen NSScriptClassDescription NSScriptCoercionHandler NSScriptCommand NSScriptCommandDescription NSScriptExecutionContext NSScriptObjectSpecifier NSScriptSuiteRegistry NSScriptWhoseTest NSScrollView NSScroller NSSearchField NSSearchFieldCell NSSecureTextField NSSecureTextFieldCell NSSegmentedCell NSSegmentedControl NSSet NSSetCommand NSShadow NSSimpleCString NSSimpleHorizontalTypesetter NSSlider NSSliderCell NSSocketPort NSSocketPortNameServer NSSortDescriptor NSSound NSSpecifierTest NSSpeechRecognizer NSSpeechSynthesizer NSSpellChecker NSSpellServer NSSplitView NSStatusBar NSStatusItem NSStepper NSStepperCell NSStream NSString NSTabView NSTabViewItem NSTableColumn NSTableHeaderCell NSTableHeaderView NSTableView NSTask NSText NSTextAttachment NSTextAttachmentCell NSTextBlock NSTextContainer NSTextField NSTextFieldCell NSTextList NSTextStorage NSTextTab NSTextTable NSTextTableBlock NSTextView NSThread NSTimeZone NSTimer NSTokenField NSTokenFieldCell NSToolbar NSToolbarItem NSToolbarItemGroup NSTrackingArea NSTreeController NSTreeNode NSTypesetter NSURL NSURLAuthenticationChallenge NSURLCache NSURLConnection NSURLCredential NSURLCredentialStorage NSURLDownload NSURLHandle NSURLProtectionSpace NSURLProtocol NSURLRequest NSURLResponse NSUnarchiver NSUndoManager NSUniqueIDSpecifier NSUserDefaults NSUserDefaultsController NSValue NSValueTransformer NSView NSViewAnimation NSViewController NSWhoseSpecifier NSWindow NSWindowController NSWorkspace NSXMLDTD NSXMLDTDNode NSXMLDocument NSXMLElement NSXMLNode NSXMLParser UIAcceleration UIAccelerometer UIAccessibilityElement UIActionSheet UIActivityIndicatorView UIAlertView UIApplication UIBarButtonItem UIBarItem UIButton UIColor UIControl UIDatePicker UIDevice UIEvent UIFont UIImage UIImagePickerController UIImageView UILabel UILocalizedIndexedCollation UIMenuController UINavigationBar UINavigationController UINavigationItem UIPageControl UIPasteboard UIPickerView UIProgressView UIResponder UIScreen UIScrollView UISearchBar UISearchDisplayController UISegmentedControl UISlider UISwitch UITabBar UITabBarController UITabBarItem UITableView UITableViewCell UITableViewController UITextField UITextView UIToolbar UITouch UIView UIViewController UIWebView UIWindow - -" Cocoa Protocol Classes -syn keyword cocoaProtocol containedin=objcProtocol NSAnimatablePropertyContainer NSChangeSpelling NSCoding NSColorPickingCustom NSColorPickingDefault NSCopying NSDecimalNumberBehaviors NSDraggingInfo NSFastEnumeration NSGlyphStorage NSIgnoreMisspelledWords NSInputServerMouseTracker NSInputServiceProvider NSLocking NSMenuItem NSMutableCopying NSObject NSPathCellDelegate NSPathControlDelegate NSPersistentStoreCoordinatorSyncing NSPrintPanelAccessorizing NSTextAttachmentCell NSTextInput NSTextInputClient NSToolbarItemValidations NSURLAuthenticationChallengeSender NSURLDownloadDelegate NSURLHandleClient NSURLProtocolClient NSUserInterfaceValidations NSValidatedToobarItem NSValidatedUserInterfaceItem UIAccelerometerDelegate UIActionSheetDelegate UIAlertViewDelegate UIApplicationDelegate UIImagePickerControllerDelegate UINavigationBarDelegate UINavigationControllerDelegate UIPickerViewDataSource UIPickerViewDelegate UIScrollViewDelegate UISearchBarDelegate UISearchDisplayDelegate UITabBarControllerDelegate UITabBarDelegate UITableViewDataSource UITableViewDelegate UITextFieldDelegate UITextInputTraits UITextSelecting UITextViewDelegate UIWebViewDelegate - -" Cocoa Types -syn keyword cocoaType containedin=objcMessage CGFloat NSAlertStyle NSAnimationBlockingMode NSAnimationCurve NSAnimationEffect NSAnimationProgress NSAppleEventManagerSuspensionID NSApplicationDelegateReply NSApplicationPrintReply NSApplicationTerminateReply NSAttributeType NSBackgroundStyle NSBackingStoreType NSBezelStyle NSBezierPathElement NSBitmapFormat NSBitmapImageFileType NSBorderType NSBoxType NSBrowserColumnResizingType NSBrowserDropOperation NSButtonType NSCalculationError NSCalendarUnit NSCellAttribute NSCellImagePosition NSCellStateValue NSCellType NSCharacterCollection NSColorPanelMode NSColorRenderingIntent NSColorSpaceModel NSComparisonPredicateModifier NSComparisonResult NSCompositingOperation NSCompoundPredicateType NSControlSize NSControlTint NSDateFormatterBehavior NSDateFormatterStyle NSDatePickerElementFlags NSDatePickerMode NSDatePickerStyle NSDeleteRule NSDocumentChangeType NSDragOperation NSDrawerState NSEntityMappingType NSEventType NSExpressionType NSFetchRequestResultType NSFindPanelAction NSFindPanelSubstringMatchType NSFocusRingPlacement NSFocusRingType NSFontAction NSFontFamilyClass NSFontRenderingMode NSFontSymbolicTraits NSFontTraitMask NSGlyph NSGlyphInscription NSGlyphLayoutMode NSGlyphRelation NSGradientDrawingOptions NSGradientType NSHTTPCookieAcceptPolicy NSHashEnumerator NSHashTableOptions NSImageAlignment NSImageCacheMode NSImageFrameStyle NSImageInterpolation NSImageLoadStatus NSImageRepLoadStatus NSImageScaling NSInsertionPosition NSInteger NSInterfaceStyle NSKeyValueChange NSKeyValueObservingOptions NSKeyValueSetMutationKind NSLayoutDirection NSLayoutStatus NSLevelIndicatorStyle NSLineBreakMode NSLineCapStyle NSLineJoinStyle NSLineMovementDirection NSLineSweepDirection NSMapEnumerator NSMapTableOptions NSMatrixMode NSModalSession NSMultibyteGlyphPacking NSNetServiceOptions NSNetServicesError NSNotificationCoalescing NSNotificationSuspensionBehavior NSNumberFormatterBehavior NSNumberFormatterPadPosition NSNumberFormatterRoundingMode NSNumberFormatterStyle NSOpenGLContextAuxiliary NSOpenGLPixelFormatAttribute NSOpenGLPixelFormatAuxiliary NSOperationQueuePriority NSPathStyle NSPoint NSPointerFunctionsOptions NSPointingDeviceType NSPopUpArrowPosition NSPostingStyle NSPredicateOperatorType NSPrintPanelOptions NSPrinterTableStatus NSPrintingOrientation NSPrintingPageOrder NSPrintingPaginationMode NSProgressIndicatorStyle NSProgressIndicatorThickness NSProgressIndicatorThreadInfo NSPropertyListFormat NSPropertyListMutabilityOptions NSQTMovieLoopMode NSRange NSRect NSRectEdge NSRelativePosition NSRequestUserAttentionType NSRoundingMode NSRuleEditorNestingMode NSRuleEditorRowType NSRulerOrientation NSSaveOperationType NSSaveOptions NSScreenAuxiliaryOpaque NSScrollArrowPosition NSScrollerArrow NSScrollerPart NSSearchPathDirectory NSSearchPathDomainMask NSSegmentStyle NSSegmentSwitchTracking NSSelectionAffinity NSSelectionDirection NSSelectionGranularity NSSize NSSliderType NSSocketNativeHandle NSSpeechBoundary NSSplitViewDividerStyle NSStreamEvent NSStreamStatus NSStringCompareOptions NSStringDrawingOptions NSStringEncoding NSStringEncodingConversionOptions NSSwappedDouble NSSwappedFloat NSTIFFCompression NSTabState NSTabViewType NSTableViewColumnAutoresizingStyle NSTableViewDropOperation NSTableViewSelectionHighlightStyle NSTestComparisonOperation NSTextAlignment NSTextBlockDimension NSTextBlockLayer NSTextBlockValueType NSTextBlockVerticalAlignment NSTextFieldBezelStyle NSTextTabType NSTextTableLayoutAlgorithm NSThreadPrivate NSTickMarkPosition NSTimeInterval NSTimeZoneNameStyle NSTitlePosition NSTokenStyle NSToolTipTag NSToolbarDisplayMode NSToolbarSizeMode NSTrackingAreaOptions NSTrackingRectTag NSTypesetterBehavior NSTypesetterControlCharacterAction NSTypesetterGlyphInfo NSUInteger NSURLCacheStoragePolicy NSURLCredentialPersistence NSURLHandleStatus NSURLRequestCachePolicy NSUsableScrollerParts NSWhoseSubelementIdentifier NSWindingRule NSWindowBackingLocation NSWindowButton NSWindowCollectionBehavior NSWindowDepth NSWindowOrderingMode NSWindowSharingType NSWorkspaceIconCreationOptions NSWorkspaceLaunchOptions NSWritingDirection NSXMLDTDNodeKind NSXMLDocumentContentKind NSXMLNodeKind NSXMLParserError NSZone UIAccelerationValue UIAccessibilityNotifications UIAccessibilityTraits UIControlEvents UIControlState UIDataDetectorTypes UIEdgeInsets UIImagePickerControllerSourceType UITableViewCellStateMask UIViewAutoresizing UIWebViewNavigationType UIWindowLevel - -" Cocoa Constants -syn keyword cocoaConstant containedin=objcMessage NSASCIIStringEncoding NSAWTEventType NSAboveBottom NSAboveTop NSAddEntityMappingType NSAddTraitFontAction NSAdminApplicationDirectory NSAdobeCNS1CharacterCollection NSAdobeGB1CharacterCollection NSAdobeJapan1CharacterCollection NSAdobeJapan2CharacterCollection NSAdobeKorea1CharacterCollection NSAggregateExpressionType NSAlertAlternateReturn NSAlertDefaultReturn NSAlertErrorReturn NSAlertFirstButtonReturn NSAlertOtherReturn NSAlertSecondButtonReturn NSAlertThirdButtonReturn NSAllApplicationsDirectory NSAllDomainsMask NSAllLibrariesDirectory NSAllPredicateModifier NSAllScrollerParts NSAlphaFirstBitmapFormat NSAlphaNonpremultipliedBitmapFormat NSAlphaShiftKeyMask NSAlternateKeyMask NSAnchoredSearch NSAndPredicateType NSAnimationBlocking NSAnimationEaseIn NSAnimationEaseInOut NSAnimationEaseOut NSAnimationEffectDisappearingItemDefault NSAnimationEffectPoof NSAnimationLinear NSAnimationNonblocking NSAnimationNonblockingThreaded NSAnyEventMask NSAnyPredicateModifier NSAnyType NSAppKitDefined NSAppKitDefinedMask NSApplicationActivatedEventType NSApplicationDeactivatedEventType NSApplicationDefined NSApplicationDefinedMask NSApplicationDelegateReplyCancel NSApplicationDelegateReplyFailure NSApplicationDelegateReplySuccess NSApplicationDirectory NSApplicationSupportDirectory NSArgumentEvaluationScriptError NSArgumentsWrongScriptError NSAscendingPageOrder NSAsciiWithDoubleByteEUCGlyphPacking NSAtBottom NSAtTop NSAtomicWrite NSAttachmentCharacter NSAutoPagination NSAutosaveOperation NSBMPFileType NSBackTabCharacter NSBackgroundStyleDark NSBackgroundStyleLight NSBackgroundStyleLowered NSBackgroundStyleRaised NSBackgroundTab NSBackingStoreBuffered NSBackingStoreNonretained NSBackingStoreRetained NSBackspaceCharacter NSBacktabTextMovement NSBackwardsSearch NSBeginFunctionKey NSBeginsWithComparison NSBeginsWithPredicateOperatorType NSBelowBottom NSBelowTop NSBetweenPredicateOperatorType NSBevelLineJoinStyle NSBezelBorder NSBlueControlTint NSBoldFontMask NSBorderlessWindowMask NSBottomTabsBezelBorder NSBoxCustom NSBoxOldStyle NSBoxPrimary NSBoxSecondary NSBoxSeparator NSBreakFunctionKey NSBrowserAutoColumnResizing NSBrowserNoColumnResizing NSBrowserUserColumnResizing NSBundleExecutableArchitectureI386 NSBundleExecutableArchitecturePPC NSBundleExecutableArchitecturePPC64 NSBundleExecutableArchitectureX86_64 NSButtLineCapStyle NSCMYKColorSpaceModel NSCMYKModeColorPanel NSCachesDirectory NSCalculationDivideByZero NSCalculationLossOfPrecision NSCalculationNoError NSCalculationOverflow NSCalculationUnderflow NSCancelButton NSCancelTextMovement NSCannotCreateScriptCommandError NSCarriageReturnCharacter NSCaseInsensitivePredicateOption NSCaseInsensitiveSearch NSCellAllowsMixedState NSCellChangesContents NSCellDisabled NSCellEditable NSCellHasImageHorizontal NSCellHasImageOnLeftOrBottom NSCellHasOverlappingImage NSCellHighlighted NSCellHitContentArea NSCellHitEditableTextArea NSCellHitNone NSCellHitTrackableArea NSCellIsBordered NSCellIsInsetButton NSCellLightsByBackground NSCellLightsByContents NSCellLightsByGray NSCellState NSCenterTabStopType NSCenterTextAlignment NSChangeAutosaved NSChangeBackgroundCell NSChangeBackgroundCellMask NSChangeCleared NSChangeDone NSChangeGrayCell NSChangeGrayCellMask NSChangeReadOtherContents NSChangeRedone NSChangeUndone NSCircularBezelStyle NSCircularSlider NSClearControlTint NSClearDisplayFunctionKey NSClearLineFunctionKey NSClipPagination NSClockAndCalendarDatePickerStyle NSClosableWindowMask NSClosePathBezierPathElement NSCollectorDisabledOption NSColorListModeColorPanel NSColorPanelAllModesMask NSColorPanelCMYKModeMask NSColorPanelColorListModeMask NSColorPanelCrayonModeMask NSColorPanelCustomPaletteModeMask NSColorPanelGrayModeMask NSColorPanelHSBModeMask NSColorPanelRGBModeMask NSColorPanelWheelModeMask NSColorRenderingIntentAbsoluteColorimetric NSColorRenderingIntentDefault NSColorRenderingIntentPerceptual NSColorRenderingIntentRelativeColorimetric NSColorRenderingIntentSaturation NSCommandKeyMask NSCompositeClear NSCompositeCopy NSCompositeDestinationAtop NSCompositeDestinationIn NSCompositeDestinationOut NSCompositeDestinationOver NSCompositeHighlight NSCompositePlusDarker NSCompositePlusLighter NSCompositeSourceAtop NSCompositeSourceIn NSCompositeSourceOut NSCompositeSourceOver NSCompositeXOR NSCompressedFontMask NSCondensedFontMask NSConstantValueExpressionType NSContainerSpecifierError NSContainsComparison NSContainsPredicateOperatorType NSContentsCellMask NSContinuousCapacityLevelIndicatorStyle NSControlGlyph NSControlKeyMask NSCopyEntityMappingType NSCoreDataError NSCoreServiceDirectory NSCrayonModeColorPanel NSCriticalAlertStyle NSCriticalRequest NSCursorPointingDevice NSCursorUpdate NSCursorUpdateMask NSCurveToBezierPathElement NSCustomEntityMappingType NSCustomPaletteModeColorPanel NSCustomSelectorPredicateOperatorType NSDateFormatterBehavior10_0 NSDateFormatterBehavior10_4 NSDateFormatterBehaviorDefault NSDateFormatterFullStyle NSDateFormatterLongStyle NSDateFormatterMediumStyle NSDateFormatterNoStyle NSDateFormatterShortStyle NSDayCalendarUnit NSDecimalTabStopType NSDefaultControlTint NSDefaultTokenStyle NSDeleteCharFunctionKey NSDeleteCharacter NSDeleteFunctionKey NSDeleteLineFunctionKey NSDemoApplicationDirectory NSDescendingPageOrder NSDesktopDirectory NSDeveloperApplicationDirectory NSDeveloperDirectory NSDeviceIndependentModifierFlagsMask NSDeviceNColorSpaceModel NSDiacriticInsensitivePredicateOption NSDiacriticInsensitiveSearch NSDirectPredicateModifier NSDirectSelection NSDisclosureBezelStyle NSDiscreteCapacityLevelIndicatorStyle NSDisplayWindowRunLoopOrdering NSDocModalWindowMask NSDocumentDirectory NSDocumentationDirectory NSDoubleType NSDownArrowFunctionKey NSDownTextMovement NSDownloadsDirectory NSDragOperationAll_Obsolete NSDragOperationCopy NSDragOperationDelete NSDragOperationEvery NSDragOperationGeneric NSDragOperationLink NSDragOperationMove NSDragOperationNone NSDragOperationPrivate NSDrawerClosedState NSDrawerClosingState NSDrawerOpenState NSDrawerOpeningState NSEndFunctionKey NSEndsWithComparison NSEndsWithPredicateOperatorType NSEnterCharacter NSEntityMigrationPolicyError NSEqualToComparison NSEqualToPredicateOperatorType NSEraCalendarUnit NSEraDatePickerElementFlag NSEraserPointingDevice NSEvaluatedObjectExpressionType NSEvenOddWindingRule NSEverySubelement NSExclude10_4ElementsIconCreationOption NSExcludeQuickDrawElementsIconCreationOption NSExecutableArchitectureMismatchError NSExecutableErrorMaximum NSExecutableErrorMinimum NSExecutableLinkError NSExecutableLoadError NSExecutableNotLoadableError NSExecutableRuntimeMismatchError NSExecuteFunctionKey NSExpandedFontMask NSF10FunctionKey NSF11FunctionKey NSF12FunctionKey NSF13FunctionKey NSF14FunctionKey NSF15FunctionKey NSF16FunctionKey NSF17FunctionKey NSF18FunctionKey NSF19FunctionKey NSF1FunctionKey NSF20FunctionKey NSF21FunctionKey NSF22FunctionKey NSF23FunctionKey NSF24FunctionKey NSF25FunctionKey NSF26FunctionKey NSF27FunctionKey NSF28FunctionKey NSF29FunctionKey NSF2FunctionKey NSF30FunctionKey NSF31FunctionKey NSF32FunctionKey NSF33FunctionKey NSF34FunctionKey NSF35FunctionKey NSF3FunctionKey NSF4FunctionKey NSF5FunctionKey NSF6FunctionKey NSF7FunctionKey NSF8FunctionKey NSF9FunctionKey NSFPCurrentField NSFPPreviewButton NSFPPreviewField NSFPRevertButton NSFPSetButton NSFPSizeField NSFPSizeTitle NSFetchRequestExpressionType NSFileErrorMaximum NSFileErrorMinimum NSFileHandlingPanelCancelButton NSFileHandlingPanelOKButton NSFileLockingError NSFileNoSuchFileError NSFileReadCorruptFileError NSFileReadInapplicableStringEncodingError NSFileReadInvalidFileNameError NSFileReadNoPermissionError NSFileReadNoSuchFileError NSFileReadTooLargeError NSFileReadUnknownError NSFileReadUnknownStringEncodingError NSFileReadUnsupportedSchemeError NSFileWriteInapplicableStringEncodingError NSFileWriteInvalidFileNameError NSFileWriteNoPermissionError NSFileWriteOutOfSpaceError NSFileWriteUnknownError NSFileWriteUnsupportedSchemeError NSFindFunctionKey NSFindPanelActionNext NSFindPanelActionPrevious NSFindPanelActionReplace NSFindPanelActionReplaceAll NSFindPanelActionReplaceAllInSelection NSFindPanelActionReplaceAndFind NSFindPanelActionSelectAll NSFindPanelActionSelectAllInSelection NSFindPanelActionSetFindString NSFindPanelActionShowFindPanel NSFindPanelSubstringMatchTypeContains NSFindPanelSubstringMatchTypeEndsWith NSFindPanelSubstringMatchTypeFullWord NSFindPanelSubstringMatchTypeStartsWith NSFitPagination NSFixedPitchFontMask NSFlagsChanged NSFlagsChangedMask NSFloatType NSFloatingPointSamplesBitmapFormat NSFocusRingAbove NSFocusRingBelow NSFocusRingOnly NSFocusRingTypeDefault NSFocusRingTypeExterior NSFocusRingTypeNone NSFontAntialiasedIntegerAdvancementsRenderingMode NSFontAntialiasedRenderingMode NSFontBoldTrait NSFontClarendonSerifsClass NSFontCollectionApplicationOnlyMask NSFontCondensedTrait NSFontDefaultRenderingMode NSFontExpandedTrait NSFontFamilyClassMask NSFontFreeformSerifsClass NSFontIntegerAdvancementsRenderingMode NSFontItalicTrait NSFontModernSerifsClass NSFontMonoSpaceTrait NSFontOldStyleSerifsClass NSFontOrnamentalsClass NSFontPanelAllEffectsModeMask NSFontPanelAllModesMask NSFontPanelCollectionModeMask NSFontPanelDocumentColorEffectModeMask NSFontPanelFaceModeMask NSFontPanelShadowEffectModeMask NSFontPanelSizeModeMask NSFontPanelStandardModesMask NSFontPanelStrikethroughEffectModeMask NSFontPanelTextColorEffectModeMask NSFontPanelUnderlineEffectModeMask NSFontSansSerifClass NSFontScriptsClass NSFontSlabSerifsClass NSFontSymbolicClass NSFontTransitionalSerifsClass NSFontUIOptimizedTrait NSFontUnknownClass NSFontVerticalTrait NSForcedOrderingSearch NSFormFeedCharacter NSFormattingError NSFormattingErrorMaximum NSFormattingErrorMinimum NSFourByteGlyphPacking NSFunctionExpressionType NSFunctionKeyMask NSGIFFileType NSGlyphAbove NSGlyphAttributeBidiLevel NSGlyphAttributeElastic NSGlyphAttributeInscribe NSGlyphAttributeSoft NSGlyphBelow NSGlyphInscribeAbove NSGlyphInscribeBase NSGlyphInscribeBelow NSGlyphInscribeOverBelow NSGlyphInscribeOverstrike NSGlyphLayoutAgainstAPoint NSGlyphLayoutAtAPoint NSGlyphLayoutWithPrevious NSGradientConcaveStrong NSGradientConcaveWeak NSGradientConvexStrong NSGradientConvexWeak NSGradientDrawsAfterEndingLocation NSGradientDrawsBeforeStartingLocation NSGradientNone NSGraphiteControlTint NSGrayColorSpaceModel NSGrayModeColorPanel NSGreaterThanComparison NSGreaterThanOrEqualToComparison NSGreaterThanOrEqualToPredicateOperatorType NSGreaterThanPredicateOperatorType NSGrooveBorder NSHPUXOperatingSystem NSHSBModeColorPanel NSHTTPCookieAcceptPolicyAlways NSHTTPCookieAcceptPolicyNever NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain NSHUDWindowMask NSHashTableCopyIn NSHashTableObjectPointerPersonality NSHashTableStrongMemory NSHashTableZeroingWeakMemory NSHeavierFontAction NSHelpButtonBezelStyle NSHelpFunctionKey NSHelpKeyMask NSHighlightModeMatrix NSHomeFunctionKey NSHorizontalRuler NSHourCalendarUnit NSHourMinuteDatePickerElementFlag NSHourMinuteSecondDatePickerElementFlag NSISO2022JPStringEncoding NSISOLatin1StringEncoding NSISOLatin2StringEncoding NSIdentityMappingCharacterCollection NSIllegalTextMovement NSImageAbove NSImageAlignBottom NSImageAlignBottomLeft NSImageAlignBottomRight NSImageAlignCenter NSImageAlignLeft NSImageAlignRight NSImageAlignTop NSImageAlignTopLeft NSImageAlignTopRight NSImageBelow NSImageCacheAlways NSImageCacheBySize NSImageCacheDefault NSImageCacheNever NSImageCellType NSImageFrameButton NSImageFrameGrayBezel NSImageFrameGroove NSImageFrameNone NSImageFramePhoto NSImageInterpolationDefault NSImageInterpolationHigh NSImageInterpolationLow NSImageInterpolationNone NSImageLeft NSImageLoadStatusCancelled NSImageLoadStatusCompleted NSImageLoadStatusInvalidData NSImageLoadStatusReadError NSImageLoadStatusUnexpectedEOF NSImageOnly NSImageOverlaps NSImageRepLoadStatusCompleted NSImageRepLoadStatusInvalidData NSImageRepLoadStatusReadingHeader NSImageRepLoadStatusUnexpectedEOF NSImageRepLoadStatusUnknownType NSImageRepLoadStatusWillNeedAllData NSImageRepMatchesDevice NSImageRight NSImageScaleAxesIndependently NSImageScaleNone NSImageScaleProportionallyDown NSImageScaleProportionallyUpOrDown NSInPredicateOperatorType NSIndexSubelement NSIndexedColorSpaceModel NSInformationalAlertStyle NSInformationalRequest NSInsertCharFunctionKey NSInsertFunctionKey NSInsertLineFunctionKey NSIntType NSInternalScriptError NSInternalSpecifierError NSIntersectSetExpressionType NSInvalidIndexSpecifierError NSItalicFontMask NSJPEG2000FileType NSJPEGFileType NSJapaneseEUCGlyphPacking NSJapaneseEUCStringEncoding NSJustifiedTextAlignment NSKeyDown NSKeyDownMask NSKeyPathExpressionType NSKeySpecifierEvaluationScriptError NSKeyUp NSKeyUpMask NSKeyValueChangeInsertion NSKeyValueChangeRemoval NSKeyValueChangeReplacement NSKeyValueChangeSetting NSKeyValueIntersectSetMutation NSKeyValueMinusSetMutation NSKeyValueObservingOptionInitial NSKeyValueObservingOptionNew NSKeyValueObservingOptionOld NSKeyValueObservingOptionPrior NSKeyValueSetSetMutation NSKeyValueUnionSetMutation NSKeyValueValidationError NSLABColorSpaceModel NSLandscapeOrientation NSLayoutCantFit NSLayoutDone NSLayoutLeftToRight NSLayoutNotDone NSLayoutOutOfGlyphs NSLayoutRightToLeft NSLeftArrowFunctionKey NSLeftMouseDown NSLeftMouseDownMask NSLeftMouseDragged NSLeftMouseDraggedMask NSLeftMouseUp NSLeftMouseUpMask NSLeftTabStopType NSLeftTabsBezelBorder NSLeftTextAlignment NSLeftTextMovement NSLessThanComparison NSLessThanOrEqualToComparison NSLessThanOrEqualToPredicateOperatorType NSLessThanPredicateOperatorType NSLibraryDirectory NSLighterFontAction NSLikePredicateOperatorType NSLineBorder NSLineBreakByCharWrapping NSLineBreakByClipping NSLineBreakByTruncatingHead NSLineBreakByTruncatingMiddle NSLineBreakByTruncatingTail NSLineBreakByWordWrapping NSLineDoesntMove NSLineMovesDown NSLineMovesLeft NSLineMovesRight NSLineMovesUp NSLineSeparatorCharacter NSLineSweepDown NSLineSweepLeft NSLineSweepRight NSLineSweepUp NSLineToBezierPathElement NSLinearSlider NSListModeMatrix NSLiteralSearch NSLocalDomainMask NSMACHOperatingSystem NSMacOSRomanStringEncoding NSMachPortDeallocateNone NSMachPortDeallocateReceiveRight NSMachPortDeallocateSendRight NSMacintoshInterfaceStyle NSManagedObjectContextLockingError NSManagedObjectExternalRelationshipError NSManagedObjectIDResultType NSManagedObjectMergeError NSManagedObjectReferentialIntegrityError NSManagedObjectResultType NSManagedObjectValidationError NSMapTableCopyIn NSMapTableObjectPointerPersonality NSMapTableStrongMemory NSMapTableZeroingWeakMemory NSMappedRead NSMatchesPredicateOperatorType NSMaxXEdge NSMaxYEdge NSMenuFunctionKey NSMiddleSubelement NSMigrationCancelledError NSMigrationError NSMigrationManagerDestinationStoreError NSMigrationManagerSourceStoreError NSMigrationMissingMappingModelError NSMigrationMissingSourceModelError NSMinXEdge NSMinYEdge NSMiniaturizableWindowMask NSMinusSetExpressionType NSMinuteCalendarUnit NSMiterLineJoinStyle NSMixedState NSModeSwitchFunctionKey NSMomentaryChangeButton NSMomentaryLight NSMomentaryLightButton NSMomentaryPushButton NSMomentaryPushInButton NSMonthCalendarUnit NSMouseEntered NSMouseEnteredMask NSMouseEventSubtype NSMouseExited NSMouseExitedMask NSMouseMoved NSMouseMovedMask NSMoveToBezierPathElement NSNEXTSTEPStringEncoding NSNarrowFontMask NSNativeShortGlyphPacking NSNaturalTextAlignment NSNetServiceNoAutoRename NSNetServicesActivityInProgress NSNetServicesBadArgumentError NSNetServicesCancelledError NSNetServicesCollisionError NSNetServicesInvalidError NSNetServicesNotFoundError NSNetServicesTimeoutError NSNetServicesUnknownError NSNetworkDomainMask NSNewlineCharacter NSNextFunctionKey NSNextStepInterfaceStyle NSNoBorder NSNoCellMask NSNoFontChangeAction NSNoImage NSNoInterfaceStyle NSNoModeColorPanel NSNoScriptError NSNoScrollerParts NSNoSpecifierError NSNoSubelement NSNoTabsBezelBorder NSNoTabsLineBorder NSNoTabsNoBorder NSNoTitle NSNoTopLevelContainersSpecifierError NSNoUnderlineStyle NSNonLossyASCIIStringEncoding NSNonStandardCharacterSetFontMask NSNonZeroWindingRule NSNonactivatingPanelMask NSNotEqualToPredicateOperatorType NSNotPredicateType NSNotificationCoalescingOnName NSNotificationCoalescingOnSender NSNotificationDeliverImmediately NSNotificationNoCoalescing NSNotificationPostToAllSessions NSNotificationSuspensionBehaviorCoalesce NSNotificationSuspensionBehaviorDeliverImmediately NSNotificationSuspensionBehaviorDrop NSNotificationSuspensionBehaviorHold NSNullCellType NSNullGlyph NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_4 NSNumberFormatterBehaviorDefault NSNumberFormatterCurrencyStyle NSNumberFormatterDecimalStyle NSNumberFormatterNoStyle NSNumberFormatterPadAfterPrefix NSNumberFormatterPadAfterSuffix NSNumberFormatterPadBeforePrefix NSNumberFormatterPadBeforeSuffix NSNumberFormatterPercentStyle NSNumberFormatterRoundCeiling NSNumberFormatterRoundDown NSNumberFormatterRoundFloor NSNumberFormatterRoundHalfDown NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfUp NSNumberFormatterRoundUp NSNumberFormatterScientificStyle NSNumberFormatterSpellOutStyle NSNumericPadKeyMask NSNumericSearch NSOKButton NSOSF1OperatingSystem NSObjCArrayType NSObjCBitfield NSObjCBoolType NSObjCCharType NSObjCDoubleType NSObjCFloatType NSObjCLongType NSObjCLonglongType NSObjCNoType NSObjCObjectType NSObjCPointerType NSObjCSelectorType NSObjCShortType NSObjCStringType NSObjCStructType NSObjCUnionType NSObjCVoidType NSOffState NSOnOffButton NSOnState NSOneByteGlyphPacking NSOnlyScrollerArrows NSOpenGLGOClearFormatCache NSOpenGLGOFormatCacheSize NSOpenGLGOResetLibrary NSOpenGLGORetainRenderers NSOpenGLPFAAccelerated NSOpenGLPFAAccumSize NSOpenGLPFAAllRenderers NSOpenGLPFAAllowOfflineRenderers NSOpenGLPFAAlphaSize NSOpenGLPFAAuxBuffers NSOpenGLPFAAuxDepthStencil NSOpenGLPFABackingStore NSOpenGLPFAClosestPolicy NSOpenGLPFAColorFloat NSOpenGLPFAColorSize NSOpenGLPFACompliant NSOpenGLPFADepthSize NSOpenGLPFADoubleBuffer NSOpenGLPFAFullScreen NSOpenGLPFAMPSafe NSOpenGLPFAMaximumPolicy NSOpenGLPFAMinimumPolicy NSOpenGLPFAMultiScreen NSOpenGLPFAMultisample NSOpenGLPFANoRecovery NSOpenGLPFAOffScreen NSOpenGLPFAPixelBuffer NSOpenGLPFARendererID NSOpenGLPFARobust NSOpenGLPFASampleAlpha NSOpenGLPFASampleBuffers NSOpenGLPFASamples NSOpenGLPFAScreenMask NSOpenGLPFASingleRenderer NSOpenGLPFAStencilSize NSOpenGLPFAStereo NSOpenGLPFASupersample NSOpenGLPFAVirtualScreenCount NSOpenGLPFAWindow NSOpenStepUnicodeReservedBase NSOperationNotSupportedForKeyScriptError NSOperationNotSupportedForKeySpecifierError NSOperationQueueDefaultMaxConcurrentOperationCount NSOperationQueuePriorityHigh NSOperationQueuePriorityLow NSOperationQueuePriorityNormal NSOperationQueuePriorityVeryHigh NSOperationQueuePriorityVeryLow NSOrPredicateType NSOtherMouseDown NSOtherMouseDownMask NSOtherMouseDragged NSOtherMouseDraggedMask NSOtherMouseUp NSOtherMouseUpMask NSOtherTextMovement NSPNGFileType NSPageDownFunctionKey NSPageUpFunctionKey NSParagraphSeparatorCharacter NSPathStyleNavigationBar NSPathStylePopUp NSPathStyleStandard NSPatternColorSpaceModel NSPauseFunctionKey NSPenLowerSideMask NSPenPointingDevice NSPenTipMask NSPenUpperSideMask NSPeriodic NSPeriodicMask NSPersistentStoreCoordinatorLockingError NSPersistentStoreIncompatibleSchemaError NSPersistentStoreIncompatibleVersionHashError NSPersistentStoreIncompleteSaveError NSPersistentStoreInvalidTypeError NSPersistentStoreOpenError NSPersistentStoreOperationError NSPersistentStoreSaveError NSPersistentStoreTimeoutError NSPersistentStoreTypeMismatchError NSPlainTextTokenStyle NSPointerFunctionsCStringPersonality NSPointerFunctionsCopyIn NSPointerFunctionsIntegerPersonality NSPointerFunctionsMachVirtualMemory NSPointerFunctionsMallocMemory NSPointerFunctionsObjectPersonality NSPointerFunctionsObjectPointerPersonality NSPointerFunctionsOpaqueMemory NSPointerFunctionsOpaquePersonality NSPointerFunctionsStrongMemory NSPointerFunctionsStructPersonality NSPointerFunctionsZeroingWeakMemory NSPopUpArrowAtBottom NSPopUpArrowAtCenter NSPopUpNoArrow NSPortraitOrientation NSPositionAfter NSPositionBefore NSPositionBeginning NSPositionEnd NSPositionReplace NSPositiveDoubleType NSPositiveFloatType NSPositiveIntType NSPostASAP NSPostNow NSPostWhenIdle NSPosterFontMask NSPowerOffEventType NSPressedTab NSPrevFunctionKey NSPrintFunctionKey NSPrintPanelShowsCopies NSPrintPanelShowsOrientation NSPrintPanelShowsPageRange NSPrintPanelShowsPageSetupAccessory NSPrintPanelShowsPaperSize NSPrintPanelShowsPreview NSPrintPanelShowsScaling NSPrintScreenFunctionKey NSPrinterTableError NSPrinterTableNotFound NSPrinterTableOK NSPrintingCancelled NSPrintingFailure NSPrintingReplyLater NSPrintingSuccess NSProgressIndicatorBarStyle NSProgressIndicatorPreferredAquaThickness NSProgressIndicatorPreferredLargeThickness NSProgressIndicatorPreferredSmallThickness NSProgressIndicatorPreferredThickness NSProgressIndicatorSpinningStyle NSPropertyListBinaryFormat_v1_0 NSPropertyListImmutable NSPropertyListMutableContainers NSPropertyListMutableContainersAndLeaves NSPropertyListOpenStepFormat NSPropertyListXMLFormat_v1_0 NSProprietaryStringEncoding NSPushInCell NSPushInCellMask NSPushOnPushOffButton NSQTMovieLoopingBackAndForthPlayback NSQTMovieLoopingPlayback NSQTMovieNormalPlayback NSRGBColorSpaceModel NSRGBModeColorPanel NSRadioButton NSRadioModeMatrix NSRandomSubelement NSRangeDateMode NSRatingLevelIndicatorStyle NSReceiverEvaluationScriptError NSReceiversCantHandleCommandScriptError NSRecessedBezelStyle NSRedoFunctionKey NSRegularControlSize NSRegularSquareBezelStyle NSRelativeAfter NSRelativeBefore NSRelevancyLevelIndicatorStyle NSRemoveEntityMappingType NSRemoveTraitFontAction NSRequiredArgumentsMissingScriptError NSResetCursorRectsRunLoopOrdering NSResetFunctionKey NSResizableWindowMask NSReturnTextMovement NSRightArrowFunctionKey NSRightMouseDown NSRightMouseDownMask NSRightMouseDragged NSRightMouseDraggedMask NSRightMouseUp NSRightMouseUpMask NSRightTabStopType NSRightTabsBezelBorder NSRightTextAlignment NSRightTextMovement NSRoundBankers NSRoundDown NSRoundLineCapStyle NSRoundLineJoinStyle NSRoundPlain NSRoundRectBezelStyle NSRoundUp NSRoundedBezelStyle NSRoundedDisclosureBezelStyle NSRoundedTokenStyle NSRuleEditorNestingModeCompound NSRuleEditorNestingModeList NSRuleEditorNestingModeSimple NSRuleEditorNestingModeSingle NSRuleEditorRowTypeCompound NSRuleEditorRowTypeSimple NSRunAbortedResponse NSRunContinuesResponse NSRunStoppedResponse NSSQLiteError NSSaveAsOperation NSSaveOperation NSSaveOptionsAsk NSSaveOptionsNo NSSaveOptionsYes NSSaveToOperation NSScaleNone NSScaleProportionally NSScaleToFit NSScannedOption NSScreenChangedEventType NSScrollLockFunctionKey NSScrollWheel NSScrollWheelMask NSScrollerArrowsDefaultSetting NSScrollerArrowsMaxEnd NSScrollerArrowsMinEnd NSScrollerArrowsNone NSScrollerDecrementArrow NSScrollerDecrementLine NSScrollerDecrementPage NSScrollerIncrementArrow NSScrollerIncrementLine NSScrollerIncrementPage NSScrollerKnob NSScrollerKnobSlot NSScrollerNoPart NSSecondCalendarUnit NSSegmentStyleAutomatic NSSegmentStyleCapsule NSSegmentStyleRoundRect NSSegmentStyleRounded NSSegmentStyleSmallSquare NSSegmentStyleTexturedRounded NSSegmentStyleTexturedSquare NSSegmentSwitchTrackingMomentary NSSegmentSwitchTrackingSelectAny NSSegmentSwitchTrackingSelectOne NSSelectByCharacter NSSelectByParagraph NSSelectByWord NSSelectFunctionKey NSSelectedTab NSSelectingNext NSSelectingPrevious NSSelectionAffinityDownstream NSSelectionAffinityUpstream NSServiceApplicationLaunchFailedError NSServiceApplicationNotFoundError NSServiceErrorMaximum NSServiceErrorMinimum NSServiceInvalidPasteboardDataError NSServiceMalformedServiceDictionaryError NSServiceMiscellaneousError NSServiceRequestTimedOutError NSShadowlessSquareBezelStyle NSShiftJISStringEncoding NSShiftKeyMask NSShowControlGlyphs NSShowInvisibleGlyphs NSSingleDateMode NSSingleUnderlineStyle NSSizeDownFontAction NSSizeUpFontAction NSSmallCapsFontMask NSSmallControlSize NSSmallIconButtonBezelStyle NSSmallSquareBezelStyle NSSolarisOperatingSystem NSSpecialPageOrder NSSpeechImmediateBoundary NSSpeechSentenceBoundary NSSpeechWordBoundary NSSpellingStateGrammarFlag NSSpellingStateSpellingFlag NSSplitViewDividerStyleThick NSSplitViewDividerStyleThin NSSquareLineCapStyle NSStopFunctionKey NSStreamEventEndEncountered NSStreamEventErrorOccurred NSStreamEventHasBytesAvailable NSStreamEventHasSpaceAvailable NSStreamEventNone NSStreamEventOpenCompleted NSStreamStatusAtEnd NSStreamStatusClosed NSStreamStatusError NSStreamStatusNotOpen NSStreamStatusOpen NSStreamStatusOpening NSStreamStatusReading NSStreamStatusWriting NSStringDrawingDisableScreenFontSubstitution NSStringDrawingOneShot NSStringDrawingTruncatesLastVisibleLine NSStringDrawingUsesDeviceMetrics NSStringDrawingUsesFontLeading NSStringDrawingUsesLineFragmentOrigin NSStringEncodingConversionAllowLossy NSStringEncodingConversionExternalRepresentation NSSubqueryExpressionType NSSunOSOperatingSystem NSSwitchButton NSSymbolStringEncoding NSSysReqFunctionKey NSSystemDefined NSSystemDefinedMask NSSystemDomainMask NSSystemFunctionKey NSTIFFCompressionCCITTFAX3 NSTIFFCompressionCCITTFAX4 NSTIFFCompressionJPEG NSTIFFCompressionLZW NSTIFFCompressionNEXT NSTIFFCompressionNone NSTIFFCompressionOldJPEG NSTIFFCompressionPackBits NSTIFFFileType NSTabCharacter NSTabTextMovement NSTableColumnAutoresizingMask NSTableColumnNoResizing NSTableColumnUserResizingMask NSTableViewFirstColumnOnlyAutoresizingStyle NSTableViewGridNone NSTableViewLastColumnOnlyAutoresizingStyle NSTableViewNoColumnAutoresizing NSTableViewReverseSequentialColumnAutoresizingStyle NSTableViewSelectionHighlightStyleRegular NSTableViewSelectionHighlightStyleSourceList NSTableViewSequentialColumnAutoresizingStyle NSTableViewSolidHorizontalGridLineMask NSTableViewSolidVerticalGridLineMask NSTableViewUniformColumnAutoresizingStyle NSTabletPoint NSTabletPointEventSubtype NSTabletPointMask NSTabletProximity NSTabletProximityEventSubtype NSTabletProximityMask NSTerminateCancel NSTerminateLater NSTerminateNow NSTextBlockAbsoluteValueType NSTextBlockBaselineAlignment NSTextBlockBorder NSTextBlockBottomAlignment NSTextBlockHeight NSTextBlockMargin NSTextBlockMaximumHeight NSTextBlockMaximumWidth NSTextBlockMiddleAlignment NSTextBlockMinimumHeight NSTextBlockMinimumWidth NSTextBlockPadding NSTextBlockPercentageValueType NSTextBlockTopAlignment NSTextBlockWidth NSTextCellType NSTextFieldAndStepperDatePickerStyle NSTextFieldDatePickerStyle NSTextFieldRoundedBezel NSTextFieldSquareBezel NSTextListPrependEnclosingMarker NSTextReadInapplicableDocumentTypeError NSTextReadWriteErrorMaximum NSTextReadWriteErrorMinimum NSTextStorageEditedAttributes NSTextStorageEditedCharacters NSTextTableAutomaticLayoutAlgorithm NSTextTableFixedLayoutAlgorithm NSTextWriteInapplicableDocumentTypeError NSTexturedBackgroundWindowMask NSTexturedRoundedBezelStyle NSTexturedSquareBezelStyle NSThickSquareBezelStyle NSThickerSquareBezelStyle NSTickMarkAbove NSTickMarkBelow NSTickMarkLeft NSTickMarkRight NSTimeZoneDatePickerElementFlag NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleStandard NSTitledWindowMask NSToggleButton NSToolbarItemVisibilityPriorityHigh NSToolbarItemVisibilityPriorityLow NSToolbarItemVisibilityPriorityStandard NSToolbarItemVisibilityPriorityUser NSTopTabsBezelBorder NSTrackModeMatrix NSTrackingActiveAlways NSTrackingActiveInActiveApp NSTrackingActiveInKeyWindow NSTrackingActiveWhenFirstResponder NSTrackingAssumeInside NSTrackingCursorUpdate NSTrackingEnabledDuringMouseDrag NSTrackingInVisibleRect NSTrackingMouseEnteredAndExited NSTrackingMouseMoved NSTransformEntityMappingType NSTwoByteGlyphPacking NSTypesetterBehavior_10_2 NSTypesetterBehavior_10_2_WithCompatibility NSTypesetterBehavior_10_3 NSTypesetterBehavior_10_4 NSTypesetterContainerBreakAction NSTypesetterHorizontalTabAction NSTypesetterLatestBehavior NSTypesetterLineBreakAction NSTypesetterOriginalBehavior NSTypesetterParagraphBreakAction NSTypesetterWhitespaceAction NSTypesetterZeroAdvancementAction NSURLCredentialPersistenceForSession NSURLCredentialPersistenceNone NSURLCredentialPersistencePermanent NSURLHandleLoadFailed NSURLHandleLoadInProgress NSURLHandleLoadSucceeded NSURLHandleNotLoaded NSUTF16BigEndianStringEncoding NSUTF16LittleEndianStringEncoding NSUTF16StringEncoding NSUTF32BigEndianStringEncoding NSUTF32LittleEndianStringEncoding NSUTF32StringEncoding NSUTF8StringEncoding NSUnboldFontMask NSUncachedRead NSUndefinedDateComponent NSUndefinedEntityMappingType NSUnderlinePatternDash NSUnderlinePatternDashDot NSUnderlinePatternDashDotDot NSUnderlinePatternDot NSUnderlinePatternSolid NSUnderlineStyleDouble NSUnderlineStyleNone NSUnderlineStyleSingle NSUnderlineStyleThick NSUndoCloseGroupingRunLoopOrdering NSUndoFunctionKey NSUnicodeStringEncoding NSUnifiedTitleAndToolbarWindowMask NSUnionSetExpressionType NSUnitalicFontMask NSUnknownColorSpaceModel NSUnknownKeyScriptError NSUnknownKeySpecifierError NSUnknownPageOrder NSUnknownPointingDevice NSUnscaledWindowMask NSUpArrowFunctionKey NSUpTextMovement NSUpdateWindowsRunLoopOrdering NSUserCancelledError NSUserDirectory NSUserDomainMask NSUserFunctionKey NSUtilityWindowMask NSValidationDateTooLateError NSValidationDateTooSoonError NSValidationErrorMaximum NSValidationErrorMinimum NSValidationInvalidDateError NSValidationMissingMandatoryPropertyError NSValidationMultipleErrorsError NSValidationNumberTooLargeError NSValidationNumberTooSmallError NSValidationRelationshipDeniedDeleteError NSValidationRelationshipExceedsMaximumCountError NSValidationRelationshipLacksMinimumCountError NSValidationStringPatternMatchingError NSValidationStringTooLongError NSValidationStringTooShortError NSVariableExpressionType NSVerticalRuler NSViaPanelFontAction NSViewHeightSizable NSViewMaxXMargin NSViewMaxYMargin NSViewMinXMargin NSViewMinYMargin NSViewNotSizable NSViewWidthSizable NSWantsBidiLevels NSWarningAlertStyle NSWeekCalendarUnit NSWeekdayCalendarUnit NSWeekdayOrdinalCalendarUnit NSWheelModeColorPanel NSWidthInsensitiveSearch NSWindowAbove NSWindowBackingLocationDefault NSWindowBackingLocationMainMemory NSWindowBackingLocationVideoMemory NSWindowBelow NSWindowCloseButton NSWindowCollectionBehaviorCanJoinAllSpaces NSWindowCollectionBehaviorDefault NSWindowCollectionBehaviorMoveToActiveSpace NSWindowDocumentIconButton NSWindowExposedEventType NSWindowMiniaturizeButton NSWindowMovedEventType NSWindowOut NSWindowSharingNone NSWindowSharingReadOnly NSWindowSharingReadWrite NSWindowToolbarButton NSWindowZoomButton NSWindows95InterfaceStyle NSWindows95OperatingSystem NSWindowsCP1250StringEncoding NSWindowsCP1251StringEncoding NSWindowsCP1252StringEncoding NSWindowsCP1253StringEncoding NSWindowsCP1254StringEncoding NSWindowsNTOperatingSystem NSWorkspaceLaunchAllowingClassicStartup NSWorkspaceLaunchAndHide NSWorkspaceLaunchAndHideOthers NSWorkspaceLaunchAndPrint NSWorkspaceLaunchAsync NSWorkspaceLaunchDefault NSWorkspaceLaunchInhibitingBackgroundOnly NSWorkspaceLaunchNewInstance NSWorkspaceLaunchPreferringClassic NSWorkspaceLaunchWithoutActivation NSWorkspaceLaunchWithoutAddingToRecents NSWrapCalendarComponents NSWritingDirectionLeftToRight NSWritingDirectionNatural NSWritingDirectionRightToLeft NSXMLAttributeCDATAKind NSXMLAttributeDeclarationKind NSXMLAttributeEntitiesKind NSXMLAttributeEntityKind NSXMLAttributeEnumerationKind NSXMLAttributeIDKind NSXMLAttributeIDRefKind NSXMLAttributeIDRefsKind NSXMLAttributeKind NSXMLAttributeNMTokenKind NSXMLAttributeNMTokensKind NSXMLAttributeNotationKind NSXMLCommentKind NSXMLDTDKind NSXMLDocumentHTMLKind NSXMLDocumentIncludeContentTypeDeclaration NSXMLDocumentKind NSXMLDocumentTextKind NSXMLDocumentTidyHTML NSXMLDocumentTidyXML NSXMLDocumentValidate NSXMLDocumentXHTMLKind NSXMLDocumentXInclude NSXMLDocumentXMLKind NSXMLElementDeclarationAnyKind NSXMLElementDeclarationElementKind NSXMLElementDeclarationEmptyKind NSXMLElementDeclarationKind NSXMLElementDeclarationMixedKind NSXMLElementDeclarationUndefinedKind NSXMLElementKind NSXMLEntityDeclarationKind NSXMLEntityGeneralKind NSXMLEntityParameterKind NSXMLEntityParsedKind NSXMLEntityPredefined NSXMLEntityUnparsedKind NSXMLInvalidKind NSXMLNamespaceKind NSXMLNodeCompactEmptyElement NSXMLNodeExpandEmptyElement NSXMLNodeIsCDATA NSXMLNodeOptionsNone NSXMLNodePreserveAll NSXMLNodePreserveAttributeOrder NSXMLNodePreserveCDATA NSXMLNodePreserveCharacterReferences NSXMLNodePreserveDTD NSXMLNodePreserveEmptyElements NSXMLNodePreserveEntities NSXMLNodePreserveNamespaceOrder NSXMLNodePreservePrefixes NSXMLNodePreserveQuotes NSXMLNodePreserveWhitespace NSXMLNodePrettyPrint NSXMLNodeUseDoubleQuotes NSXMLNodeUseSingleQuotes NSXMLNotationDeclarationKind NSXMLParserAttributeHasNoValueError NSXMLParserAttributeListNotFinishedError NSXMLParserAttributeListNotStartedError NSXMLParserAttributeNotFinishedError NSXMLParserAttributeNotStartedError NSXMLParserAttributeRedefinedError NSXMLParserCDATANotFinishedError NSXMLParserCharacterRefAtEOFError NSXMLParserCharacterRefInDTDError NSXMLParserCharacterRefInEpilogError NSXMLParserCharacterRefInPrologError NSXMLParserCommentContainsDoubleHyphenError NSXMLParserCommentNotFinishedError NSXMLParserConditionalSectionNotFinishedError NSXMLParserConditionalSectionNotStartedError NSXMLParserDOCTYPEDeclNotFinishedError NSXMLParserDelegateAbortedParseError NSXMLParserDocumentStartError NSXMLParserElementContentDeclNotFinishedError NSXMLParserElementContentDeclNotStartedError NSXMLParserEmptyDocumentError NSXMLParserEncodingNotSupportedError NSXMLParserEntityBoundaryError NSXMLParserEntityIsExternalError NSXMLParserEntityIsParameterError NSXMLParserEntityNotFinishedError NSXMLParserEntityNotStartedError NSXMLParserEntityRefAtEOFError NSXMLParserEntityRefInDTDError NSXMLParserEntityRefInEpilogError NSXMLParserEntityRefInPrologError NSXMLParserEntityRefLoopError NSXMLParserEntityReferenceMissingSemiError NSXMLParserEntityReferenceWithoutNameError NSXMLParserEntityValueRequiredError NSXMLParserEqualExpectedError NSXMLParserExternalStandaloneEntityError NSXMLParserExternalSubsetNotFinishedError NSXMLParserExtraContentError NSXMLParserGTRequiredError NSXMLParserInternalError NSXMLParserInvalidCharacterError NSXMLParserInvalidCharacterInEntityError NSXMLParserInvalidCharacterRefError NSXMLParserInvalidConditionalSectionError NSXMLParserInvalidDecimalCharacterRefError NSXMLParserInvalidEncodingError NSXMLParserInvalidEncodingNameError NSXMLParserInvalidHexCharacterRefError NSXMLParserInvalidURIError NSXMLParserLTRequiredError NSXMLParserLTSlashRequiredError NSXMLParserLessThanSymbolInAttributeError NSXMLParserLiteralNotFinishedError NSXMLParserLiteralNotStartedError NSXMLParserMisplacedCDATAEndStringError NSXMLParserMisplacedXMLDeclarationError NSXMLParserMixedContentDeclNotFinishedError NSXMLParserMixedContentDeclNotStartedError NSXMLParserNAMERequiredError NSXMLParserNMTOKENRequiredError NSXMLParserNamespaceDeclarationError NSXMLParserNoDTDError NSXMLParserNotWellBalancedError NSXMLParserNotationNotFinishedError NSXMLParserNotationNotStartedError NSXMLParserOutOfMemoryError NSXMLParserPCDATARequiredError NSXMLParserParsedEntityRefAtEOFError NSXMLParserParsedEntityRefInEpilogError NSXMLParserParsedEntityRefInInternalError NSXMLParserParsedEntityRefInInternalSubsetError NSXMLParserParsedEntityRefInPrologError NSXMLParserParsedEntityRefMissingSemiError NSXMLParserParsedEntityRefNoNameError NSXMLParserPrematureDocumentEndError NSXMLParserProcessingInstructionNotFinishedError NSXMLParserProcessingInstructionNotStartedError NSXMLParserPublicIdentifierRequiredError NSXMLParserSeparatorRequiredError NSXMLParserSpaceRequiredError NSXMLParserStandaloneValueError NSXMLParserStringNotClosedError NSXMLParserStringNotStartedError NSXMLParserTagNameMismatchError NSXMLParserURIFragmentError NSXMLParserURIRequiredError NSXMLParserUndeclaredEntityError NSXMLParserUnfinishedTagError NSXMLParserUnknownEncodingError NSXMLParserUnparsedEntityError NSXMLParserXMLDeclNotFinishedError NSXMLParserXMLDeclNotStartedError NSXMLProcessingInstructionKind NSXMLTextKind NSYearCalendarUnit NSYearMonthDatePickerElementFlag NSYearMonthDayDatePickerElementFlag UIActionSheetStyleAutomatic UIActionSheetStyleBlackOpaque UIActionSheetStyleBlackTranslucent UIActionSheetStyleDefault UIActivityIndicatorViewStyleGray UIActivityIndicatorViewStyleWhite UIActivityIndicatorViewStyleWhiteLarge UIBarButtonItemStyleBordered UIBarButtonItemStyleDone UIBarButtonItemStylePlain UIBarButtonSystemItemAction UIBarButtonSystemItemAdd UIBarButtonSystemItemBookmarks UIBarButtonSystemItemCamera UIBarButtonSystemItemCancel UIBarButtonSystemItemCompose UIBarButtonSystemItemDone UIBarButtonSystemItemEdit UIBarButtonSystemItemFastForward UIBarButtonSystemItemFixedSpace UIBarButtonSystemItemFlexibleSpace UIBarButtonSystemItemOrganize UIBarButtonSystemItemPause UIBarButtonSystemItemPlay UIBarButtonSystemItemRedo UIBarButtonSystemItemRefresh UIBarButtonSystemItemReply UIBarButtonSystemItemRewind UIBarButtonSystemItemSave UIBarButtonSystemItemSearch UIBarButtonSystemItemStop UIBarButtonSystemItemTrash UIBarButtonSystemItemUndo UIBarStyleBlack UIBarStyleBlackOpaque UIBarStyleBlackTranslucent UIBarStyleDefault UIBaselineAdjustmentAlignBaselines UIBaselineAdjustmentAlignCenters UIBaselineAdjustmentNone UIButtonTypeContactAdd UIButtonTypeCustom UIButtonTypeDetailDisclosure UIButtonTypeInfoDark UIButtonTypeInfoLight UIButtonTypeRoundedRect UIControlContentHorizontalAlignmentCenter UIControlContentHorizontalAlignmentFill UIControlContentHorizontalAlignmentLeft UIControlContentHorizontalAlignmentRight UIControlContentVerticalAlignmentBottom UIControlContentVerticalAlignmentCenter UIControlContentVerticalAlignmentFill UIControlContentVerticalAlignmentTop UIControlEventAllEditingEvents UIControlEventAllEvents UIControlEventAllTouchEvents UIControlEventApplicationReserved UIControlEventEditingChanged UIControlEventEditingDidBegin UIControlEventEditingDidEnd UIControlEventEditingDidEndOnExit UIControlEventSystemReserved UIControlEventTouchCancel UIControlEventTouchDown UIControlEventTouchDownRepeat UIControlEventTouchDragEnter UIControlEventTouchDragExit UIControlEventTouchDragInside UIControlEventTouchDragOutside UIControlEventTouchUpInside UIControlEventTouchUpOutside UIControlEventValueChanged UIControlStateApplication UIControlStateDisabled UIControlStateHighlighted UIControlStateNormal UIControlStateReserved UIControlStateSelected UIDataDetectorTypeAll UIDataDetectorTypeLink UIDataDetectorTypeNone UIDataDetectorTypePhoneNumber UIDatePickerModeCountDownTimer UIDatePickerModeDate UIDatePickerModeDateAndTime UIDatePickerModeTime UIDeviceBatteryStateCharging UIDeviceBatteryStateFull UIDeviceBatteryStateUnknown UIDeviceBatteryStateUnplugged UIDeviceOrientationFaceDown UIDeviceOrientationFaceUp UIDeviceOrientationLandscapeLeft UIDeviceOrientationLandscapeRight UIDeviceOrientationPortrait UIDeviceOrientationPortraitUpsideDown UIDeviceOrientationUnknown UIEventSubtypeMotionShake UIEventSubtypeNone UIEventTypeMotion UIEventTypeTouches UIImageOrientationDown UIImageOrientationDownMirrored UIImageOrientationLeft UIImageOrientationLeftMirrored UIImageOrientationRight UIImageOrientationRightMirrored UIImageOrientationUp UIImageOrientationUpMirrored UIImagePickerControllerSourceTypeCamera UIImagePickerControllerSourceTypePhotoLibrary UIImagePickerControllerSourceTypeSavedPhotosAlbum UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIKeyboardAppearanceAlert UIKeyboardAppearanceDefault UIKeyboardTypeASCIICapable UIKeyboardTypeAlphabet UIKeyboardTypeDefault UIKeyboardTypeEmailAddress UIKeyboardTypeNamePhonePad UIKeyboardTypeNumberPad UIKeyboardTypeNumbersAndPunctuation UIKeyboardTypePhonePad UIKeyboardTypeURL UILineBreakModeCharacterWrap UILineBreakModeClip UILineBreakModeHeadTruncation UILineBreakModeMiddleTruncation UILineBreakModeTailTruncation UILineBreakModeWordWrap UIModalTransitionStyleCoverVertical UIModalTransitionStyleCrossDissolve UIModalTransitionStyleFlipHorizontal UIProgressViewStyleBar UIProgressViewStyleDefault UIRemoteNotificationTypeAlert UIRemoteNotificationTypeBadge UIRemoteNotificationTypeNone UIRemoteNotificationTypeSound UIReturnKeyDefault UIReturnKeyDone UIReturnKeyEmergencyCall UIReturnKeyGo UIReturnKeyGoogle UIReturnKeyJoin UIReturnKeyNext UIReturnKeyRoute UIReturnKeySearch UIReturnKeySend UIReturnKeyYahoo UIScrollViewIndicatorStyleBlack UIScrollViewIndicatorStyleDefault UIScrollViewIndicatorStyleWhite UISegmentedControlNoSegment UISegmentedControlStyleBar UISegmentedControlStyleBordered UISegmentedControlStylePlain UIStatusBarStyleBlackOpaque UIStatusBarStyleBlackTranslucent UIStatusBarStyleDefault UITabBarSystemItemBookmarks UITabBarSystemItemContacts UITabBarSystemItemDownloads UITabBarSystemItemFavorites UITabBarSystemItemFeatured UITabBarSystemItemHistory UITabBarSystemItemMore UITabBarSystemItemMostRecent UITabBarSystemItemMostViewed UITabBarSystemItemRecents UITabBarSystemItemSearch UITabBarSystemItemTopRated UITableViewCellAccessoryCheckmark UITableViewCellAccessoryDetailDisclosureButton UITableViewCellAccessoryDisclosureIndicator UITableViewCellAccessoryNone UITableViewCellEditingStyleDelete UITableViewCellEditingStyleInsert UITableViewCellEditingStyleNone UITableViewCellSelectionStyleBlue UITableViewCellSelectionStyleGray UITableViewCellSelectionStyleNone UITableViewCellSeparatorStyleNone UITableViewCellSeparatorStyleSingleLine UITableViewCellStateDefaultMask UITableViewCellStateShowingDeleteConfirmationMask UITableViewCellStateShowingEditControlMask UITableViewCellStyleDefault UITableViewCellStyleSubtitle UITableViewCellStyleValue1 UITableViewCellStyleValue2 UITableViewRowAnimationBottom UITableViewRowAnimationFade UITableViewRowAnimationLeft UITableViewRowAnimationNone UITableViewRowAnimationRight UITableViewRowAnimationTop UITableViewScrollPositionBottom UITableViewScrollPositionMiddle UITableViewScrollPositionNone UITableViewScrollPositionTop UITableViewStyleGrouped UITableViewStylePlain UITextAlignmentCenter UITextAlignmentLeft UITextAlignmentRight UITextAutocapitalizationTypeAllCharacters UITextAutocapitalizationTypeNone UITextAutocapitalizationTypeSentences UITextAutocapitalizationTypeWords UITextAutocorrectionTypeDefault UITextAutocorrectionTypeNo UITextAutocorrectionTypeYes UITextBorderStyleBezel UITextBorderStyleLine UITextBorderStyleNone UITextBorderStyleRoundedRect UITextFieldViewModeAlways UITextFieldViewModeNever UITextFieldViewModeUnlessEditing UITextFieldViewModeWhileEditing UITouchPhaseBegan UITouchPhaseCancelled UITouchPhaseEnded UITouchPhaseMoved UITouchPhaseStationary UIViewAnimationCurveEaseIn UIViewAnimationCurveEaseInOut UIViewAnimationCurveEaseOut UIViewAnimationCurveLinear UIViewAnimationTransitionCurlDown UIViewAnimationTransitionCurlUp UIViewAnimationTransitionFlipFromLeft UIViewAnimationTransitionFlipFromRight UIViewAnimationTransitionNone UIViewAutoresizingFlexibleBottomMargin UIViewAutoresizingFlexibleHeight UIViewAutoresizingFlexibleLeftMargin UIViewAutoresizingFlexibleRightMargin UIViewAutoresizingFlexibleTopMargin UIViewAutoresizingFlexibleWidth UIViewAutoresizingNone UIViewContentModeBottom UIViewContentModeBottomLeft UIViewContentModeBottomRight UIViewContentModeCenter UIViewContentModeLeft UIViewContentModeRedraw UIViewContentModeRight UIViewContentModeScaleAspectFill UIViewContentModeScaleAspectFit UIViewContentModeScaleToFill UIViewContentModeTop UIViewContentModeTopLeft UIViewContentModeTopRight UIWebViewNavigationTypeBackForward UIWebViewNavigationTypeFormResubmitted UIWebViewNavigationTypeFormSubmitted UIWebViewNavigationTypeLinkClicked UIWebViewNavigationTypeOther UIWebViewNavigationTypeReload - -" Cocoa Notifications -syn keyword cocoaNotification containedin=objcMessage NSAntialiasThresholdChangedNotification NSAppleEventManagerWillProcessFirstEventNotification NSApplicationDidBecomeActiveNotification NSApplicationDidChangeScreenParametersNotification NSApplicationDidFinishLaunchingNotification NSApplicationDidHideNotification NSApplicationDidResignActiveNotification NSApplicationDidUnhideNotification NSApplicationDidUpdateNotification NSApplicationWillBecomeActiveNotification NSApplicationWillFinishLaunchingNotification NSApplicationWillHideNotification NSApplicationWillResignActiveNotification NSApplicationWillTerminateNotification NSApplicationWillUnhideNotification NSApplicationWillUpdateNotification NSClassDescriptionNeededForClassNotification NSColorListDidChangeNotification NSColorPanelColorDidChangeNotification NSComboBoxSelectionDidChangeNotification NSComboBoxSelectionIsChangingNotification NSComboBoxWillDismissNotification NSComboBoxWillPopUpNotification NSContextHelpModeDidActivateNotification NSContextHelpModeDidDeactivateNotification NSControlTextDidBeginEditingNotification NSControlTextDidChangeNotification NSControlTextDidEndEditingNotification NSControlTintDidChangeNotification NSDrawerDidCloseNotification NSDrawerDidOpenNotification NSDrawerWillCloseNotification NSDrawerWillOpenNotification NSFontSetChangedNotification NSImageRepRegistryDidChangeNotification NSMenuDidAddItemNotification NSMenuDidBeginTrackingNotification NSMenuDidChangeItemNotification NSMenuDidEndTrackingNotification NSMenuDidRemoveItemNotification NSMenuDidSendActionNotification NSMenuWillSendActionNotification NSOutlineViewColumnDidMoveNotification NSOutlineViewColumnDidResizeNotification NSOutlineViewItemDidCollapseNotification NSOutlineViewItemDidExpandNotification NSOutlineViewItemWillCollapseNotification NSOutlineViewItemWillExpandNotification NSOutlineViewSelectionDidChangeNotification NSOutlineViewSelectionIsChangingNotification NSPopUpButtonCellWillPopUpNotification NSPopUpButtonWillPopUpNotification NSPreferencePaneCancelUnselectNotification NSPreferencePaneDoUnselectNotification NSSplitViewDidResizeSubviewsNotification NSSplitViewWillResizeSubviewsNotification NSSystemColorsDidChangeNotification NSTableViewColumnDidMoveNotification NSTableViewColumnDidResizeNotification NSTableViewSelectionDidChangeNotification NSTableViewSelectionIsChangingNotification NSTextDidBeginEditingNotification NSTextDidChangeNotification NSTextDidEndEditingNotification NSTextStorageDidProcessEditingNotification NSTextStorageWillProcessEditingNotification NSTextViewDidChangeSelectionNotification NSTextViewDidChangeTypingAttributesNotification NSTextViewWillChangeNotifyingTextViewNotification NSToolbarDidRemoveItemNotification NSToolbarWillAddItemNotification NSViewBoundsDidChangeNotification NSViewDidUpdateTrackingAreasNotification NSViewFocusDidChangeNotification NSViewFrameDidChangeNotification NSViewGlobalFrameDidChangeNotification NSWindowDidBecomeKeyNotification NSWindowDidBecomeMainNotification NSWindowDidChangeScreenNotification NSWindowDidChangeScreenProfileNotification NSWindowDidDeminiaturizeNotification NSWindowDidEndSheetNotification NSWindowDidExposeNotification NSWindowDidMiniaturizeNotification NSWindowDidMoveNotification NSWindowDidResignKeyNotification NSWindowDidResignMainNotification NSWindowDidResizeNotification NSWindowDidUpdateNotification NSWindowWillBeginSheetNotification NSWindowWillCloseNotification NSWindowWillMiniaturizeNotification NSWindowWillMoveNotification NSWorkspaceDidLaunchApplicationNotification NSWorkspaceDidMountNotification NSWorkspaceDidPerformFileOperationNotification NSWorkspaceDidTerminateApplicationNotification NSWorkspaceDidUnmountNotification NSWorkspaceDidWakeNotification NSWorkspaceSessionDidBecomeActiveNotification NSWorkspaceSessionDidResignActiveNotification NSWorkspaceWillLaunchApplicationNotification NSWorkspaceWillPowerOffNotification NSWorkspaceWillSleepNotification NSWorkspaceWillUnmountNotification - -hi link cocoaFunction Keyword -hi link cocoaClass Special -hi link cocoaProtocol cocoaClass -hi link cocoaType Type -hi link cocoaConstant Constant -hi link cocoaNotification Constant \ No newline at end of file diff --git a/.vim/after/syntax/objc_enhanced.vim b/.vim/after/syntax/objc_enhanced.vim deleted file mode 100644 index 6883171..0000000 --- a/.vim/after/syntax/objc_enhanced.vim +++ /dev/null @@ -1,59 +0,0 @@ -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Description: Better syntax highlighting for Objective-C files (part of the -" cocoa.vim plugin). -" Last Updated: June 23, 2009 - -" NOTE: This next file (cocoa_keywords.vim) is rather large and may slow -" things down. Loading it seems to take less than 0.5 microseconds -" on my machine, but I'm not sure of the consequences; if it is slow -" for you, just comment out the next line. -ru after/syntax/cocoa_keywords.vim - -syn match objcDirective '@synthesize\|@property' display -syn keyword objcType IBOutlet IBAction Method -syn keyword objcConstant YES NO TRUE FALSE - -syn region objcImp start='@implementation' end='@end' transparent -syn region objcHeader start='@interface' end='@end' transparent - -" I make this typo sometimes so it's nice to have it highlighted. -syn match objcError '\v(NSLogv=\(\s*)@<=[^@]=["'].*'me=e-1 - -syn match objcSubclass '\(@implementation\|@interface\)\@<=\s*\k\+' display contained containedin=objcImp,objcHeader -syn match objcSuperclass '\(@\(implementation\|interface\)\s*\k\+\s*:\)\@<=\s*\k*' display contained containedin=objcImp,objcHeader - -" Matches "- (void) foo: (int) bar and: (float) foobar" -syn match objcMethod '^\s*[-+]\s*\_.\{-}[\{;]'me=e-1 transparent contains=cParen,objcInstMethod,objcFactMethod -" Matches "bar & foobar" in above -syn match objcMethodArg ')\@<=\s*\k\+' contained containedin=objcMethod -" Matches "foo:" & "and:" in above -syn match objcMethodName '\(^\s*[-+]\s*(\_[^)]*)\)\@<=\_\s*\_\k\+' contained containedin=objcMethod -syn match objcMethodColon '\k\+\s*:' contained containedin=objcMethod -" Don't match these groups in cParen "(...)" -syn cluster cParenGroup add=objcMethodName,objcMethodArg,objcMethodColon -" This fixes a bug with completion inside parens (e.g. if ([NSString ])) -syn cluster cParenGroup remove=objcMessage - -" Matches "bar" in "[NSObject bar]" or "bar" in "[[NSObject foo: baz] bar]", -" but NOT "bar" in "[NSObject foo: bar]". -syn match objcMessageName '\(\[\s*\k\+\s\+\|\]\s*\)\@<=\k*\s*\]'me=e-1 display contained containedin=objcMessage -" Matches "foo:" in "[NSObject foo: bar]" or "[[NSObject new] foo: bar]" -syn match objcMessageColon '\(\_\S\+\_\s\+\)\@<=\k\+\s*:' display contained containedin=objcMessage - -" Don't match these in this strange group for edge cases... -syn cluster cMultiGroup add=objcMessageColon,objcMessageName,objcMethodName,objcMethodArg,objcMethodColon - -" You may want to customize this one. I couldn't find a default group to suit -" it, but you can modify your colorscheme to make this a different color. -hi link objcMethodName Special -hi link objcMethodColon objcMethodName - -hi link objcMethodArg Identifier - -hi link objcMessageName objcMethodArg -hi link objcMessageColon objcMessageName - -hi link objcSubclass objcMethodName -hi link objcSuperclass String - -hi link objcError Error diff --git a/.vim/autoload/airline/themes/barak.vim b/.vim/autoload/airline/themes/barak.vim deleted file mode 100644 index 056fc45..0000000 --- a/.vim/autoload/airline/themes/barak.vim +++ /dev/null @@ -1,61 +0,0 @@ -" vim-airline companion theme of Ubaryd -" (https://github.com/Donearm/Ubaryd) - -" Normal mode -let s:N1 = [ '#141413' , '#b3b3b3' , 232 , 252 ] " blackestgravel & bleaksand -let s:N2 = [ '#b3b3b3' , '#414141' , 252, 238 ] " bleaksand & deepgravel -let s:N3 = [ '#e0e0e0' , '#363636' , 254, 237 ] " toffee & darkgravel -let s:N4 = [ '#363946' , 237 ] " gravel - -" Insert mode -let s:I1 = [ '#1a1a18' , '#fade3e' , 232 , 221 ] " blackestgravel & warmcorn -let s:I2 = [ '#c7b386' , '#45413b' , 252 , 238 ] " bleaksand & deepgravel -let s:I3 = [ '#f4cf86' , '#242321' , 222 , 235 ] " lighttannedskin & darkgravel - -" Visual mode -let s:V1 = [ '#1c1b1a' , '#9a4820' , 233 , 88 ] " blackgravel & warmadobe -let s:V2 = [ '#000000' , '#88633f' , 16 , 95 ] " coal & cappuccino -let s:V3 = [ '#88633f' , '#c7b386' , 95 , 252 ] " cappuccino & bleaksand -let s:V4 = [ '#c14c3d' , 160 ] " tannedumbrella - -" Replace mode -let s:RE = [ '#c7915b' , 173 ] " nut - -" Paste mode -let s:PA = [ '#f9ef6d' , 154 ] " bleaklemon - -let s:file = [ '#ff7400' , '' , 196 , '' , '' ] -let s:IA = [ '#767986', '#363946', 244, 237, '' ] - -let g:airline#themes#barak#palette = {} -let g:airline#themes#barak#palette.inactive = { - \ 'airline_a' : [ s:N2[1] , s:N3[1] , s:N2[3] , s:N3[3] , '' ] } - -let g:airline#themes#barak#palette.accents = { - \ 'red': [ '#ff7400' , '' , 196 , '' , '' ], - \ } - -let g:airline#themes#barak#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3, s:file) -let g:airline#themes#barak#palette.normal_modified = { - \ 'airline_a' : [ s:N2[0] , s:N4[0] , s:N2[2] , s:N4[1] , '' ] , - \ 'airline_c' : [ s:V1[1] , s:N2[1] , s:V1[3] , s:N2[3] , '' ] } - - -let g:airline#themes#barak#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3, s:file) -let g:airline#themes#barak#palette.insert_modified = { - \ 'airline_c' : [ s:V2[1] , s:N2[1] , s:V2[3] , s:N2[3] , '' ] } -let g:airline#themes#barak#palette.insert_paste = { - \ 'airline_a' : [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] } - - -let g:airline#themes#barak#palette.replace = copy(airline#themes#barak#palette.insert) -let g:airline#themes#barak#palette.replace.airline_a = [ s:I1[0] , s:RE[0] , s:I1[2] , s:RE[1] , '' ] -let g:airline#themes#barak#palette.replace_modified = g:airline#themes#barak#palette.insert_modified - - -let g:airline#themes#barak#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3, s:file) -let g:airline#themes#barak#palette.visual_modified = { - \ 'airline_c' : [ s:V3[0] , s:V4[0] , s:V3[2] , s:V4[1] , '' ] } - -let g:airline#themes#barak#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) - diff --git a/.vim/autoload/genutils.vim b/.vim/autoload/genutils.vim deleted file mode 100755 index c28a25c..0000000 --- a/.vim/autoload/genutils.vim +++ /dev/null @@ -1,1954 +0,0 @@ -" genutils.vim: Please see plugin/genutils.vim -" -" TODO: -" - Vim7: redir can be used with a variable. -" - fnamemodify() on Unix doesn't expand to full name if the filename doesn't -" really exist on the filesystem. -" - Is setting 'scrolloff' and 'sidescrolloff' to 0 required while moving the -" cursor? -" - http://www.vim.org/tips/tip.php?tip_id=1379 -" -" - EscapeCommand() didn't work for David Fishburn. -" - Save/RestoreWindowSettings doesn't work well. -" -" Vim7: -" - Save/RestoreWindowSettings can use winsave/restview() functions. -" - -" Make sure line-continuations won't cause any problem. This will be restored -" at the end -let s:save_cpo = &cpo -set cpo&vim - - -let g:makeArgumentString = 'exec genutils#MakeArgumentString()' -let g:makeArgumentList = 'exec genutils#MakeArgumentList()' - -let s:makeArgumentString = '' -function! genutils#MakeArgumentString(...) - if s:makeArgumentString == '' - let s:makeArgumentString = genutils#ExtractFuncListing(s:SNR(). - \ '_makeArgumentString', 0, 0) - endif - if a:0 > 0 && a:1 != '' - return substitute(s:makeArgumentString, '\', a:1, 'g') - else - return s:makeArgumentString - endif -endfunction - - -let s:makeArgumentList = '' -function! genutils#MakeArgumentList(...) - if s:makeArgumentList == '' - let s:makeArgumentList = genutils#ExtractFuncListing(s:SNR(). - \ '_makeArgumentList', 0, 0) - endif - if a:0 > 0 && a:1 != '' - let mkArgLst = substitute(s:makeArgumentList, '\', a:1, 'g') - if a:0 > 1 && a:2 != '' - let mkArgLst = substitute(s:makeArgumentList, - \ '\(\s\+let __argSeparator = \)[^'."\n".']*', "\\1'".a:2."'", '') - endif - return mkArgLst - else - return s:makeArgumentList - endif -endfunction - -function! genutils#ExtractFuncListing(funcName, hLines, tLines) - let listing = genutils#GetVimCmdOutput('func '.a:funcName) - let listing = substitute(listing, - \ '^\%(\s\|'."\n".'\)*function '.a:funcName.'([^)]*)'."\n", '', '') - "let listing = substitute(listing, '\%(\s\|'."\n".'\)*endfunction\%(\s\|'."\n".'\)*$', '', '') - " Leave the last newline character. - let listing = substitute(listing, '\%('."\n".'\)\@<=\s*endfunction\s*$', '', '') - let listing = substitute(listing, '\(\%(^\|'."\n".'\)\s*\)\@<=\d\+', - \ '', 'g') - if a:hLines > 0 - let listing = substitute(listing, '^\%([^'."\n".']*'."\n".'\)\{'. - \ a:hLines.'}', '', '') - endif - if a:tLines > 0 - let listing = substitute(listing, '\%([^'."\n".']*'."\n".'\)\{'. - \ a:tLines.'}$', '', '') - endif - return listing -endfunction - -function! genutils#CreateArgString(argList, sep, ...) - let sep = (a:0 == 0) ? a:sep : a:1 " This is no longer used. - " Matching multvals functionality means, we need to ignore the trailing - " separator. - let argList = split(substitute(a:argList, a:sep.'$', '', ''), a:sep, 1) - let argString = "'" - for nextArg in argList - " FIXME: I think this check is not required. If "'" is the separator, we - " don't expect to see them in the elements. - if a:sep != "'" - let nextArg = substitute(nextArg, "'", "' . \"'\" . '", 'g') - endif - let argString = argString . nextArg . "', '" - endfor - let argString = strpart(argString, 0, strlen(argString) - 3) - return argString -endfunction - -" {{{ -function! s:_makeArgumentString() - let __argCounter = 1 - let argumentString = '' - while __argCounter <= a:0 - if type(a:{__argCounter}) - let __nextArg = "'" . - \ substitute(a:{__argCounter}, "'", "' . \"'\" . '", "g") . "'" - else - let __nextArg = a:{__argCounter} - endif - let argumentString = argumentString. __nextArg . - \ ((__argCounter == a:0) ? '' : ', ') - let __argCounter = __argCounter + 1 - endwhile - unlet __argCounter - if exists('__nextArg') - unlet __nextArg - endif -endfunction - -function! s:_makeArgumentList() - let __argCounter = 1 - let __argSeparator = ',' - let argumentList = '' - while __argCounter <= a:0 - let argumentList = argumentList . a:{__argCounter} - if __argCounter != a:0 - let argumentList = argumentList . __argSeparator - endif - let __argCounter = __argCounter + 1 - endwhile - unlet __argCounter - unlet __argSeparator -endfunction -" }}} - - -function! genutils#DebugShowArgs(...) - let i = 0 - let argString = '' - while i < a:0 - let argString = argString . a:{i + 1} . ', ' - let i = i + 1 - endwhile - let argString = strpart(argString, 0, strlen(argString) - 2) - call input("Args: " . argString) -endfunction - -" Window related functions {{{ - -function! genutils#NumberOfWindows() - let i = 1 - while winbufnr(i) != -1 - let i = i+1 - endwhile - return i - 1 -endfunction - -" Find the window number for the buffer passed. -" The fileName argument is treated literally, unlike the bufnr() which treats -" the argument as a regex pattern. -function! genutils#FindWindowForBuffer(bufferName, checkUnlisted) - return bufwinnr(genutils#FindBufferForName(a:bufferName)) -endfunction - -function! genutils#FindBufferForName(fileName) - " The name could be having extra backslashes to protect certain chars (such - " as '#' and '%'), so first expand them. - return s:FindBufferForName(genutils#UnEscape(a:fileName, '#%')) -endfunction - -function! s:FindBufferForName(fileName) - let fileName = genutils#Escape(a:fileName, '[?,{') - let _isf = &isfname - try - set isfname-=\ - set isfname-=[ - let i = bufnr('^' . fileName . '$') - finally - let &isfname = _isf - endtry - return i -endfunction - -function! genutils#GetBufNameForAu(bufName) - let bufName = a:bufName - " Autocommands always require forward-slashes. - let bufName = substitute(bufName, "\\\\", '/', 'g') - let bufName = escape(bufName, '*?,{}[ ') - return bufName -endfunction - -function! genutils#MoveCursorToWindow(winno) - if genutils#NumberOfWindows() != 1 - execute a:winno . " wincmd w" - endif -endfunction - -function! genutils#MoveCurLineToWinLine(n) - normal! zt - if a:n == 1 - return - endif - let _wrap = &l:wrap - setl nowrap - let n = a:n - if n >= winheight(0) - let n = winheight(0) - endif - let n = n - 1 - execute "normal! " . n . "\" - let &l:wrap = _wrap -endfunction - -function! genutils#CloseWindow(win, force) - let _eventignore = &eventignore - try - set eventignore=all - call genutils#MarkActiveWindow() - - let &eventignore = _eventignore - exec a:win 'wincmd w' - exec 'close'.(a:force ? '!' : '') - set eventignore=all - - if a:win < t:curWinnr - let t:curWinnr = t:curWinnr - 1 - endif - if a:win < t:prevWinnr - let t:prevWinnr = t:prevWinnr - 1 - endif - finally - call genutils#RestoreActiveWindow() - let &eventignore = _eventignore - endtry -endfunction - -function! genutils#MarkActiveWindow() - let t:curWinnr = winnr() - " We need to restore the previous-window also at the end. - silent! wincmd p - let t:prevWinnr = winnr() - silent! wincmd p -endfunction - -function! genutils#RestoreActiveWindow() - if !exists('t:curWinnr') - return - endif - - " Restore the original window. - if winnr() != t:curWinnr - exec t:curWinnr'wincmd w' - endif - if t:curWinnr != t:prevWinnr - exec t:prevWinnr'wincmd w' - wincmd p - endif -endfunction - -function! genutils#IsOnlyVerticalWindow() - let onlyVertWin = 1 - let _eventignore = &eventignore - - try - "set eventignore+=WinEnter,WinLeave - set eventignore=all - call genutils#MarkActiveWindow() - - wincmd j - if winnr() != t:curWinnr - let onlyVertWin = 0 - else - wincmd k - if winnr() != t:curWinnr - let onlyVertWin = 0 - endif - endif - finally - call genutils#RestoreActiveWindow() - let &eventignore = _eventignore - endtry - return onlyVertWin -endfunction - -function! genutils#IsOnlyHorizontalWindow() - let onlyHorizWin = 1 - let _eventignore = &eventignore - try - set eventignore=all - call genutils#MarkActiveWindow() - wincmd l - if winnr() != t:curWinnr - let onlyHorizWin = 0 - else - wincmd h - if winnr() != t:curWinnr - let onlyHorizWin = 0 - endif - endif - finally - call genutils#RestoreActiveWindow() - let &eventignore = _eventignore - endtry - return onlyHorizWin -endfunction - -function! genutils#MoveCursorToNextInWinStack(dir) - let newwin = genutils#GetNextWinnrInStack(a:dir) - if newwin != 0 - exec newwin 'wincmd w' - endif -endfunction - -function! genutils#GetNextWinnrInStack(dir) - let newwin = winnr() - let _eventignore = &eventignore - try - set eventignore=all - call genutils#MarkActiveWindow() - let newwin = s:GetNextWinnrInStack(a:dir) - finally - call genutils#RestoreActiveWindow() - let &eventignore = _eventignore - endtry - return newwin -endfunction - -function! genutils#MoveCursorToLastInWinStack(dir) - let newwin = genutils#GetLastWinnrInStack(a:dir) - if newwin != 0 - exec newwin 'wincmd w' - endif -endfunction - -function! genutils#GetLastWinnrInStack(dir) - let newwin = winnr() - let _eventignore = &eventignore - try - set eventignore=all - call genutils#MarkActiveWindow() - while 1 - let wn = s:GetNextWinnrInStack(a:dir) - if wn != 0 - let newwin = wn - exec newwin 'wincmd w' - else - break - endif - endwhile - finally - call genutils#RestoreActiveWindow() - let &eventignore = _eventignore - endtry - return newwin -endfunction - -" Based on the WinStackMv() function posted by Charles E. Campbell, Jr. on vim -" mailing list on Jul 14, 2004. -function! s:GetNextWinnrInStack(dir) - "call Decho("genutils#MoveCursorToNextInWinStack(dir<".a:dir.">)") - - let isHorizontalMov = (a:dir ==# 'h' || a:dir ==# 'l') ? 1 : 0 - - let orgwin = winnr() - let orgdim = s:GetWinDim(a:dir, orgwin) - - let _winwidth = &winwidth - let _winheight = &winheight - try - set winwidth=1 - set winheight=1 - exec 'wincmd' a:dir - let newwin = winnr() - if orgwin == newwin - " No more windows in this direction. - "call Decho("newwin=".newwin." stopped".winheight(newwin)."x".winwidth(newwin)) - return 0 - endif - if s:GetWinDim(a:dir, newwin) != orgdim - " Window dimension has changed, indicates a move across window stacks. - "call Decho("newwin=".newwin." height changed".winheight(newwin)."x".winwidth(newwin)) - return 0 - endif - " Determine if changing original window height affects current window - " height. - exec orgwin 'wincmd w' - try - if orgdim == 1 - exec 'wincmd' (isHorizontalMov ? '_' : '|') - else - exec 'wincmd' (isHorizontalMov ? '-' : '<') - endif - if s:GetWinDim(a:dir, newwin) != s:GetWinDim(a:dir, orgwin) - "call Decho("newwin=".newwin." different row".winheight(newwin)."x".winwidth(newwin)) - return 0 - endif - "call Decho("newwin=".newwin." same row".winheight(newwin)."x".winwidth(newwin)) - finally - exec (isHorizontalMov ? '' : 'vert') 'resize' orgdim - endtry - - "call Decho("genutils#MoveCursorToNextInWinStack") - - return newwin - finally - let &winwidth = _winwidth - let &winheight = _winheight - endtry -endfunction - -function! s:GetWinDim(dir, win) - return (a:dir ==# 'h' || a:dir ==# 'l') ? winheight(a:win) : winwidth(a:win) -endfunction - -function! genutils#OpenWinNoEa(winOpenCmd) - call s:ExecWinCmdNoEa(a:winOpenCmd) -endfunction - -function! genutils#CloseWinNoEa(winnr, force) - call s:ExecWinCmdNoEa(a:winnr.'wincmd w | close'.(a:force?'!':'')) -endfunction - -function! s:ExecWinCmdNoEa(winCmd) - let _eventignore = &eventignore - try - set eventignore=all - call genutils#MarkActiveWindow() - windo let w:_winfixheight = &winfixheight - windo set winfixheight - call genutils#RestoreActiveWindow() - - let &eventignore = _eventignore - exec a:winCmd - set eventignore=all - - call genutils#MarkActiveWindow() - silent! windo let &winfixheight = w:_winfixheight - silent! windo unlet w:_winfixheight - call genutils#RestoreActiveWindow() - finally - let &eventignore = _eventignore - endtry -endfunction - -" Window related functions }}} - -function! genutils#SetupScratchBuffer() - setlocal nobuflisted - setlocal noswapfile - setlocal buftype=nofile - " Just in case, this will make sure we are always hidden. - setlocal bufhidden=delete - setlocal nolist - setlocal nonumber - setlocal foldcolumn=0 nofoldenable - setlocal noreadonly -endfunction - -function! genutils#CleanDiffOptions() - setlocal nodiff - setlocal noscrollbind - setlocal scrollopt-=hor - setlocal wrap - setlocal foldmethod=manual - setlocal foldcolumn=0 - normal zE -endfunction - -function! genutils#ArrayVarExists(varName, index) - try - exec "let test = " . a:varName . "{a:index}" - catch /^Vim\%((\a\+)\)\=:E121/ - return 0 - endtry - return 1 -endfunction - -function! genutils#Escape(str, chars) - return substitute(a:str, '\\\@ 0 - let pipe = join(a:pipe, ' ') - elseif type(a:pipe) == 1 && a:pipe !~# '^\s*$' - let pipe = a:pipe - endif - if pipe != '' - let fullCmd = fullCmd . ' ' . a:pipe - endif - if a:cmd !~# '^\s*$' - let fullCmd = a:cmd . ' ' . fullCmd - endif - if shellEnvType ==# g:ST_WIN_SH && &shell =~# '\' - let fullCmd = substitute(fullCmd, '\\', '\\\\', 'g') - endif - return fullCmd -endfunction - -let g:ST_WIN_CMD = 0 | let g:ST_WIN_SH = 1 | let g:ST_UNIX = 2 -function! genutils#GetShellEnvType() - " When 'shellslash' option is available, then the platform must be one of - " those that support '\' as a pathsep. - if exists('+shellslash') - if stridx(&shell, 'cmd.exe') != -1 || - \ stridx(&shell, 'command.com') != -1 - return g:ST_WIN_CMD - else - return g:ST_WIN_SH - endif - else - return g:ST_UNIX - endif -endfunction - -function! genutils#ExpandStr(str) - let str = substitute(a:str, '"', '\\"', 'g') - exec "let str = \"" . str . "\"" - return str -endfunction - -function! genutils#QuoteStr(str) - return "'".substitute(a:str, "'", "'.\"'\".'", 'g')."'" -endfunction - -function! genutils#GetPreviewWinnr() - let _eventignore = &eventignore - let curWinNr = winnr() - let winnr = -1 - try - set eventignore=all - exec "wincmd P" - let winnr = winnr() - catch /^Vim\%((\a\+)\)\=:E441/ - " Ignore, winnr is already set to -1. - finally - if winnr() != curWinNr - exec curWinNr.'wincmd w' - endif - let &eventignore = _eventignore - endtry - return winnr -endfunction - -" Save/Restore window settings {{{ -function! genutils#SaveWindowSettings() - call genutils#SaveWindowSettings2('SaveWindowSettings', 1) -endfunction - -function! genutils#RestoreWindowSettings() - call genutils#RestoreWindowSettings2('SaveWindowSettings') -endfunction - - -function! genutils#ResetWindowSettings() - call genutils#ResetWindowSettings2('SaveWindowSettings') -endfunction - -function! genutils#SaveWindowSettings2(id, overwrite) - if genutils#ArrayVarExists("t:winSettings", a:id) && ! a:overwrite - return - endif - - let t:winSettings{a:id} = [] - call add(t:winSettings{a:id}, genutils#NumberOfWindows()) - call add(t:winSettings{a:id}, &lines) - call add(t:winSettings{a:id}, &columns) - call add(t:winSettings{a:id}, winnr()) - let i = 1 - while winbufnr(i) != -1 - call add(t:winSettings{a:id}, winheight(i)) - call add(t:winSettings{a:id}, winwidth(i)) - let i = i + 1 - endwhile - "let g:savedWindowSettings = t:winSettings{a:id} " Debug. -endfunction - -function! genutils#RestoreWindowSettings2(id) - " Calling twice fixes most of the resizing issues. This seems to be how the - " :mksession with "winsize" in 'sesionoptions' seems to work. - call s:RestoreWindowSettings2(a:id) - call s:RestoreWindowSettings2(a:id) -endfunction - -function! s:RestoreWindowSettings2(id) - "if ! exists("t:winSettings" . a:id) - if ! genutils#ArrayVarExists("t:winSettings", a:id) - return - endif - - let nWindows = t:winSettings{a:id}[0] - if nWindows != genutils#NumberOfWindows() - unlet t:winSettings{a:id} - return - endif - let orgLines = t:winSettings{a:id}[1] - let orgCols = t:winSettings{a:id}[2] - let activeWindow = t:winSettings{a:id}[3] - let mainWinSizeSame = (orgLines == &lines && orgCols == &columns) - - let winNo = 1 - let i = 4 - while i < len(t:winSettings{a:id}) - let height = t:winSettings{a:id}[i] - let width = t:winSettings{a:id}[i+1] - let height = (mainWinSizeSame ? height : - \ ((&lines * height + (orgLines / 2)) / orgLines)) - let width = (mainWinSizeSame ? width : - \ ((&columns * width + (orgCols / 2)) / orgCols)) - if winheight(winnr()) != height - exec winNo'resize' height - endif - if winwidth(winnr()) != width - exec 'vert' winNo 'resize' width - endif - let winNo = winNo + 1 - let i = i + 2 - endwhile - - " Restore the current window. - call genutils#MoveCursorToWindow(activeWindow) - "unlet g:savedWindowSettings -endfunction - - -function! genutils#ResetWindowSettings2(id) - if genutils#ArrayVarExists("t:winSettings", a:id) - unlet t:winSettings{a:id} - endif -endfunction - -" Save/Restore window settings }}} - -" Save/Restore selection {{{ - -function! genutils#SaveVisualSelection(id) - let curmode = mode() - if curmode == 'n' - normal! gv - endif - let s:vismode{a:id} = mode() - let s:firstline{a:id} = line("'<") - let s:lastline{a:id} = line("'>") - let s:firstcol{a:id} = col("'<") - let s:lastcol{a:id} = col("'>") - if curmode !=# s:vismode{a:id} - exec "normal \" - endif -endfunction - -function! genutils#RestoreVisualSelection(id) - if mode() !=# 'n' - exec "normal \" - endif - if exists('s:vismode{id}') - exec 'normal' s:firstline{a:id}.'gg'.s:firstcol{a:id}.'|'. - \ s:vismode{a:id}.(s:lastline{a:id}-s:firstline{a:id}).'j'. - \ (s:lastcol{a:id}-s:firstcol{a:id}).'l' - endif -endfunction -" Save/Restore selection }}} - -function! genutils#CleanupFileName(fileName) - return genutils#CleanupFileName2(a:fileName, '') -endfunction - -function! genutils#CleanupFileName2(fileName, win32ProtectedChars) - let fileName = substitute(a:fileName, '^\s\+\|\s\+$', '', 'g') - - " Expand relative paths and paths containing relative components (takes care - " of ~ also). - if ! genutils#PathIsAbsolute(fileName) - let fileName = fnamemodify(fileName, ':p') - endif - - " I think we can have UNC paths on UNIX, if samba is installed. - if genutils#OnMS() && (match(fileName, '^//') == 0 || - \ match(fileName, '^\\\\') == 0) - let uncPath = 1 - else - let uncPath = 0 - endif - - " Remove multiple path separators. - if has('win32') - if a:win32ProtectedChars != '' - let fileName=substitute(fileName, '\\['.a:win32ProtectedChars.']\@!', '/', - \ 'g') - else - let fileName=substitute(fileName, '\\', '/', 'g') - endif - elseif genutils#OnMS() - " On non-win32 systems, the forward-slash is not supported, so leave - " back-slash. - let fileName=substitute(fileName, '\\\{2,}', '\', 'g') - endif - let fileName=substitute(fileName, '/\{2,}', '/', 'g') - - " Remove ending extra path separators. - let fileName=substitute(fileName, '/$', '', '') - let fileName=substitute(fileName, '\\$', '', '') - - " If it was an UNC path, add back an extra slash. - if uncPath - let fileName = '/'.fileName - endif - - if genutils#OnMS() - let fileName=substitute(fileName, '^[A-Z]:', '\L&', '') - - " Add drive letter if missing (just in case). - if !uncPath && match(fileName, '^/') == 0 - let curDrive = substitute(getcwd(), '^\([a-zA-Z]:\).*$', '\L\1', '') - let fileName = curDrive . fileName - endif - endif - return fileName -endfunction -"echo genutils#CleanupFileName('\\a///b/c\') -"echo genutils#CleanupFileName('C:\a/b/c\d') -"echo genutils#CleanupFileName('a/b/c\d') -"echo genutils#CleanupFileName('~/a/b/c\d') -"echo genutils#CleanupFileName('~/a/b/../c\d') - -function! genutils#OnMS() - return has('win32') || has('dos32') || has('win16') || has('dos16') || - \ has('win95') -endfunction - -function! genutils#PathIsAbsolute(path) - let absolute=0 - if has('unix') || genutils#OnMS() - if match(a:path, '^/') == 0 - let absolute=1 - endif - endif - if (! absolute) && genutils#OnMS() - if match(a:path, "^\\") == 0 - let absolute=1 - endif - endif - if (! absolute) && genutils#OnMS() - if match(a:path, "^[A-Za-z]:") == 0 - let absolute=1 - endif - endif - return absolute -endfunction - -function! genutils#PathIsFileNameOnly(path) - return (match(a:path, "\\") < 0) && (match(a:path, "/") < 0) -endfunction - -let s:mySNR = '' -function! s:SNR() - if s:mySNR == '' - let s:mySNR = matchstr(expand(''), '\d\+_\zeSNR$') - endif - return s:mySNR -endfun - - -"" --- START save/restore position. {{{ - -function! genutils#SaveSoftPosition(id) - let b:sp_startline_{a:id} = getline(".") - call genutils#SaveHardPosition(a:id) -endfunction - -function! genutils#RestoreSoftPosition(id) - 0 - call genutils#RestoreHardPosition(a:id) - let stLine = b:sp_startline_{a:id} - if getline('.') !=# stLine - if ! search('\V\^'.escape(stLine, "\\").'\$', 'W') - call search('\V\^'.escape(stLine, "\\").'\$', 'bW') - endif - endif - call genutils#MoveCurLineToWinLine(b:sp_winline_{a:id}) -endfunction - -function! genutils#ResetSoftPosition(id) - unlet b:sp_startline_{a:id} -endfunction - -" A synonym for genutils#SaveSoftPosition. -function! genutils#SaveHardPositionWithContext(id) - call genutils#SaveSoftPosition(a:id) -endfunction - -" A synonym for genutils#RestoreSoftPosition. -function! genutils#RestoreHardPositionWithContext(id) - call genutils#RestoreSoftPosition(a:id) -endfunction - -" A synonym for genutils#ResetSoftPosition. -function! genutils#ResetHardPositionWithContext(id) - call genutils#ResetSoftPosition(a:id) -endfunction - -function! genutils#SaveHardPosition(id) - let b:sp_col_{a:id} = virtcol(".") - let b:sp_lin_{a:id} = line(".") - " Avoid accounting for wrapped lines. - let _wrap = &l:wrap - try - setl nowrap - let b:sp_winline_{a:id} = winline() - finally - let &l:wrap = _wrap - endtry -endfunction - -function! genutils#RestoreHardPosition(id) - " This doesn't take virtual column. - "call cursor(b:sp_lin_{a:id}, b:sp_col_{a:id}) - " Vim7 generates E16 if line number is invalid. - " TODO: Why is this leaving cursor on the last-but-one line when the - " condition meets? - execute ((line('$') < b:sp_lin_{a:id}) ? line('$') : - \ b:sp_lin_{a:id}) - "execute b:sp_lin_{a:id} - execute ((line('$') < b:sp_lin_{a:id}) ? line('$') : - \ b:sp_lin_{a:id}) - "execute b:sp_lin_{a:id} - execute "normal!" b:sp_col_{a:id} . "|" - call genutils#MoveCurLineToWinLine(b:sp_winline_{a:id}) -endfunction - -function! genutils#ResetHardPosition(id) - unlet b:sp_col_{a:id} - unlet b:sp_lin_{a:id} - unlet b:sp_winline_{a:id} -endfunction - -function! genutils#GetLinePosition(id) - return b:sp_lin_{a:id} -endfunction - -function! genutils#GetColPosition(id) - return b:sp_col_{a:id} -endfunction - -function! genutils#IsPositionSet(id) - return exists('b:sp_col_' . a:id) -endfunction - -"" --- END save/restore position. }}} - - - -"" -"" --- START: Notify window close -- {{{ -"" - -let s:notifyWindow = {} -function! genutils#AddNotifyWindowClose(windowTitle, functionName) - let bufName = a:windowTitle - - let s:notifyWindow[bufName] = a:functionName - - "let g:notifyWindow = s:notifyWindow " Debug. - - " Start listening to events. - aug NotifyWindowClose - au! - au WinEnter * :call genutils#CheckWindowClose() - au BufEnter * :call genutils#CheckWindowClose() - aug END -endfunction - -function! genutils#RemoveNotifyWindowClose(windowTitle) - let bufName = a:windowTitle - - if has_key(s:notifyWindow, bufName) - call remove(s:notifyWindow, bufName) - if len(s:notifyWindow) == 0 - "unlet g:notifyWindow " Debug. - - aug NotifyWindowClose - au! - aug END - endif - endif -endfunction - -function! genutils#CheckWindowClose() - if !exists('s:notifyWindow') - return - endif - - " Now iterate over all the registered window titles and see which one's are - " closed. - for nextWin in keys(s:notifyWindow) - if bufwinnr(s:FindBufferForName(nextWin)) == -1 - let funcName = s:notifyWindow[nextWin] - " Remove this entry as these are going to be processed. The caller can add - " them back if needed. - unlet s:notifyWindow[nextWin] - "call input("cmd: " . cmd) - call call(funcName, [nextWin]) - endif - endfor -endfunction - -"function! NotifyWindowCloseF(title) -" call input(a:title . " closed") -"endfunction -" -"function! RunNotifyWindowCloseTest() -" call input("Creating three windows, 'ABC', 'XYZ' and 'b':") -" split ABC -" split X Y Z -" split b -" redraw -" call genutils#AddNotifyWindowClose("ABC", "NotifyWindowCloseF") -" call genutils#AddNotifyWindowClose("X Y Z", "NotifyWindowCloseF") -" call input("notifyWindow: " . string(s:notifyWindow)) -" au NotifyWindowClose WinEnter -" call input("Added notifications for 'ABC' and 'XYZ'\n". -" \ "Now closing the windows, you should see ONLY two notifications:") -" quit -" quit -" quit -"endfunction - -"" -"" --- END: Notify window close -- }}} -"" - -" TODO: For large ranges, the cmd can become too big, so make it one cmd per -" line. -function! genutils#ShowLinesWithSyntax() range - " This makes sure we start (subsequent) echo's on the first line in the - " command-line area. - " - echo '' - - let cmd = '' - let prev_group = ' x ' " Something that won't match any syntax group. - - let show_line = a:firstline - let isMultiLine = ((a:lastline - a:firstline) > 1) - while show_line <= a:lastline - let cmd = '' - let length = strlen(getline(show_line)) - let column = 1 - - while column <= length - let group = synIDattr(synID(show_line, column, 1), 'name') - if group != prev_group - if cmd != '' - let cmd = cmd . "'|" - endif - let cmd = cmd . 'echohl ' . (group == '' ? 'NONE' : group) . "|echon '" - let prev_group = group - endif - let char = strpart(getline(show_line), column - 1, 1) - if char == "'" - let char = "'."'".'" - endif - let cmd = cmd . char - let column = column + 1 - endwhile - - try - exec cmd."\n'" - catch - echo '' - endtry - let show_line = show_line + 1 - endwhile - echohl NONE -endfunction - - -function! genutils#AlignWordWithWordInPreviousLine() - "First go to the first col in the word. - if getline('.')[col('.') - 1] =~ '\s' - normal! w - else - normal! "_yiw - endif - let orgVcol = virtcol('.') - let prevLnum = prevnonblank(line('.') - 1) - if prevLnum == -1 - return - endif - let prevLine = getline(prevLnum) - - " First get the column to align with. - if prevLine[orgVcol - 1] =~ '\s' - " column starts from 1 where as index starts from 0. - let nonSpaceStrInd = orgVcol " column starts from 1 where as index starts from 0. - while prevLine[nonSpaceStrInd] =~ '\s' - let nonSpaceStrInd = nonSpaceStrInd + 1 - endwhile - else - if strlen(prevLine) < orgVcol - let nonSpaceStrInd = strlen(prevLine) - 1 - else - let nonSpaceStrInd = orgVcol - 1 - endif - - while prevLine[nonSpaceStrInd - 1] !~ '\s' && nonSpaceStrInd > 0 - let nonSpaceStrInd = nonSpaceStrInd - 1 - endwhile - endif - let newVcol = nonSpaceStrInd + 1 " Convert to column number. - - if orgVcol > newVcol " We need to reduce the spacing. - let sub = strpart(getline('.'), newVcol - 1, (orgVcol - newVcol)) - if sub =~ '^\s\+$' - " Remove the excess space. - exec 'normal! ' . newVcol . '|' - exec 'normal! ' . (orgVcol - newVcol) . 'x' - endif - elseif orgVcol < newVcol " We need to insert spacing. - exec 'normal! ' . orgVcol . '|' - exec 'normal! ' . (newVcol - orgVcol) . 'i ' - endif -endfunction - -function! genutils#ShiftWordInSpace(dir) - if a:dir == 1 " forward. - " If currently on ... - if getline(".")[col(".") - 1] == " " - let move1 = 'wf ' - else - " If next col is a - "if getline(".")[col(".") + 1] - let move1 = 'f ' - endif - let removeCommand = "x" - let pasteCommand = "bi " - let move2 = 'w' - let offset = 0 - else " backward. - " If currently on ... - if getline(".")[col(".") - 1] == " " - let move1 = 'w' - else - let move1 = '"_yiW' - endif - let removeCommand = "hx" - let pasteCommand = 'h"_yiwEa ' - let move2 = 'b' - let offset = -3 - endif - - let savedCol = col(".") - exec "normal!" move1 - let curCol = col(".") - let possible = 0 - " Check if there is a space at the end. - if col("$") == (curCol + 1) " Works only for forward case, as expected. - let possible = 1 - elseif getline(".")[curCol + offset] == " " - " Remove the space from here. - exec "normal!" removeCommand - let possible = 1 - endif - - " Move back into the word. - "exec "normal!" savedCol . "|" - if possible == 1 - exec "normal!" pasteCommand - exec "normal!" move2 - else - " Move to the original location. - exec "normal!" savedCol . "|" - endif -endfunction - - -function! genutils#CenterWordInSpace() - let line = getline('.') - let orgCol = col('.') - " If currently on ... - if line[orgCol - 1] == " " - let matchExpr = ' *\%'. orgCol . 'c *\w\+ \+' - else - let matchExpr = ' \+\(\w*\%' . orgCol . 'c\w*\) \+' - endif - let matchInd = match(line, matchExpr) - if matchInd == -1 - return - endif - let matchStr = matchstr(line, matchExpr) - let nSpaces = strlen(substitute(matchStr, '[^ ]', '', 'g')) - let word = substitute(matchStr, ' ', '', 'g') - let middle = nSpaces / 2 - let left = nSpaces - middle - let newStr = '' - while middle > 0 - let newStr = newStr . ' ' - let middle = middle - 1 - endwhile - let newStr = newStr . word - while left > 0 - let newStr = newStr . ' ' - let left = left - 1 - endwhile - - let newLine = strpart(line, 0, matchInd) - let newLine = newLine . newStr - let newLine = newLine . strpart (line, matchInd + strlen(matchStr)) - silent! keepjumps call setline(line('.'), newLine) -endfunction - -function! genutils#MapAppendCascaded(lhs, rhs, mapMode) - - " Determine the map mode from the map command. - let mapChar = strpart(a:mapMode, 0, 1) - - " Check if this is already mapped. - let oldrhs = maparg(a:lhs, mapChar) - if oldrhs != "" - let self = oldrhs - else - let self = a:lhs - endif - "echomsg a:mapMode . "oremap" . " " . a:lhs . " " . self . a:rhs - exec a:mapMode . "oremap" a:lhs self . a:rhs -endfunction - -" smartSlash simply says whether to depend on shellslash and ArgLead for -" determining path separator. If it shouldn't depend, it will always assume -" that the required pathsep is forward-slash. -function! genutils#UserFileComplete(ArgLead, CmdLine, CursorPos, smartSlash, - \ searchPath) - let glob = '' - let opathsep = "\\" - let npathsep = '/' - if exists('+shellslash') && ! &shellslash && a:smartSlash && - \ stridx(a:ArgLead, "\\") != -1 - let opathsep = '/' - let npathsep = "\\" - endif - if a:searchPath !=# '' - for nextPath in split(a:searchPath, genutils#CrUnProtectedCharsPattern(',')) - let nextPath = genutils#CleanupFileName(nextPath) - let matches = glob(nextPath.'/'.a:ArgLead.'*') - if matches !~# '^\_s*$' - let matches = s:FixPathSep(matches, opathsep, npathsep) - let nextPath = substitute(nextPath, opathsep, npathsep, 'g') - let matches = substitute(matches, '\V'.escape(nextPath.npathsep, "\\"), - \ '', 'g') - let glob = glob . matches . "\n" - endif - endfor - else - let glob = s:FixPathSep(glob(a:ArgLead.'*'), opathsep, npathsep) - endif - " FIXME: Need an option to control if ArgLead should also be returned or - " not. - return glob."\n".a:ArgLead -endfunction - -command! -complete=file -nargs=* GUDebugEcho :echo -function! genutils#UserFileExpand(fileArgs) - return substitute(genutils#GetVimCmdOutput( - \ 'GUDebugEcho ' . a:fileArgs), '^\_s\+\|\_s\+$', '', 'g') -endfunction - -function! s:FixPathSep(matches, opathsep, npathsep) - let matches = a:matches - let matches = substitute(matches, a:opathsep, a:npathsep, 'g') - let matches = substitute(matches, "\\([^\n]\\+\\)", '\=submatch(1).'. - \ '(isdirectory(submatch(1)) ? a:npathsep : "")', 'g') - return matches -endfunction - -function! genutils#GetVimCmdOutput(cmd) - let v:errmsg = '' - let output = '' - let _z = @z - let _shortmess = &shortmess - try - set shortmess= - redir @z - silent exec a:cmd - catch /.*/ - let v:errmsg = substitute(v:exception, '^[^:]\+:', '', '') - finally - redir END - let &shortmess = _shortmess - if v:errmsg == '' - let output = @z - endif - let @z = _z - endtry - return output -endfunction - -function! genutils#OptClearBuffer() - " Go as far as possible in the undo history to conserve Vim resources. - let _modifiable = &l:modifiable - let _undolevels = &undolevels - try - setl modifiable - set undolevels=-1 - silent! keepjumps 0,$delete _ - finally - let &undolevels = _undolevels - let &l:modifiable = _modifiable - endtry -endfunction - - -"" START: Sorting support. {{{ -"" - -" -" Comapare functions. -" - -function! genutils#CmpByLineLengthNname(line1, line2, ...) - let direction = (a:0?a:1:1) - let cmp = genutils#CmpByLength(a:line1, a:line2, direction) - if cmp == 0 - let cmp = genutils#CmpByString(a:line1, a:line2, direction) - endif - return cmp -endfunction - -function! genutils#CmpByLength(line1, line2, ...) - let direction = (a:0?a:1:1) - let len1 = strlen(a:line1) - let len2 = strlen(a:line2) - return direction * (len1 - len2) -endfunction - -" Compare first by name and then by length. -" Useful for sorting Java imports. -function! genutils#CmpJavaImports(line1, line2, ...) - let direction = (a:0?a:1:1) - " FIXME: Simplify this. - if stridx(a:line1, '.') == -1 - let pkg1 = '' - let cls1 = substitute(a:line1, '.* \(^[ ]\+\)', '\1', '') - else - let pkg1 = substitute(a:line1, '.*import\s\+\(.*\)\.[^. ;]\+.*$', '\1', '') - let cls1 = substitute(a:line1, '^.*\.\([^. ;]\+\).*$', '\1', '') - endif - if stridx(a:line2, '.') == -1 - let pkg2 = '' - let cls2 = substitute(a:line2, '.* \(^[ ]\+\)', '\1', '') - else - let pkg2 = substitute(a:line2, '.*import\s\+\(.*\)\.[^. ;]\+.*$', '\1', '') - let cls2 = substitute(a:line2, '^.*\.\([^. ;]\+\).*$', '\1', '') - endif - - let cmp = genutils#CmpByString(pkg1, pkg2, direction) - if cmp == 0 - let cmp = genutils#CmpByLength(cls1, cls2, direction) - endif - return cmp -endfunction - -function! genutils#CmpByString(line1, line2, ...) - let direction = (a:0?a:1:1) - if a:line1 < a:line2 - return -direction - elseif a:line1 > a:line2 - return direction - else - return 0 - endif -endfunction - -function! genutils#CmpByStringIgnoreCase(line1, line2, ...) - let direction = (a:0?a:1:1) - if a:line1 ? a:line2 - return direction - else - return 0 - endif -endfunction - -function! genutils#CmpByNumber(line1, line2, ...) - let direction = (a:0 ? a:1 :1) - let num1 = a:line1 + 0 - let num2 = a:line2 + 0 - - if num1 < num2 - return -direction - elseif num1 > num2 - return direction - else - return 0 - endif -endfunction - -function! genutils#QSort(cmp, direction) range - call s:QSortR(a:firstline, a:lastline, a:cmp, a:direction, - \ 's:BufLineAccessor', 's:BufLineSwapper', '') -endfunction - -function! genutils#QSort2(start, end, cmp, direction, accessor, swapper, context) - call s:QSortR(a:start, a:end, a:cmp, a:direction, a:accessor, a:swapper, - \ a:context) -endfunction - -" The default swapper that swaps lines in the current buffer. -function! s:BufLineSwapper(line1, line2, context) - let str2 = getline(a:line1) - silent! keepjumps call setline(a:line1, getline(a:line2)) - silent! keepjumps call setline(a:line2, str2) -endfunction - -" The default accessor that returns lines from the current buffer. -function! s:BufLineAccessor(line, context) - return getline(a:line) -endfunction - -" The default mover that moves lines from one place to another in the current -" buffer. -function! s:BufLineMover(from, to, context) - let line = getline(a:from) - exec a:from.'d_' - call append(a:to, line) -endfunction - -" -" Sort lines. QSortR() is called recursively. -" -function! s:QSortR(start, end, cmp, direction, accessor, swapper, context) - if a:end > a:start - let low = a:start - let high = a:end - - " Arbitrarily establish partition element at the midpoint of the data. - let midStr = {a:accessor}(((a:start + a:end) / 2), a:context) - - " Loop through the data until indices cross. - while low <= high - - " Find the first element that is greater than or equal to the partition - " element starting from the left Index. - while low < a:end - let result = {a:cmp}({a:accessor}(low, a:context), midStr, a:direction) - if result < 0 - let low = low + 1 - else - break - endif - endwhile - - " Find an element that is smaller than or equal to the partition element - " starting from the right Index. - while high > a:start - let result = {a:cmp}({a:accessor}(high, a:context), midStr, a:direction) - if result > 0 - let high = high - 1 - else - break - endif - endwhile - - " If the indexes have not crossed, swap. - if low <= high - " Swap lines low and high. - call {a:swapper}(high, low, a:context) - let low = low + 1 - let high = high - 1 - endif - endwhile - - " If the right index has not reached the left side of data must now sort - " the left partition. - if a:start < high - call s:QSortR(a:start, high, a:cmp, a:direction, a:accessor, a:swapper, - \ a:context) - endif - - " If the left index has not reached the right side of data must now sort - " the right partition. - if low < a:end - call s:QSortR(low, a:end, a:cmp, a:direction, a:accessor, a:swapper, - \ a:context) - endif - endif -endfunction - -function! genutils#BinSearchForInsert(start, end, line, cmp, direction) - return genutils#BinSearchForInsert2(a:start, a:end, a:line, a:cmp, - \ a:direction, 's:BufLineAccessor', '') -endfunction - -function! genutils#BinSearchForInsert2(start, end, line, cmp, direction, - \ accessor, context) - let start = a:start - 1 - let end = a:end - while start < end - let middle = (start + end + 1) / 2 - " Support passing both Funcref's as well as names. - if type(a:cmp) == 2 - if type(a:accessor) == 2 - let result = a:cmp(a:accessor(middle, a:context), a:line, a:direction) - else - let result = a:cmp({a:accessor}(middle, a:context), a:line, a:direction) - endif - else - if type(a:accessor) == 2 - let result = {a:cmp}(a:accessor(middle, a:context), a:line, a:direction) - else - let result = {a:cmp}({a:accessor}(middle, a:context), a:line, a:direction) - endif - endif - if result < 0 - let start = middle - else - let end = middle - 1 - endif - endwhile - return start -endfunction - -function! genutils#BinSearchList(list, start, end, item, cmp) - let start = a:start - 1 - let end = a:end - while start < end - let middle = (start + end + 1) / 2 - let result = call(a:cmp, [get(a:list, middle), a:item]) - if result < 0 - let start = middle - else - let end = middle - 1 - endif - endwhile - return start -endfunction - -function! genutils#BinInsertSort(cmp, direction) range - call genutils#BinInsertSort2(a:firstline, a:lastline, a:cmp, a:direction, - \ 's:BufLineAccessor', 's:BufLineMover', '') -endfunction - -function! genutils#BinInsertSort2(start, end, cmp, direction, accessor, mover, context) - let i = a:start + 1 - while i <= a:end - let low = s:BinSearchToAppend2(a:start, i, {a:accessor}(i, a:context), - \ a:cmp, a:direction, a:accessor, a:context) - " Move the object. - if low < i - call {a:mover}(i, low - 1, a:context) - endif - let i = i + 1 - endwhile -endfunction - -function! s:BinSearchToAppend(start, end, line, cmp, direction) - return s:BinSearchToAppend2(a:start, a:end, a:line, a:cmp, a:direction, - \ 's:BufLineAccessor', '') -endfunction - -function! s:BinSearchToAppend2(start, end, line, cmp, direction, accessor, - \ context) - let low = a:start - let high = a:end - while low < high - let mid = (low + high) / 2 - let diff = {a:cmp}({a:accessor}(mid, a:context), a:line, a:direction) - if diff > 0 - let high = mid - else - let low = mid + 1 - if diff == 0 - break - endif - endif - endwhile - return low -endfunction - -""" END: Sorting support. }}} - - -" Eats character if it matches the given pattern. -" -" Originally, -" From: Benji Fisher -" Date: Mon, 25 Mar 2002 15:05:14 -0500 -" -" Based on Bram's idea of eating a character while type to expand an -" abbreviation. This solves the problem with abbreviations, where we are -" left with an extra space after the expansion. -" Ex: -" inoreabbr \stdout\ System.out.println("");=genutils#EatChar('\s') -function! genutils#EatChar(pat) - let c = nr2char(getchar()) - "call input('Pattern: '.a:pat.' '. - " \ ((c =~ a:pat) ? 'Returning empty' : 'Returning: '.char2nr(c))) - return (c =~ a:pat) ? '' : c -endfun - - -" Can return a spacer from 0 to 80 characters width. -let s:spacer= " ". - \ " " -function! genutils#GetSpacer(width) - return strpart(s:spacer, 0, a:width) -endfunction - -function! genutils#SilentSubstitute(pat, cmd) - call genutils#SaveHardPosition('SilentSubstitute') - let _search = @/ - try - let @/ = a:pat - keepjumps silent! exec a:cmd - finally - let @/ = _search - call genutils#RestoreHardPosition('SilentSubstitute') - call genutils#ResetHardPosition('SilentSubstitute') - endtry -endfunction - -function! genutils#SilentDelete(arg1, ...) - " For backwards compatibility. - if a:0 - let range = a:arg1 - let pat = a:1 - else - let range = '' - let pat = a:arg1 - endif - let _search = @/ - call genutils#SaveHardPosition('SilentDelete') - try - let @/ = pat - keepjumps silent! exec range'g//d _' - finally - let @/ = _search - call genutils#RestoreHardPosition('SilentDelete') - call genutils#ResetHardPosition('SilentDelete') - endtry -endfunction - -" START: genutils#Roman2Decimal {{{ -let s:I = 1 -let s:V = 5 -let s:X = 10 -let s:L = 50 -let s:C = 100 -let s:D = 500 -let s:M = 1000 - -function! s:Char2Num(c) - " A bit of magic on empty strings - if a:c == "" - return 0 - endif - exec 'let n = s:' . toupper(a:c) - return n -endfun - -function! genutils#Roman2Decimal(str) - if a:str !~? '^[IVXLCDM]\+$' - return a:str - endif - let sum = 0 - let i = 0 - let n0 = s:Char2Num(a:str[i]) - let len = strlen(a:str) - while i < len - let i = i + 1 - let n1 = s:Char2Num(a:str[i]) - " Magic: n1=0 when i exceeds len - if n1 > n0 - let sum = sum - n0 - else - let sum = sum + n0 - endif - let n0 = n1 - endwhile - return sum -endfun -" END: genutils#Roman2Decimal }}} - - -" BEGIN: Relative path {{{ -function! genutils#CommonPath(path1, path2, ...) - let path1 = genutils#CleanupFileName(a:path1) . ((a:0 > 0 ? a:1 : 0) ? '/' : '') - let path2 = genutils#CleanupFileName(a:path2) . ((a:0 > 1 ? a:2 : 0) ? '/' : '') - return genutils#CommonString(path1, path2) -endfunction - -function! genutils#CommonString(str1, str2) - let str1 = a:str1 - let str2 = a:str2 - if str1 == str2 - return str1 - endif - let n = 0 - while str1[n] == str2[n] - let n = n+1 - endwhile - return strpart(str1, 0, n) -endfunction - -function! genutils#RelPathFromFile(srcFile, tgtFile) - return genutils#RelPathFromDir(fnamemodify(a:srcFile, ':h'), a:tgtFile) -endfunction - -function! genutils#RelPathFromDir(srcDir, tgtFile) - let cleanDir = genutils#CleanupFileName(a:srcDir).'/' - let cleanFile = genutils#CleanupFileName(a:tgtFile) - let cmnPath = genutils#CommonPath(cleanDir, cleanFile, 1) - let relDirFromCmnPath = strpart(cleanDir, strlen(cmnPath)) - if relDirFromCmnPath == '/' " This means the file is under the srcDir. - let relDirFromCmnPath = '' - endif - let relFileFromCmnPath = strpart(cleanFile, strlen(cmnPath)) - return substitute(relDirFromCmnPath, '[^/]\+', '..', 'g') . - \ relFileFromCmnPath -endfunction - -" END: Relative path }}} - - -" BEGIN: Persistent settings {{{ -if ! exists("g:genutilsNoPersist") || ! g:genutilsNoPersist - " Make sure the '!' option to store global variables that are upper cased are - " stored in viminfo file. - " Make sure it is the first option, so that it will not interfere with the - " 'n' option ("Todd J. Cosgrove" (todd dot cosgrove at softechnics dot - " com)). - " Also take care of empty value, when 'compatible' mode is on (Bram - " Moolenar) - if &viminfo == '' - set viminfo=!,'20,"50,h - else - set viminfo^=! - endif -endif - -function! genutils#PutPersistentVar(pluginName, persistentVar, value) - if ! exists("g:genutilsNoPersist") || ! g:genutilsNoPersist - let globalVarName = s:PersistentVarName(a:pluginName, a:persistentVar) - exec 'let ' . globalVarName . " = '" . a:value . "'" - endif -endfunction - -function! genutils#GetPersistentVar(pluginName, persistentVar, default) - if ! exists("g:genutilsNoPersist") || ! g:genutilsNoPersist - let globalVarName = s:PersistentVarName(a:pluginName, a:persistentVar) - if (exists(globalVarName)) - exec 'let value = ' . globalVarName - exec 'unlet ' . globalVarName - else - let value = a:default - endif - return value - else - return default - endif -endfunction - -function! s:PersistentVarName(pluginName, persistentVar) - return 'g:GU_' . toupper(a:pluginName) . '_' . toupper(a:persistentVar) -endfunction -" END: Persistent settings }}} - - -" FileChangedShell handling {{{ -if !exists('s:fcShellPreFuncs') - let s:fcShellPreFuncs = {} -endif - -function! genutils#AddToFCShellPre(funcName) - let s:fcShellPreFuncs[a:funcName] = a:funcName -endfunction - -function! genutils#RemoveFromFCShellPre(funcName) - if has_key(s:fcShellPreFuncs, a:funcName) - unlet s:fcShellPreFuncs[a:funcName] - endif -endfunction - -let s:defFCShellInstalled = 0 -function! genutils#DefFCShellInstall() - if ! s:defFCShellInstalled - aug DefFCShell - au! - au FileChangedShell * nested call genutils#DefFileChangedShell() - aug END - endif - let s:defFCShellInstalled = s:defFCShellInstalled + 1 -endfunction - -function! genutils#DefFCShellUninstall() - if s:defFCShellInstalled <= 0 - return - endif - let s:defFCShellInstalled = s:defFCShellInstalled - 1 - if ! s:defFCShellInstalled - aug DefFCShell - au! - aug END - endif -endfunction - -function! genutils#DefFileChangedShell() - let autoread = s:InvokeFuncs(s:fcShellPreFuncs) - let bufNo = expand('') + 0 - let fName = expand('') - let msg = '' - let v:fcs_choice = '' - if getbufvar(bufNo, '&modified') - let v:fcs_choice = 'ask' - elseif ! autoread - let v:fcs_choice = 'ask' - else - let v:fcs_choice = 'reload' - endif - return -endfunction - -function! s:InvokeFuncs(funcList) - let autoread = &autoread - if len(a:funcList) != 0 - for nextFunc in keys(a:funcList) - let result = call(nextFunc, []) - if result != -1 - let autoread = autoread || result - endif - endfor - endif - return autoread -endfunction -" FileChangedShell handling }}} - - -" Sign related utilities {{{ -function! genutils#CurLineHasSign() - let signs = genutils#GetVimCmdOutput('sign place buffer=' . bufnr('%'), 1) - return (match(signs, - \ 'line=' . line('.') . '\s\+id=\d\+\s\+name=VimBreakPt') != -1) -endfunction - -function! genutils#ClearAllSigns() - let signs = genutils#GetVimCmdOutput('sign place buffer=' . bufnr('%'), 1) - let curIdx = 0 - let pat = 'line=\d\+\s\+id=\zs\d\+\ze\s\+name=VimBreakPt' - let id = 0 - while curIdx != -1 && curIdx < strlen(signs) - let id = matchstr(signs, pat, curIdx) - if id != '' - exec 'sign unplace ' . id . ' buffer=' . bufnr('%') - endif - let curIdx = matchend(signs, pat, curIdx) - endwhile -endfunction -" }}} - -let s:UNPROTECTED_CHAR_PRFX = '\%(\%([^\\]\|^\)\\\%(\\\\\)*\)\@ 0?1:0) - let regex = s:UNPROTECTED_CHAR_PRFX - let chars = a:chars - if strlen(chars) > 1 - let chars = '['.chars.']' - endif - if capture - let chars = '\('.chars.'\)' - endif - return regex.chars -endfunction - -function! genutils#PromptForElement(array, default, msg, skip, useDialog, - \ nCols) - let nCols = a:nCols - let index = 0 - let line = "" - let element = "" - let optionsMsg = "" - let colWidth = &columns / nCols - 1 " Leave a margin of one column as a gap. - let curCol = 1 - let nElements = len(a:array) - let newArray = [] " Without the skip element. - if index(a:array, a:skip) != -1 - let nElements = nElements - 1 - endif - for element in a:array - if element ==# a:skip - continue - endif - call add(newArray, element) - let element = strpart(index." ", 0, 4) . element - let eleColWidth = (strlen(element) - 1) / colWidth + 1 - " Fill up the spacer for the rest of the partial column. - let element = element . genutils#GetSpacer( - \ eleColWidth * (colWidth + 1) - strlen(element) - 1) - let wouldBeLength = strlen(line) + strlen(element) + 1 - if wouldBeLength > (curCol * (colWidth + eleColWidth)) && - \ wouldBeLength > &columns - let splitLine = 2 " Split before adding the new element. - elseif curCol == nCols - let splitLine = 1 " Split after adding the new element. - else - let splitLine = 0 - endif - if splitLine == 2 - if strlen(line) == &columns - " Remove the last space as it otherwise results in an extra empty line - " on the screen. - let line = strpart(line, 0, strlen(line) - 1) - endif - let optionsMsg = optionsMsg . line . "\n" - let line = element . ' ' - let curCol = strlen(element) / (colWidth + 1) - else - let line = line . element . ' ' - if splitLine == 1 - if strlen(line) == &columns - " Remove the last space as it otherwise results in an extra empty line - " on the screen. - let line = strpart(line, 0, strlen(line) - 1) - endif - let curCol = 0 " Reset col count. - let optionsMsg = optionsMsg . line . "\n" - let line = "" - endif - endif - let curCol = curCol + 1 - let index = index + 1 - endfor - " Finally if there is anything left in line, then append that too. - if line.'' != '' - let optionsMsg = optionsMsg . line . "\n" - let line = "" - endif - - " Default index or empty string. - let default = '' - if type(a:default) == 0 - let default = a:default - elseif a:default.'' != '' - let default = index(a:array, a:default) - endif - if a:default == -1 - let default = '' - endif - - while !exists("selectedElement") - if a:useDialog - let s:selection = inputdialog(optionsMsg . a:msg, default) - else - let s:selection = input(optionsMsg . a:msg, default) - endif - if s:selection.'' == '' - let selectedElement = '' - let s:selection = -1 - else - let s:selection = (s:selection !~# '^\d\+$') ? -1 : (s:selection + 0) - if s:selection >= 0 && s:selection < nElements - let selectedElement = newArray[s:selection] - else - echohl ERROR | echo "\nInvalid selection, please try again" | - \ echohl NONE - endif - endif - echo "\n" - endwhile - return selectedElement -endfunction - -let s:selection = -1 -function! genutils#GetSelectedIndex() - return s:selection -endfunction - -" Always match() with 'ignorecase' and 'smartcase' off. -function! s:Match(expr, pat, start) - let _ic = &ignorecase - let _scs = &smartcase - let result = -1 - try - set noignorecase - set nosmartcase - let result = match(a:expr, a:pat, a:start) - finally - let &ignorecase = _ic - let &smartcase = _scs - endtry - return result -endfunction - -" Restore cpo. -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim6:fdm=marker et diff --git a/.vim/autoload/lookupfile.vim b/.vim/autoload/lookupfile.vim deleted file mode 100755 index 0f6332c..0000000 --- a/.vim/autoload/lookupfile.vim +++ /dev/null @@ -1,472 +0,0 @@ -" lookupfile.vim: See plugin/lookupfile.vim - -" Make sure line-continuations won't cause any problem. This will be restored -" at the end -let s:save_cpo = &cpo -set cpo&vim - -" Some onetime initialization of variables -if !exists('s:myBufNum') - let s:windowName = '[Lookup File]' - let s:myBufNum = -1 - let s:popupIsHidden = 0 -endif -let g:lookupfile#lastPattern = "" -let g:lookupfile#lastResults = [] -let g:lookupfile#lastStatsMsg = [] -let g:lookupfile#recentFiles = [] - -function! lookupfile#OpenWindow(bang, initPat) - let origWinnr = winnr() - let _isf = &isfname - let _splitbelow = &splitbelow - set nosplitbelow - try - if s:myBufNum == -1 - " Temporarily modify isfname to avoid treating the name as a pattern. - set isfname-=\ - set isfname-=[ - if exists('+shellslash') - call genutils#OpenWinNoEa("1sp \\\\". escape(s:windowName, ' ')) - else - call genutils#OpenWinNoEa("1sp \\". escape(s:windowName, ' ')) - endif - let s:myBufNum = bufnr('%') - else - let winnr = bufwinnr(s:myBufNum) - if winnr == -1 - call genutils#OpenWinNoEa('1sb '. s:myBufNum) - else - let wasVisible = 1 - exec winnr 'wincmd w' - endif - endif - finally - let &isfname = _isf - let &splitbelow = _splitbelow - endtry - - call s:SetupBuf() - let initPat = '' - if a:bang != '' - let initPat = '' - elseif a:initPat != '' - let initPat = a:initPat - elseif g:lookupfile#lastPattern != '' && g:LookupFile_PreserveLastPattern - let initPat = g:lookupfile#lastPattern - endif - $ - if getline('.') !=# initPat - silent! put='' - call setline('.', initPat) - endif - startinsert! - if !g:LookupFile_OnCursorMovedI - " This is a hack to bring up the popup immediately, while reopening the - " window, just for a better response. - aug LookupFileCursorHoldImm - au! - au CursorMovedI nested exec 'doautocmd LookupFile CursorHoldI' | - \ au! LookupFileCursorHoldImm - aug END - endif - call s:LookupFileSet() - aug LookupFileReset - au! - au CursorMovedI call LookupFileSet() - au CursorMoved call LookupFileSet() - au WinEnter call LookupFileSet() - au TabEnter call LookupFileSet() - au WinEnter * call LookupFileReset(0) - au TabEnter * call LookupFileReset(0) - au CursorMoved * call LookupFileReset(0) - " Better be safe than sorry. - au BufHidden call LookupFileReset(1) - aug END -endfunction - -function! lookupfile#CloseWindow() - if bufnr('%') != s:myBufNum - return - endif - - call s:LookupFileReset(1) - close -endfunction - -function! lookupfile#ClearCache() - let g:lookupfile#lastPattern = "" - let g:lookupfile#lastResults = [] -endfunction - -function! s:LookupFileSet() - if bufnr('%') != s:myBufNum || exists('s:_backspace') - return - endif - let s:_backspace = &backspace - set backspace=start - let s:_completeopt = &completeopt - set completeopt+=menuone - let s:_updatetime = &updatetime - let &updatetime = g:LookupFile_UpdateTime -endfunction - -function! s:LookupFileReset(force) - if a:force - aug LookupFileReset - au! - aug END - endif - " Ignore the event while in the same buffer. - if exists('s:_backspace') && (a:force || (bufnr('%') != s:myBufNum)) - let &backspace = s:_backspace - let &completeopt = s:_completeopt - let &updatetime = s:_updatetime - unlet s:_backspace s:_completeopt s:_updatetime - endif -endfunction - -function! s:HidePopup() - let s:popupIsHidden = 1 - return "\" -endfunction - -function! lookupfile#IsPopupHidden() - return s:popupIsHidden -endfunction - -function! s:SetupBuf() - call genutils#SetupScratchBuffer() - resize 1 - setlocal wrap - setlocal bufhidden=hide - setlocal winfixheight - setlocal wrapmargin=0 - setlocal textwidth=0 - setlocal completefunc=lookupfile#Complete - syn clear - set ft=lookupfile - " Setup maps to open the file. - inoremap HidePopup() - inoremap AcceptFile(0, "\") - inoremap AcceptFile(1, "\") - " This prevents the "Whole line completion" from getting triggered with , - " however this might make the dropdown kind of flash. - inoremap pumvisible()?"\\":"\" - inoremap pumvisible()?"\\":"\" - " Make behave just like - imap - if g:LookupFile_EscCancelsPopup - inoremap pumvisible()?"\\":"\" - endif - inoremap GetCommand(1, 1, "\", - \ "\"\\C-N>\"") - inoremap GetCommand(1, 1, "\", - \ "\"\\C-P>\"") - inoremap GetCommand(1, 0, - \ "\", '') - inoremap GetCommand(1, 0, - \ "\", '') - nnoremap o :OpenFile - nnoremap O :OpenFile! - command! -buffer -nargs=0 -bang OpenFile - \ :call OpenCurFile('' != '') - command! -buffer -nargs=0 -bang AddPattern :call AddPattern() - nnoremap LookupFile :call lookupfile#CloseWindow() - inoremap LookupFile :call lookupfile#CloseWindow() - - aug LookupFile - au! - if g:LookupFile_ShowFiller - exec 'au' (g:LookupFile_OnCursorMovedI ? 'CursorMovedI' : 'CursorHoldI') - \ ' call ShowFiller()' - endif - exec 'au' (g:LookupFile_OnCursorMovedI ? 'CursorMovedI' : 'CursorHoldI') - \ ' call lookupfile#LookupFile(0)' - aug END -endfunction - -function! s:GetCommand(withPopupTrigger, withSkipPat, actCmd, innerCmd) - let cmd = '' - if a:withPopupTrigger && !pumvisible() - let cmd .= "\\" - endif - let cmd .= a:actCmd. "\=(getline('.') == lookupfile#lastPattern) ? ". - \ a:innerCmd." : ''\" - return cmd -endfunction - -function! s:AddPattern() - if g:LookupFile_PreservePatternHistory - silent! put! =g:lookupfile#lastPattern - $ - endif -endfunction - -function! s:AcceptFile(splitWin, key) - if s:popupIsHidden - return a:key - endif - if !pumvisible() - call lookupfile#LookupFile(0, 1) - endif - let acceptCmd = '' - if type(g:LookupFile_LookupAcceptFunc) == 2 || - \ (type(g:LookupFile_LookupAcceptFunc) == 1 && - \ substitute(g:LookupFile_LookupAcceptFunc, '\s', '', 'g') != '') - let acceptCmd = call(g:LookupFile_LookupAcceptFunc, [a:splitWin, a:key]) - else - let acceptCmd = lookupfile#AcceptFile(a:splitWin, a:key) - endif - - return (!pumvisible() ? "\\" : '').acceptCmd -endfunction - -function! s:IsValid(fileName) - if bufnr('%') != s:myBufNum || a:fileName == '' - return 0 - endif - if !filereadable(a:fileName) && !isdirectory(a:fileName) - if g:LookupFile_AllowNewFiles - " Check if the parent directory exists, then we can create a new buffer - " (Ido feature) - let parent = fnamemodify(a:fileName, ':h') - if parent == '' || (parent != '' && !isdirectory(parent)) - return 1 - endif - endif - return 0 - endif - return 1 -endfunction - -function! lookupfile#AcceptFile(splitWin, key) - if len(g:lookupfile#lastResults) == 0 && !s:IsValid(getline('.')) - return "\:echohl ErrorMsg | echo 'No such file or directory' | echohl NONE\" - endif - - " Skip the first match, which is essentially the same as pattern. - let nextCmd = "\\=(getline('.') == lookupfile#lastPattern)?\"\\\":''\" - let acceptCmd = "\\:AddPattern\:OpenFile".(a:splitWin?'!':''). - \ "\" - if getline('.') ==# g:lookupfile#lastPattern - if len(g:lookupfile#lastResults) == 0 - " FIXME: shouldn't this be an error? - let acceptCmd = acceptCmd - elseif len(g:lookupfile#lastResults) == 1 || g:LookupFile_AlwaysAcceptFirst - " If there is only one file, we will also select it (if not already - " selected) - let acceptCmd = nextCmd.acceptCmd - else - let acceptCmd = nextCmd - endif - endif - - return acceptCmd -endfunction - -function! s:OpenCurFile(splitWin) - let fileName = getline('.') - if fileName =~ '^\s*$' - return - endif - if !s:IsValid(fileName) - echohl ErrorMsg | echo 'No such file or directory' | echohl NONE - endif - - if type(g:LookupFile_LookupNotifyFunc) == 2 || - \ (type(g:LookupFile_LookupNotifyFunc) == 1 && - \ substitute(g:LookupFile_LookupNotifyFunc, '\s', '', 'g') != '') - call call(g:LookupFile_LookupNotifyFunc, []) - endif - call lookupfile#CloseWindow() - - " Update the recent files list. - if g:LookupFile_RecentFileListSize > 0 - let curPos = index(g:lookupfile#recentFiles, fileName) - call add(g:lookupfile#recentFiles, fileName) - if curPos != -1 - call remove(g:lookupfile#recentFiles, curPos) - elseif len(g:lookupfile#recentFiles) > g:LookupFile_RecentFileListSize - let g:lookupfile#recentFiles = g:lookupfile#recentFiles[ - \ -g:LookupFile_RecentFileListSize :] - endif - endif - - let bufnr = genutils#FindBufferForName(fileName) - let winnr = bufwinnr(bufnr) - if winnr == -1 && g:LookupFile_SearchForBufsInTabs - for i in range(tabpagenr('$')) - if index(tabpagebuflist(i+1), bufnr) != -1 - " Switch to the tab and set winnr. - exec 'tabnext' (i+1) - let winnr = bufwinnr(bufnr) - endif - endfor - endif - if winnr != -1 - exec winnr.'wincmd w' - else - let splitOpen = 0 - if &switchbuf ==# 'split' || a:splitWin - let splitOpen = 1 - endif - " First try opening as a buffer, if it fails, we will open as a file. - try - if bufnr == -1 - throw '' - endif - exec (splitOpen?'s':'').'buffer' bufnr - catch /^Vim\%((\a\+)\)\=:E325/ - " Ignore, this anyway means the file was found. - catch - try - exec (splitOpen?'split':'edit') fileName - catch /^Vim\%((\a\+)\)\=:E325/ - " Ignore, this anyway means the file was found. - endtry - endtry - endif -endfunction - -function! s:ShowFiller() - return lookupfile#LookupFile(1) -endfunction - -function! lookupfile#Complete(findstart, base) - if a:findstart - return 0 - else - call lookupfile#LookupFile(0, 1, a:base) - return g:lookupfile#lastStatsMsg+g:lookupfile#lastResults - endif -endfunction - -function! lookupfile#LookupFile(showingFiller, ...) - let generateMode = (a:0 == 0 ? 0 : a:1) - if generateMode - let pattern = (a:0 > 1) ? a:2 : getline('.') - else - let pattern = getline('.') - " The normal completion behavior is to stop completion when cursor is moved. - if col('.') == 1 || (col('.') != col('$')) - return '' - endif - endif - if pattern == '' || (pattern ==# g:lookupfile#lastPattern && pumvisible()) - return '' - endif - - if s:popupIsHidden && g:lookupfile#lastPattern ==# pattern - return '' - endif - let s:popupIsHidden = 0 - - let statusMsg = '' - if pattern == ' ' - if len(g:lookupfile#recentFiles) == 0 - let statusMsg = '<<< No recent files >>>' - let files = [] - else - let statusMsg = '<<< Showing '.len(g:lookupfile#recentFiles).' recent files >>>' - let files = reverse(copy(g:lookupfile#recentFiles)) - endif - elseif strlen(pattern) < g:LookupFile_MinPatLength - let statusMsg = '<<< Type at least '.g:LookupFile_MinPatLength. - \ ' characters >>>' - let files = [] - " We ignore filler when we have the result in hand. - elseif g:lookupfile#lastPattern ==# pattern - " This helps at every startup as we start with the previous pattern. - let files = g:lookupfile#lastResults - elseif a:showingFiller - " Just show a filler and return. We could return this as the only match, but - " unless 'completeopt' has "menuone", menu doesn't get shown. - let statusMsg = '<<< Looking up files... hit ^C to break >>>' - let files = [] - else - if type(g:LookupFile_LookupFunc) == 2 || - \ (type(g:LookupFile_LookupFunc) == 1 && - \ substitute(g:LookupFile_LookupFunc, '\s', '', 'g') != '') - let files = call(g:LookupFile_LookupFunc, [pattern]) - else - let _tags = &tags - try - let &tags = eval(g:LookupFile_TagExpr) - let taglist = taglist(g:LookupFile_TagsExpandCamelCase ? - \ lookupfile#ExpandCamelCase(pattern) : pattern) - catch - echohl ErrorMsg | echo "Exception: " . v:exception | echohl NONE - return '' - finally - let &tags = _tags - endtry - - " Show the matches for what is typed so far. - if g:LookupFile_UsingSpecializedTags - let files = map(taglist, '{'. - \ '"word": fnamemodify(v:val["filename"], ":p"), '. - \ '"abbr": v:val["name"], '. - \ '"menu": fnamemodify(v:val["filename"], ":h"), '. - \ '"dup": 1, '. - \ '}') - else - let files = map(taglist, 'fnamemodify(v:val["filename"], ":p")') - endif - endif - - let pat = g:LookupFile_FileFilter - if pat != '' - call filter(files, '(type(v:val) == 4) ? v:val["word"] !~ pat : v:val !~ pat') - endif - - if g:LookupFile_SortMethod ==# 'alpha' - " When UsingSpecializedTags, sort by the actual name (Timothy, Guo - " (firemeteor dot guo at gmail dot com)). - if type(get(files, 0)) == 4 - call sort(files, "s:CmpByName") - else - call sort(files) - endif - endif - let g:lookupfile#lastPattern = pattern - let g:lookupfile#lastResults = files - endif - if statusMsg == '' - if len(files) > 0 - let statusMsg = '<<< '.len(files).' Matching >>>' - else - let statusMsg = '<<< None Matching >>>' - endif - endif - let msgLine = [{'word': pattern, 'abbr': statusMsg, 'menu': pattern}] - let g:lookupfile#lastStatsMsg = msgLine - if !generateMode - call complete(1, msgLine+files) - endif - return '' -endfunction - -function! lookupfile#ExpandCamelCase(str) - let pat = a:str - " Check if there are at least two consecutive uppercase letters to turn on - " the CamelCase expansion. - if match(a:str, '\u\u') != -1 - let pat = '\C'.substitute(a:str, '\u\+', - \ '\=substitute(submatch(0), ".", '."'".'&\\U*'."'".', "g")', 'g') - let @*=pat - endif - return pat -endfunction - -function! s:CmpByName(i1, i2) - let ileft = a:i1["abbr"] - let iright = a:i2["abbr"] - return ileft == iright ? 0 : ileft > iright ? 1 : -1 -endfunc - -" Restore cpo. -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim6:fdm=marker et sw=2 diff --git a/.vim/autoload/objc/cocoacomplete.vim b/.vim/autoload/objc/cocoacomplete.vim deleted file mode 100644 index 2c53f1e..0000000 --- a/.vim/autoload/objc/cocoacomplete.vim +++ /dev/null @@ -1,215 +0,0 @@ -" File: cocoacomplete.vim (part of the cocoa.vim plugin) -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Last Updated: June 30, 2009 -" Description: An omni-completion plugin for Cocoa/Objective-C. - -let s:lib_dir = fnameescape($HOME.'/.vim/lib/') -let s:cocoa_indexes = s:lib_dir.'cocoa_indexes/' - -if !isdirectory(s:cocoa_indexes) - echom 'Error in cocoacomplete.vim: could not find ~/.vim/lib/cocoa_indexes directory' -endif - -fun! objc#cocoacomplete#Complete(findstart, base) - if a:findstart - " Column where completion starts: - return match(getline('.'), '\k\+\%'.col('.').'c') - else - let matches = [] - let complete_type = s:GetCompleteType(line('.'), col('.') - 1) - - if complete_type == 'methods' - call s:Complete(a:base, ['alloc', 'init', 'retain', 'release', - \ 'autorelease', 'retainCount', - \ 'description', 'class', 'superclass', - \ 'self', 'zone', 'isProxy', 'hash']) - let obj_pos = s:GetObjPos(line('.'), col('.')) - call extend(matches, s:CompleteMethod(line('.'), obj_pos, a:base)) - elseif complete_type == 'types' || complete_type == 'returntypes' - let opt_types = complete_type == 'returntypes' ? ['IBAction'] : [] - call s:Complete(a:base, opt_types + ['void', 'id', 'BOOL', 'int', - \ 'double', 'float', 'char']) - call extend(matches, s:CompleteCocoa(a:base, 'classes', 'types', - \ 'notifications')) - elseif complete_type != '' - if complete_type =~ 'function_params$' - let complete_type = substitute(complete_type, 'function_params$', '', '') - let functions = s:CompleteFunction(a:base) - endif - - " Mimic vim's dot syntax for other complete types (see :h ft). - let word = a:base == '' ? 'NS' : a:base - let args = [word] + split(complete_type, '\.') - call extend(matches, call('s:CompleteCocoa', args)) - - " List functions after the other items in the menu. - if exists('functions') | call extend(matches, functions) | endif - endif - return matches - endif -endf - -fun s:GetCompleteType(lnum, col) - let scopelist = map(synstack(a:lnum, a:col), 'synIDattr(v:val, "name")') - if empty(scopelist) | return 'types' | endif - - let current_scope = scopelist[-1] - let beforeCursor = strpart(getline(a:lnum), 0, a:col) - - " Completing a function name: - if getline(a:lnum) =~ '\%'.(a:col + 1).'c\s*(' - return 'functions' - elseif current_scope == 'objcSuperclass' - return 'classes' - " Inside brackets "[ ... ]": - elseif index(scopelist, 'objcMessage') != -1 - return beforeCursor =~ '\[\k*$' ? 'classes' : 'methods' - " Inside parentheses "( ... )": - elseif current_scope == 'cParen' - " Inside parentheses for method definition: - if beforeCursor =~ '^\s*[-+]\s*([^{;]*' - return beforeCursor =~ '^\s*[-+]\s*([^)]*$' ? 'returntypes' : 'types' - " Inside function, loop, or conditional: - else - return 'classes.types.constants.function_params' - endif - " Inside braces "{ ... }" or after equals "=": - elseif current_scope == 'cBlock' || current_scope == 'objcAssign' || current_scope == '' - let type = current_scope == 'cBlock' ? 'types.constants.' : '' - let type = 'classes.'.type.'function_params' - - if beforeCursor =~ 'IBOutlet' | return 'classes' | endif - return beforeCursor =~ '\v(^|[{};=\])]|return)\s*\k*$'? type : 'methods' - " Directly inside "@implementation ... @end" or "@interface ... @end" - elseif current_scope == 'objcImp' || current_scope == 'objcHeader' - " TODO: Complete delegate/subclass methods - endif - return '' -endf - -" Adds item to the completion menu if they match the base. -fun s:Complete(base, items) - for item in a:items - if item =~ '^'.a:base | call complete_add(item) | endif - endfor -endf - -" Returns position of "foo" in "[foo bar]" or "[baz bar: [foo bar]]". -fun s:GetObjPos(lnum, col) - let beforeCursor = strpart(getline(a:lnum), 0, a:col) - return match(beforeCursor, '\v.*(^|[\[=;])\s*\[*\zs[A-Za-z0-9_@]+') + 1 -endf - -" Completes a method given the position of the object and the method -" being completed. -fun s:CompleteMethod(lnum, col, method) - let class = s:GetCocoaClass(a:lnum, a:col) - if class == '' - let object = matchstr(getline(a:lnum), '\%'.a:col.'c\k\+') - let class = s:GetDeclWord(object) - if class == '' | return [] | endif - endif - let method = s:GetMethodName(a:lnum, a:col, a:method) - let matches = split(system(s:lib_dir.'get_methods.sh '.class. - \ '|grep "^'.method.'"'), "\n") - if exists('g:loaded_snips') " Use snipMate if it's installed - call objc#pum_snippet#Map() - else " Otherwise, only complete the method name. - call map(matches, 'substitute(v:val, ''\v:\zs.{-}\ze(\w+:|$)'', " ", "g")') - endif - - " If dealing with a partial method name, only complete past it. E.g., in - " "[NSString stringWithCharacters:baz l|]" (where | is the cursor), - " only return "length", not "stringWithCharacters:length:". - if stridx(method, ':') != -1 - let method = substitute(method, a:method.'$', '\\\\zs&', '') - call map(matches, 'matchstr(v:val, "'.method.'.*")') - endif - return matches -endf - -" Returns the Cocoa class at a given position if it exists, or -" an empty string "" if it doesn't. -fun s:GetCocoaClass(lnum, col) - let class = matchstr(getline(a:lnum), '\%'.a:col.'c[A-Za-z0-9_"@]\+') - if class =~ '^@"' | return 'NSString' | endif " Treat @"..." as an NSString - let v:errmsg = '' - sil! hi cocoaClass - if v:errmsg == '' && synIDattr(synID(a:lnum, a:col, 0), 'name') == 'cocoaClass' - return class " If cocoaClass is defined, try using that. - endif - return system('grep ^'.class.' '.s:cocoa_indexes.'classes.txt') != '' - \ ? class : '' " Use grep as a fallback. -endf - -" Returns the word before a variable declaration. -fun s:GetDeclWord(var) - let startpos = [line('.'), col('.')] - let line_found = searchdecl(a:var) != 0 ? 0 : line('.') - call cursor(startpos) - let matchstr = '\v(IBOutlet\s+)=\zs\k+\s*\ze\**\s*' - - " If the declaration was not found in the implementation file, check - " the header. - if !line_found && expand('%:e') == 'm' - let header_path = expand('%:p:r').'.h' - if filereadable(header_path) - for line in readfile(header_path) - if line =~ '^\s*\(IBOutlet\)\=\s*\k*\s*\ze\**\s*'.a:var.'\s*' - return matchstr(line, matchstr) - endif - endfor - return '' - endif - endif - - return matchstr(getline(line_found), matchstr.a:var) -endf - -fun s:SearchList(list, regex) - for line in a:list - if line =~ a:regex - return line - endif - endfor - return '' -endf - -" Returns the method name, ready to be searched by grep. -" The "base" word needs to be passed in separately, because -" Vim apparently removes it from the line during completions. -fun s:GetMethodName(lnum, col, base) - let line = getline(a:lnum) - let col = matchend(line, '\%'.a:col.'c\S\+\s\+') + 1 " Skip past class name. - if line =~ '\%'.col.'c\k\+:' - let base = a:base == '' ? '' : ' '.a:base - let method = matchstr(line, '\%'.col.'c.\{-}\ze]').base - return substitute(method, '\v\k+:\zs.{-}\ze(\s*\k+:|'.base.'$)', '[^:]*', 'g') - else - return a:base - endif -endf - -" Completes Cocoa functions, using snippets for the parameters if possible. -fun s:CompleteFunction(word) - let files = s:cocoa_indexes.'functions.txt' " TODO: Add C functions. - let matches = split(system('zgrep -h "^'.a:word.'" '.files), "\n") - if exists('g:loaded_snips') " Use snipMate if it's installed - call objc#pum_snippet#Map() - else " Otherwise, just complete the function name - call map(matches, "{'word':matchstr(v:val, '^\\k\\+'), 'abbr':v:val}") - endif - return matches -endf - -" Completes word for Cocoa "classes", "types", "notifications", or "constants". -" (supplied as the optional parameters). -fun s:CompleteCocoa(word, file, ...) - let files = '' - for file in [a:file] + a:000 - let files .= ' '.s:cocoa_indexes.file.'.txt' - endfor - - return split(system('grep -ho "^'.a:word.'[A-Za-z0-9_]*" '.files), "\n") -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/autoload/objc/man.vim b/.vim/autoload/objc/man.vim deleted file mode 100644 index 8fffa29..0000000 --- a/.vim/autoload/objc/man.vim +++ /dev/null @@ -1,160 +0,0 @@ -" File: objc#man.vim (part of the cocoa.vim plugin) -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Description: Allows you to look up Cocoa API docs in Vim. -" Last Updated: June 30, 2009 -" NOTE: See http://mymacinations.com/2008/02/06/changing-the-systems-default-settings-for-html-files-safe/ -" for removing the annoying security alert in Leopard. - -" Return all matches in for ":CocoaDoc " sorted by length. -fun objc#man#Completion(ArgLead, CmdLine, CursorPos) - return system('grep -ho "^'.a:ArgLead.'\w*" ~/.vim/lib/cocoa_indexes/*.txt'. - \ "| perl -e 'print sort {length $a <=> length $b} <>'") -endf - -let s:docsets = [] -for path in ['/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset', - \ '/Developer/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiPhone3_0.iPhoneLibrary.docset'] - if isdirectory(path) - call add(s:docsets, path) - endif -endfor - -let s:docset_cmd = '/Developer/usr/bin/docsetutil search -skip-text -query ' - -fun s:OpenFile(file) - if a:file =~ '/.*/man/' - exe ':!'.substitute(&kp, '^man -s', 'man', '').' '.a:file - else - " /usr/bin/open strips the #fragments in file:// URLs, which we need, - " so I'm using applescript instead. - call system('osascript -e ''open location "file://'.a:file.'"'' &') - endif -endf - -fun objc#man#ShowDoc(...) - let word = a:0 ? a:1 : matchstr(getline('.'), '\<\w*\%'.col('.').'c\w\+:\=') - - " Look up the whole method if it takes multiple arguments. - if !a:0 && word[len(word) - 1] == ':' - let word = s:GetMethodName() - endif - - if word == '' - if !a:0 " Mimic K if using it as such - echoh ErrorMsg - echo 'E349: No identifier under cursor' - echoh None - endif - return - endif - - let references = {} - - " First check Cocoa docs for word using docsetutil - for docset in s:docsets - let response = split(system(s:docset_cmd.word.' '.docset), "\n") - let docset .= '/Contents/Resources/Documents/' " Actual path of files - for line in response - " Format string is: " Language/type/class/word path" - let path = matchstr(line, '\S*$') - if path[0] != '/' | let path = docset.path | endif - if has_key(references, path) | continue | endif " Ignore duplicate entries - - let [lang, type, class] = split(matchstr(line, '^ \zs*\S*'), '/')[:2] - " If no class if given use type instead - if class == '-' | let class = type | endif - let references[path] = {'lang': lang, 'class': class} - endfor - endfor - - " Then try man - let man = system('man -S2:3 -aW '.word) - if man !~ '^No manual entry' - for path in split(man, "\n") - if !has_key(references, path) - let references[path] = {'lang': 'C', 'class': 'man'} - endif - endfor - endif - - if len(references) == 1 - return s:OpenFile(keys(references)[0]) - elseif !empty(references) - echoh ModeMsg | echo word | echoh None - return s:ChooseFrom(references) - else - echoh WarningMsg - echo "Can't find documentation for ".word - echoh None - endif -endf - -fun s:ChooseFrom(references) - let type_abbr = {'cl' : 'Class', 'intf' : 'Protocol', 'cat' : 'Category', - \ 'intfm' : 'Method', 'instm' : 'Method', 'econst' : 'Enum', - \ 'tdef' : 'Typedef', 'macro' : 'Macro', 'data' : 'Data', - \ 'func' : 'Function'} - let inputlist = [] - " Don't display "Objective-C" if all items are objc - let show_lang = !AllKeysEqual(values(a:references), 'lang', 'Objective-C') - let i = 1 - for ref in values(a:references) - let class = ref.class - if has_key(type_abbr, class) | let class = type_abbr[class] | endif - call add(inputlist, i.'. '.(show_lang ? ref['lang'].' ' : '').class) - let i += 1 - endfor - let num = inputlist(inputlist) - return num ? s:OpenFile(keys(a:references)[num - 1]) : -1 -endf - -fun AllKeysEqual(list, key, item) - for item in a:list - if item[a:key] != a:item - return 0 - endif - endfor - return 1 -endf - -fun s:GetMethodName() - let pos = [line('.'), col('.')] - let startpos = searchpos('\v^\s*-.{-}\w+:|\[\s*\w+\s+\w+:|\]\s*\w+:', 'cbW') - - " Method declaration (- (foo) bar:) - if getline(startpos[0]) =~ '^\s*-.\{-}\w\+:' - let endpos = searchpos('{', 'W') - " Message inside brackets ([foo bar: baz]) - else - let endpos = searchpairpos('\[', '', '\]', 'W') - endif - call cursor(pos) - - if startpos[0] == 0 || endpos[0] == 0 | return '' | endif - let lines = getline(startpos[0], endpos[0]) - - let lines[0] = strpart(lines[0], startpos[1] - 1) - let lines[-1] = strpart(lines[-1], 0, endpos[1]) - - " Ignore outer brackets - let message = substitute(join(lines), '^\[\|\]$', '', '') - " Ignore nested messages [...] - let message = substitute(message, '\[.\{-}\]', '', 'g') - " Ignore strings (could contain colons) - let message = substitute(message, '".\{-}"', '', 'g') - " Ignore @selector(...) - let message = substitute(message, '@selector(.\{-})', '', 'g') - - return s:MatchAll(message, '\w\+:') -endf - -fun s:MatchAll(haystack, needle) - let matches = matchstr(a:haystack, a:needle) - let index = matchend(a:haystack, a:needle) - while index != -1 - let matches .= matchstr(a:haystack, a:needle, index + 1) - let index = matchend(a:haystack, a:needle, index + 1) - endw - return matches -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/autoload/objc/method_builder.vim b/.vim/autoload/objc/method_builder.vim deleted file mode 100644 index 999d38b..0000000 --- a/.vim/autoload/objc/method_builder.vim +++ /dev/null @@ -1,124 +0,0 @@ -" File: objc#method_builder.vim (part of the cocoa.vim plugin) -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Description: Builds an empty implementation (*.m) file given a header (*.h) -" file. When called with no arguments (simply ":BuildMethods"), -" it looks for the corresponding header file of the current *.m -" file (e.g. "foo.m" -> "foo.h"). -" Last Updated: June 03, 2009 -" - make sure you're not in a comment - -" TODO: Relative pathnames -fun objc#method_builder#Completion(ArgLead, CmdLine, CursorPos) - let dir = stridx(a:ArgLead, '/') == -1 ? getcwd() : fnamemodify(a:ArgLead, ':h') - let search = fnamemodify(a:ArgLead, ':t') - let files = split(glob(dir.'/'.search.'*.h') - \ ."\n".glob(dir.'/'.search.'*/'), "\n") - call map(files, 'fnameescape(fnamemodify(v:val, ":."))') - return files -endf - -fun s:Error(msg) - echoh ErrorMsg | echo a:msg | echoh None - return -1 -endf - -fun s:GetDeclarations(file) - let header = readfile(a:file) - let template = [] - let in_comment = 0 - let in_header = 0 - let looking_for_semi = 0 - - for line in header - if in_comment - if stridx(line, '*/') != -1 | let in_comment = 0 | endif - continue " Ignore declarations inside multi-line comments - elseif stridx(line, '/*') != -1 - let in_comment = 1 | continue - endif - - if stridx(line, '@interface') != -1 - let in_header = 1 - let template += ['@implementation'.matchstr(line, '@interface\zs\s\+\w\+'), ''] - continue - elseif in_header && stridx(line, '@end') != -1 - let in_header = 0 - call add(template, '@end') - break " Only process one @interface at a time, for now. - endif - if !in_header | continue | endif - - let first_char = strpart(line, 0, 1) - if first_char == '-' || first_char == '+' || looking_for_semi - let semi_pos = stridx(line, ';') - let looking_for_semi = semi_pos == -1 - if looking_for_semi - call add(template, line) - else - call add(template, strpart(line, 0, semi_pos)) - let template += ['{', "\t", '}', ''] - endif - endif - endfor - return template -endf - -fun objc#method_builder#Build(header) - let headerfile = a:header == '' ? expand('%:p:r').'.h' : a:header - if expand('%:e') != 'm' - return s:Error('Not in an implementation file.') - elseif !filereadable(headerfile) - return s:Error('Could not read header file.') - endif - - let declarations = s:GetDeclarations(headerfile) - - if empty(declarations) - return s:Error('Header file has no method declarations!') - endif - - let len = len(declarations) - let last_change = line('.') - - if search('\V'.substitute(declarations[0], '\s\+', '\\s\\+', '')) - if !searchpair('@implementation', '', '@end', 'W') - return s:Error('Missing @end declaration.') - endif - let i = 2 " Skip past the @implementation line & blank line - let len -= 1 " Skip past @end declaration - let lnum = line('.') - 1 - else - let i = 0 - let lnum = line('.') - endif - let start_line = lnum - - while i < len - let is_method = declarations[i][0] =~ '@\|+\|-' - if !is_method || !search('\V'.substitute(escape(declarations[i], '\'), - \ 'void\|IBAction', '\\(void\\|IBAction\\)', 'g'), 'n') - call append(lnum, declarations[i]) - let lnum += 1 - if is_method | let last_change = lnum | endif - else " Skip method declaration if it is already declared. - if declarations[i][0] == '@' - let i += 1 - else - while declarations[i] != '}' && i < len - let i += 1 - endw - let i += 1 - endif - endif - let i += 1 - endw - call cursor(last_change, 1) - - if lnum == start_line - echoh WarningMsg - let class = matchstr(declarations[0], '@implementation\s\+\zs.*') - echo 'The methods for the "'.class.'" class have already been declared.' - echoh None - endif -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/autoload/objc/method_list.vim b/.vim/autoload/objc/method_list.vim deleted file mode 100644 index 5c7246a..0000000 --- a/.vim/autoload/objc/method_list.vim +++ /dev/null @@ -1,115 +0,0 @@ -" File: objc#method_list.vim (part of the cocoa.vim plugin) -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Description: Opens a split window containing the methods of the current file. -" Last Updated: July 13, 2009 - -au WinLeave Method\ List callLeaveMethodList() -au WinEnter Method\ List call objc#method_list#Activate(0) - -fun objc#method_list#Activate(update) - let s:opt = {'is':&is, 'hls': &hls} " Save current options. - let s:last_search = @/ - set is nohls - " If methodlist has already been opened, reactivate it. - if exists('s:mlist_buffer') && bufexists(s:mlist_buffer) - let mlist_win = bufwinnr(s:mlist_buffer) - if mlist_win == -1 - sil exe 'belowright sbuf '.s:mlist_buffer - if a:update | call s:UpdateMethodList() | endif - elseif winbufnr(2) == -1 - quit " If no other windows are open, close the method list automatically. - else " If method list is out of focus, bring it back into focus. - exe mlist_win.'winc w' - endif - else " Otherwise, create the method list. - call s:CreateMethodList() - call s:UpdateMethodList() - endif -endf - -fun s:CreateMethodList() - botright new - - let s:sortPref = 0 - let s:mlist_buffer = bufnr('%') - - sil file Method\ List - setl bt=nofile bh=wipe noswf nobl nonu nowrap syn=objc - syn match objcPragmark '^[^-+@].*$' - hi objcPragmark gui=italic term=underline - - nn :calSelectMethod() - nn q q - nn p p - nm l p - nm <2-leftmouse> -endf - -" Returns the lines of all the matches in a dictionary -fun s:GetAllMatches(needle) - let startpos = [line('.'), col('.')] - call cursor(1, 1) - - let results = {} - let line = search(a:needle, 'Wc') - let key = matchstr(getline(line), a:needle) - if !s:InComment(line, 1) && key != '' - let results[key] = line - endif - - while 1 - let line = search(a:needle, 'W') - if !line | break | endif - let key = matchstr(getline(line), a:needle) - if !s:InComment(line, 1) && key != '' - let results[key] = line - endif - endw - - call cursor(startpos) - return results -endf - -fun s:InComment(line, col) - return stridx(synIDattr(synID(a:line, a:col, 0), 'name'), 'omment') != -1 -endf - -fun s:UpdateMethodList() - winc p " Go to source file window - let s:methods = s:GetAllMatches('^\v(\@(implementation|interface) \w+|'. - \ '\s*(\+|-).*|#pragma\s+mark\s+\zs.+)') - winc p " Go to method window - - if empty(s:methods) - winc q - echoh WarningMsg - echo 'There are no methods in this file!' - echoh None - return - endif - - call setline(1, sort(keys(s:methods), 's:SortByLineNum')) - exe "norm! \".line('$').'_' -endf - -fun s:SortByLineNum(i1, i2) - let line1 = s:methods[a:i1] - let line2 = s:methods[a:i2] - return line1 == line2 ? 0 : line1 > line2 ? 1 : -1 -endf - -fun s:SelectMethod() - let number = s:methods[getline('.')] - winc q - winc p - call cursor(number, 1) -endf - -fun s:LeaveMethodList() - for [option, value] in items(s:opt) - exe 'let &'.option.'='.value - endfor - let @/ = s:last_search == '' ? '' : s:last_search - unl s:opt s:last_search -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/autoload/objc/pum_snippet.vim b/.vim/autoload/objc/pum_snippet.vim deleted file mode 100644 index 3ee2907..0000000 --- a/.vim/autoload/objc/pum_snippet.vim +++ /dev/null @@ -1,87 +0,0 @@ -" File: pum_snippet.vim -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Last Updated: June 12, 2009 -" Description: Uses snipMate to jump through function or method objc -" parameters when autocompleting. Used in cocoacomplete.vim. - -" This function is invoked whenever pum_snippet is to be used; the keys are -" only mapped when used as the trigger, and then immediately unmapped to avoid -" breaking abbreviations, as well as other things. -fun! objc#pum_snippet#Map() - ino =objc#pum_snippet#Trigger(' ') - if !exists('g:SuperTabMappingForward') " Only map tab if not using supertab. - \ || (g:SuperTabMappingForward != '' && g:SuperTabMappingForward != '') - ino =objc#pum_snippet#Trigger("\t") - endif - ino =objc#pum_snippet#Trigger("\n") - let s:start = col('.') - " Completion menu can only be detected when the popup menu is visible, so - " 'menuone' needs to be temporarily set: - let s:cot = &cot - set cot+=menuone -endf - -fun! objc#pum_snippet#Unmap() - call s:UnmapKey('') - call s:UnmapKey('') - call s:UnmapKey('') -endf - -fun s:UnmapKey(key) - if maparg(a:key, 'i') =~? '^=objc#pum_snippet#Trigger(' - sil exe 'iunmap '.a:key - endif -endf - -fun! objc#pum_snippet#Trigger(key) - call objc#pum_snippet#Unmap() - if pumvisible() - let line = getline('.') - let col = col('.') - let word = matchstr(line, '\%'.s:start.'c\k\+(.\{-})\%'.col.'c') - if word != '' - let ConvertWord = function('s:ConvertFunction') - elseif match(line, '\%'.s:start.'c\k\+[^()]*:[^()]*\%'.col.'c') != -1 - let word = matchstr(line, '\%'.s:start.'c\k\+[^()]*\%'.col.'c') - let ConvertWord = function('s:ConvertMethod') - endif - if word != '' - call s:ResetOptions() - let col -= len(word) - sil exe 's/\V'.escape(word, '\/').'\%#//' - return snipMate#expandSnip(ConvertWord(word), col) - endif - endif - call s:ResetOptions() - return a:key -endf - -fun s:ResetOptions() - let &cot = s:cot - unl s:start s:cot -endf - -fun s:ConvertFunction(function) - let name = matchstr(a:function, '^\k\+') - let params = matchstr(a:function, '^\k\+(\zs.*') - let snippet = name.'('.substitute(params, '\v(.{-1})(, |\))', '${0:\1}\2', 'g').'${0}' - return s:OrderSnippet(snippet) -endf - -fun s:ConvertMethod(method) - if stridx(a:method, ':') == -1 | return a:method | endif - let snippet = substitute(a:method, '\v\k+:\zs.{-}\ze(\s*\k+:|$)', '${0:&}', 'g') - return s:OrderSnippet(snippet) -endf - -" Converts "${0} foo ${0} bar ..." to "${1} foo ${2} bar", etc. -fun s:OrderSnippet(snippet) - let snippet = a:snippet - let i = 1 - while stridx(snippet, '${0') != -1 - let snippet = substitute(snippet, '${0', '${'.i, '') - let i += 1 - endw - return snippet -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/autoload/pathogen.vim b/.vim/autoload/pathogen.vim deleted file mode 100644 index 16c21fe..0000000 --- a/.vim/autoload/pathogen.vim +++ /dev/null @@ -1,328 +0,0 @@ -" pathogen.vim - path option manipulation -" Maintainer: Tim Pope -" Version: 2.2 - -" Install in ~/.vim/autoload (or ~\vimfiles\autoload). -" -" For management of individually installed plugins in ~/.vim/bundle (or -" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your -" .vimrc is the only other setup necessary. -" -" The API is documented inline below. For maximum ease of reading, -" :set foldmethod=marker - -if exists("g:loaded_pathogen") || &cp - finish -endif -let g:loaded_pathogen = 1 - -function! s:warn(msg) - if &verbose - echohl WarningMsg - echomsg a:msg - echohl NONE - endif -endfunction - -" Point of entry for basic default usage. Give a relative path to invoke -" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke -" pathogen#surround(). For backwards compatibility purposes, a full path that -" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() -" instead. -function! pathogen#infect(...) abort " {{{1 - for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}'] - if path =~# '^[^\\/]\+$' - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#incubate(path . '/{}') - elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$' - call pathogen#incubate(path) - elseif path =~# '[\\/]\%({}\|\*\)$' - call pathogen#surround(path) - else - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#surround(path . '/{}') - endif - endfor - call pathogen#cycle_filetype() - return '' -endfunction " }}}1 - -" Split a path into a list. -function! pathogen#split(path) abort " {{{1 - if type(a:path) == type([]) | return a:path | endif - let split = split(a:path,'\\\@"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags')) - helptags `=dir.'/doc'` - endif - endfor - endfor -endfunction " }}}1 - -command! -bar Helptags :call pathogen#helptags() - -" Execute the given command. This is basically a backdoor for --remote-expr. -function! pathogen#execute(...) abort " {{{1 - for command in a:000 - execute command - endfor - return '' -endfunction " }}}1 - -" Like findfile(), but hardcoded to use the runtimepath. -function! pathogen#runtime_findfile(file,count) abort "{{{1 - let rtp = pathogen#join(1,pathogen#split(&rtp)) - let file = findfile(a:file,rtp,a:count) - if file ==# '' - return '' - else - return fnamemodify(file,':p') - endif -endfunction " }}}1 - -" Backport of fnameescape(). -function! pathogen#fnameescape(string) abort " {{{1 - if exists('*fnameescape') - return fnameescape(a:string) - elseif a:string ==# '-' - return '\-' - else - return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','') - endif -endfunction " }}}1 - -if exists(':Vedit') - finish -endif - -let s:vopen_warning = 0 - -function! s:find(count,cmd,file,lcd) " {{{1 - let rtp = pathogen#join(1,pathogen#split(&runtimepath)) - let file = pathogen#runtime_findfile(a:file,a:count) - if file ==# '' - return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" - endif - if !s:vopen_warning - let s:vopen_warning = 1 - let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' - else - let warning = '' - endif - if a:lcd - let path = file[0:-strlen(a:file)-2] - execute 'lcd `=path`' - return a:cmd.' '.pathogen#fnameescape(a:file) . warning - else - return a:cmd.' '.pathogen#fnameescape(file) . warning - endif -endfunction " }}}1 - -function! s:Findcomplete(A,L,P) " {{{1 - let sep = pathogen#separator() - let cheats = { - \'a': 'autoload', - \'d': 'doc', - \'f': 'ftplugin', - \'i': 'indent', - \'p': 'plugin', - \'s': 'syntax'} - if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) - let request = cheats[a:A[0]].a:A[1:-1] - else - let request = a:A - endif - let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' - let found = {} - for path in pathogen#split(&runtimepath) - let path = expand(path, ':p') - let matches = split(glob(path.sep.pattern),"\n") - call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') - call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') - for match in matches - let found[match] = 1 - endfor - endfor - return sort(keys(found)) -endfunction " }}}1 - -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) - -" vim:set et sw=2: diff --git a/.vim/autoload/plug.vim b/.vim/autoload/plug.vim deleted file mode 100644 index 9c3011f..0000000 --- a/.vim/autoload/plug.vim +++ /dev/null @@ -1,2812 +0,0 @@ -" vim-plug: Vim plugin manager -" ============================ -" -" Download plug.vim and put it in ~/.vim/autoload -" -" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ -" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -" -" Edit your .vimrc -" -" call plug#begin('~/.vim/plugged') -" -" " Make sure you use single quotes -" -" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align -" Plug 'junegunn/vim-easy-align' -" -" " Any valid git URL is allowed -" Plug 'https://github.com/junegunn/vim-github-dashboard.git' -" -" " Multiple Plug commands can be written in a single line using | separators -" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' -" -" " On-demand loading -" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } -" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } -" -" " Using a non-default branch -" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } -" -" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) -" Plug 'fatih/vim-go', { 'tag': '*' } -" -" " Plugin options -" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } -" -" " Plugin outside ~/.vim/plugged with post-update hook -" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -" -" " Unmanaged plugin (manually installed and updated) -" Plug '~/my-prototype-plugin' -" -" " Initialize plugin system -" call plug#end() -" -" Then reload .vimrc and :PlugInstall to install plugins. -" -" Plug options: -" -"| Option | Description | -"| ----------------------- | ------------------------------------------------ | -"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use | -"| `rtp` | Subdirectory that contains Vim plugin | -"| `dir` | Custom directory for the plugin | -"| `as` | Use different name for the plugin | -"| `do` | Post-update hook (string or funcref) | -"| `on` | On-demand loading: Commands or ``-mappings | -"| `for` | On-demand loading: File types | -"| `frozen` | Do not update unless explicitly specified | -" -" More information: https://github.com/junegunn/vim-plug -" -" -" Copyright (c) 2017 Junegunn Choi -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be -" included in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -if exists('g:loaded_plug') - finish -endif -let g:loaded_plug = 1 - -let s:cpo_save = &cpo -set cpo&vim - -let s:plug_src = 'https://github.com/junegunn/vim-plug.git' -let s:plug_tab = get(s:, 'plug_tab', -1) -let s:plug_buf = get(s:, 'plug_buf', -1) -let s:mac_gui = has('gui_macvim') && has('gui_running') -let s:is_win = has('win32') -let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win) -let s:vim8 = has('patch-8.0.0039') && exists('*job_start') -if s:is_win && &shellslash - set noshellslash - let s:me = resolve(expand(':p')) - set shellslash -else - let s:me = resolve(expand(':p')) -endif -let s:base_spec = { 'branch': '', 'frozen': 0 } -let s:TYPE = { -\ 'string': type(''), -\ 'list': type([]), -\ 'dict': type({}), -\ 'funcref': type(function('call')) -\ } -let s:loaded = get(s:, 'loaded', {}) -let s:triggers = get(s:, 'triggers', {}) - -function! s:is_powershell(shell) - return a:shell =~# 'powershell\(\.exe\)\?$' || a:shell =~# 'pwsh\(\.exe\)\?$' -endfunction - -function! s:isabsolute(dir) abort - return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') -endfunction - -function! s:git_dir(dir) abort - let gitdir = s:trim(a:dir) . '/.git' - if isdirectory(gitdir) - return gitdir - endif - if !filereadable(gitdir) - return '' - endif - let gitdir = matchstr(get(readfile(gitdir), 0, ''), '^gitdir: \zs.*') - if len(gitdir) && !s:isabsolute(gitdir) - let gitdir = a:dir . '/' . gitdir - endif - return isdirectory(gitdir) ? gitdir : '' -endfunction - -function! s:git_origin_url(dir) abort - let gitdir = s:git_dir(a:dir) - let config = gitdir . '/config' - if empty(gitdir) || !filereadable(config) - return '' - endif - return matchstr(join(readfile(config)), '\[remote "origin"\].\{-}url\s*=\s*\zs\S*\ze') -endfunction - -function! s:git_revision(dir) abort - let gitdir = s:git_dir(a:dir) - let head = gitdir . '/HEAD' - if empty(gitdir) || !filereadable(head) - return '' - endif - - let line = get(readfile(head), 0, '') - let ref = matchstr(line, '^ref: \zs.*') - if empty(ref) - return line - endif - - if filereadable(gitdir . '/' . ref) - return get(readfile(gitdir . '/' . ref), 0, '') - endif - - if filereadable(gitdir . '/packed-refs') - for line in readfile(gitdir . '/packed-refs') - if line =~# ' ' . ref - return matchstr(line, '^[0-9a-f]*') - endif - endfor - endif - - return '' -endfunction - -function! s:git_local_branch(dir) abort - let gitdir = s:git_dir(a:dir) - let head = gitdir . '/HEAD' - if empty(gitdir) || !filereadable(head) - return '' - endif - let branch = matchstr(get(readfile(head), 0, ''), '^ref: refs/heads/\zs.*') - return len(branch) ? branch : 'HEAD' -endfunction - -function! s:git_origin_branch(spec) - if len(a:spec.branch) - return a:spec.branch - endif - - " The file may not be present if this is a local repository - let gitdir = s:git_dir(a:spec.dir) - let origin_head = gitdir.'/refs/remotes/origin/HEAD' - if len(gitdir) && filereadable(origin_head) - return matchstr(get(readfile(origin_head), 0, ''), - \ '^ref: refs/remotes/origin/\zs.*') - endif - - " The command may not return the name of a branch in detached HEAD state - let result = s:lines(s:system('git symbolic-ref --short HEAD', a:spec.dir)) - return v:shell_error ? '' : result[-1] -endfunction - -if s:is_win - function! s:plug_call(fn, ...) - let shellslash = &shellslash - try - set noshellslash - return call(a:fn, a:000) - finally - let &shellslash = shellslash - endtry - endfunction -else - function! s:plug_call(fn, ...) - return call(a:fn, a:000) - endfunction -endif - -function! s:plug_getcwd() - return s:plug_call('getcwd') -endfunction - -function! s:plug_fnamemodify(fname, mods) - return s:plug_call('fnamemodify', a:fname, a:mods) -endfunction - -function! s:plug_expand(fmt) - return s:plug_call('expand', a:fmt, 1) -endfunction - -function! s:plug_tempname() - return s:plug_call('tempname') -endfunction - -function! plug#begin(...) - if a:0 > 0 - let s:plug_home_org = a:1 - let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p')) - elseif exists('g:plug_home') - let home = s:path(g:plug_home) - elseif has('nvim') - let home = stdpath('data') . '/plugged' - elseif !empty(&rtp) - let home = s:path(split(&rtp, ',')[0]) . '/plugged' - else - return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.') - endif - if s:plug_fnamemodify(home, ':t') ==# 'plugin' && s:plug_fnamemodify(home, ':h') ==# s:first_rtp - return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.') - endif - - let g:plug_home = home - let g:plugs = {} - let g:plugs_order = [] - let s:triggers = {} - - call s:define_commands() - return 1 -endfunction - -function! s:define_commands() - command! -nargs=+ -bar Plug call plug#() - if !executable('git') - return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') - endif - if has('win32') - \ && &shellslash - \ && (&shell =~# 'cmd\(\.exe\)\?$' || s:is_powershell(&shell)) - return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') - endif - if !has('nvim') - \ && (has('win32') || has('win32unix')) - \ && !has('multi_byte') - return s:err('Vim needs +multi_byte feature on Windows to run shell commands. Enable +iconv for best results.') - endif - command! -nargs=* -bar -bang -complete=customlist,s:names PlugInstall call s:install(0, []) - command! -nargs=* -bar -bang -complete=customlist,s:names PlugUpdate call s:update(0, []) - command! -nargs=0 -bar -bang PlugClean call s:clean(0) - command! -nargs=0 -bar PlugUpgrade if s:upgrade() | execute 'source' s:esc(s:me) | endif - command! -nargs=0 -bar PlugStatus call s:status() - command! -nargs=0 -bar PlugDiff call s:diff() - command! -nargs=? -bar -bang -complete=file PlugSnapshot call s:snapshot(0, ) -endfunction - -function! s:to_a(v) - return type(a:v) == s:TYPE.list ? a:v : [a:v] -endfunction - -function! s:to_s(v) - return type(a:v) == s:TYPE.string ? a:v : join(a:v, "\n") . "\n" -endfunction - -function! s:glob(from, pattern) - return s:lines(globpath(a:from, a:pattern)) -endfunction - -function! s:source(from, ...) - let found = 0 - for pattern in a:000 - for vim in s:glob(a:from, pattern) - execute 'source' s:esc(vim) - let found = 1 - endfor - endfor - return found -endfunction - -function! s:assoc(dict, key, val) - let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) -endfunction - -function! s:ask(message, ...) - call inputsave() - echohl WarningMsg - let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) - echohl None - call inputrestore() - echo "\r" - return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 -endfunction - -function! s:ask_no_interrupt(...) - try - return call('s:ask', a:000) - catch - return 0 - endtry -endfunction - -function! s:lazy(plug, opt) - return has_key(a:plug, a:opt) && - \ (empty(s:to_a(a:plug[a:opt])) || - \ !isdirectory(a:plug.dir) || - \ len(s:glob(s:rtp(a:plug), 'plugin')) || - \ len(s:glob(s:rtp(a:plug), 'after/plugin'))) -endfunction - -function! plug#end() - if !exists('g:plugs') - return s:err('plug#end() called without calling plug#begin() first') - endif - - if exists('#PlugLOD') - augroup PlugLOD - autocmd! - augroup END - augroup! PlugLOD - endif - let lod = { 'ft': {}, 'map': {}, 'cmd': {} } - - if get(g:, 'did_load_filetypes', 0) - filetype off - endif - for name in g:plugs_order - if !has_key(g:plugs, name) - continue - endif - let plug = g:plugs[name] - if get(s:loaded, name, 0) || !s:lazy(plug, 'on') && !s:lazy(plug, 'for') - let s:loaded[name] = 1 - continue - endif - - if has_key(plug, 'on') - let s:triggers[name] = { 'map': [], 'cmd': [] } - for cmd in s:to_a(plug.on) - if cmd =~? '^.\+' - if empty(mapcheck(cmd)) && empty(mapcheck(cmd, 'i')) - call s:assoc(lod.map, cmd, name) - endif - call add(s:triggers[name].map, cmd) - elseif cmd =~# '^[A-Z]' - let cmd = substitute(cmd, '!*$', '', '') - if exists(':'.cmd) != 2 - call s:assoc(lod.cmd, cmd, name) - endif - call add(s:triggers[name].cmd, cmd) - else - call s:err('Invalid `on` option: '.cmd. - \ '. Should start with an uppercase letter or ``.') - endif - endfor - endif - - if has_key(plug, 'for') - let types = s:to_a(plug.for) - if !empty(types) - augroup filetypedetect - call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') - augroup END - endif - for type in types - call s:assoc(lod.ft, type, name) - endfor - endif - endfor - - for [cmd, names] in items(lod.cmd) - execute printf( - \ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "", , , , %s)', - \ cmd, string(cmd), string(names)) - endfor - - for [map, names] in items(lod.map) - for [mode, map_prefix, key_prefix] in - \ [['i', '', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']] - execute printf( - \ '%snoremap %s %s:call lod_map(%s, %s, %s, "%s")', - \ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix) - endfor - endfor - - for [ft, names] in items(lod.ft) - augroup PlugLOD - execute printf('autocmd FileType %s call lod_ft(%s, %s)', - \ ft, string(ft), string(names)) - augroup END - endfor - - call s:reorg_rtp() - filetype plugin indent on - if has('vim_starting') - if has('syntax') && !exists('g:syntax_on') - syntax enable - end - else - call s:reload_plugins() - endif -endfunction - -function! s:loaded_names() - return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') -endfunction - -function! s:load_plugin(spec) - call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') -endfunction - -function! s:reload_plugins() - for name in s:loaded_names() - call s:load_plugin(g:plugs[name]) - endfor -endfunction - -function! s:trim(str) - return substitute(a:str, '[\/]\+$', '', '') -endfunction - -function! s:version_requirement(val, min) - for idx in range(0, len(a:min) - 1) - let v = get(a:val, idx, 0) - if v < a:min[idx] | return 0 - elseif v > a:min[idx] | return 1 - endif - endfor - return 1 -endfunction - -function! s:git_version_requirement(...) - if !exists('s:git_version') - let s:git_version = map(split(split(s:system(['git', '--version']))[2], '\.'), 'str2nr(v:val)') - endif - return s:version_requirement(s:git_version, a:000) -endfunction - -function! s:progress_opt(base) - return a:base && !s:is_win && - \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' -endfunction - -function! s:rtp(spec) - return s:path(a:spec.dir . get(a:spec, 'rtp', '')) -endfunction - -if s:is_win - function! s:path(path) - return s:trim(substitute(a:path, '/', '\', 'g')) - endfunction - - function! s:dirpath(path) - return s:path(a:path) . '\' - endfunction - - function! s:is_local_plug(repo) - return a:repo =~? '^[a-z]:\|^[%~]' - endfunction - - " Copied from fzf - function! s:wrap_cmds(cmds) - let cmds = [ - \ '@echo off', - \ 'setlocal enabledelayedexpansion'] - \ + (type(a:cmds) == type([]) ? a:cmds : [a:cmds]) - \ + ['endlocal'] - if has('iconv') - if !exists('s:codepage') - let s:codepage = libcallnr('kernel32.dll', 'GetACP', 0) - endif - return map(cmds, printf('iconv(v:val."\r", "%s", "cp%d")', &encoding, s:codepage)) - endif - return map(cmds, 'v:val."\r"') - endfunction - - function! s:batchfile(cmd) - let batchfile = s:plug_tempname().'.bat' - call writefile(s:wrap_cmds(a:cmd), batchfile) - let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) - if s:is_powershell(&shell) - let cmd = '& ' . cmd - endif - return [batchfile, cmd] - endfunction -else - function! s:path(path) - return s:trim(a:path) - endfunction - - function! s:dirpath(path) - return substitute(a:path, '[/\\]*$', '/', '') - endfunction - - function! s:is_local_plug(repo) - return a:repo[0] =~ '[/$~]' - endfunction -endif - -function! s:err(msg) - echohl ErrorMsg - echom '[vim-plug] '.a:msg - echohl None -endfunction - -function! s:warn(cmd, msg) - echohl WarningMsg - execute a:cmd 'a:msg' - echohl None -endfunction - -function! s:esc(path) - return escape(a:path, ' ') -endfunction - -function! s:escrtp(path) - return escape(a:path, ' ,') -endfunction - -function! s:remove_rtp() - for name in s:loaded_names() - let rtp = s:rtp(g:plugs[name]) - execute 'set rtp-='.s:escrtp(rtp) - let after = globpath(rtp, 'after') - if isdirectory(after) - execute 'set rtp-='.s:escrtp(after) - endif - endfor -endfunction - -function! s:reorg_rtp() - if !empty(s:first_rtp) - execute 'set rtp-='.s:first_rtp - execute 'set rtp-='.s:last_rtp - endif - - " &rtp is modified from outside - if exists('s:prtp') && s:prtp !=# &rtp - call s:remove_rtp() - unlet! s:middle - endif - - let s:middle = get(s:, 'middle', &rtp) - let rtps = map(s:loaded_names(), 's:rtp(g:plugs[v:val])') - let afters = filter(map(copy(rtps), 'globpath(v:val, "after")'), '!empty(v:val)') - let rtp = join(map(rtps, 'escape(v:val, ",")'), ',') - \ . ','.s:middle.',' - \ . join(map(afters, 'escape(v:val, ",")'), ',') - let &rtp = substitute(substitute(rtp, ',,*', ',', 'g'), '^,\|,$', '', 'g') - let s:prtp = &rtp - - if !empty(s:first_rtp) - execute 'set rtp^='.s:first_rtp - execute 'set rtp+='.s:last_rtp - endif -endfunction - -function! s:doautocmd(...) - if exists('#'.join(a:000, '#')) - execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '' : '') join(a:000) - endif -endfunction - -function! s:dobufread(names) - for name in a:names - let path = s:rtp(g:plugs[name]) - for dir in ['ftdetect', 'ftplugin', 'after/ftdetect', 'after/ftplugin'] - if len(finddir(dir, path)) - if exists('#BufRead') - doautocmd BufRead - endif - return - endif - endfor - endfor -endfunction - -function! plug#load(...) - if a:0 == 0 - return s:err('Argument missing: plugin name(s) required') - endif - if !exists('g:plugs') - return s:err('plug#begin was not called') - endif - let names = a:0 == 1 && type(a:1) == s:TYPE.list ? a:1 : a:000 - let unknowns = filter(copy(names), '!has_key(g:plugs, v:val)') - if !empty(unknowns) - let s = len(unknowns) > 1 ? 's' : '' - return s:err(printf('Unknown plugin%s: %s', s, join(unknowns, ', '))) - end - let unloaded = filter(copy(names), '!get(s:loaded, v:val, 0)') - if !empty(unloaded) - for name in unloaded - call s:lod([name], ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - endfor - call s:dobufread(unloaded) - return 1 - end - return 0 -endfunction - -function! s:remove_triggers(name) - if !has_key(s:triggers, a:name) - return - endif - for cmd in s:triggers[a:name].cmd - execute 'silent! delc' cmd - endfor - for map in s:triggers[a:name].map - execute 'silent! unmap' map - execute 'silent! iunmap' map - endfor - call remove(s:triggers, a:name) -endfunction - -function! s:lod(names, types, ...) - for name in a:names - call s:remove_triggers(name) - let s:loaded[name] = 1 - endfor - call s:reorg_rtp() - - for name in a:names - let rtp = s:rtp(g:plugs[name]) - for dir in a:types - call s:source(rtp, dir.'/**/*.vim') - endfor - if a:0 - if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) - execute 'runtime' a:1 - endif - call s:source(rtp, a:2) - endif - call s:doautocmd('User', name) - endfor -endfunction - -function! s:lod_ft(pat, names) - let syn = 'syntax/'.a:pat.'.vim' - call s:lod(a:names, ['plugin', 'after/plugin'], syn, 'after/'.syn) - execute 'autocmd! PlugLOD FileType' a:pat - call s:doautocmd('filetypeplugin', 'FileType') - call s:doautocmd('filetypeindent', 'FileType') -endfunction - -function! s:lod_cmd(cmd, bang, l1, l2, args, names) - call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - call s:dobufread(a:names) - execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args) -endfunction - -function! s:lod_map(map, names, with_prefix, prefix) - call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin']) - call s:dobufread(a:names) - let extra = '' - while 1 - let c = getchar(0) - if c == 0 - break - endif - let extra .= nr2char(c) - endwhile - - if a:with_prefix - let prefix = v:count ? v:count : '' - let prefix .= '"'.v:register.a:prefix - if mode(1) == 'no' - if v:operator == 'c' - let prefix = "\" . prefix - endif - let prefix .= v:operator - endif - call feedkeys(prefix, 'n') - endif - call feedkeys(substitute(a:map, '^', "\", '') . extra) -endfunction - -function! plug#(repo, ...) - if a:0 > 1 - return s:err('Invalid number of arguments (1..2)') - endif - - try - let repo = s:trim(a:repo) - let opts = a:0 == 1 ? s:parse_options(a:1) : s:base_spec - let name = get(opts, 'as', s:plug_fnamemodify(repo, ':t:s?\.git$??')) - let spec = extend(s:infer_properties(name, repo), opts) - if !has_key(g:plugs, name) - call add(g:plugs_order, name) - endif - let g:plugs[name] = spec - let s:loaded[name] = get(s:loaded, name, 0) - catch - return s:err(repo . ' ' . v:exception) - endtry -endfunction - -function! s:parse_options(arg) - let opts = copy(s:base_spec) - let type = type(a:arg) - let opt_errfmt = 'Invalid argument for "%s" option of :Plug (expected: %s)' - if type == s:TYPE.string - if empty(a:arg) - throw printf(opt_errfmt, 'tag', 'string') - endif - let opts.tag = a:arg - elseif type == s:TYPE.dict - for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as'] - if has_key(a:arg, opt) - \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) - throw printf(opt_errfmt, opt, 'string') - endif - endfor - for opt in ['on', 'for'] - if has_key(a:arg, opt) - \ && type(a:arg[opt]) != s:TYPE.list - \ && (type(a:arg[opt]) != s:TYPE.string || empty(a:arg[opt])) - throw printf(opt_errfmt, opt, 'string or list') - endif - endfor - if has_key(a:arg, 'do') - \ && type(a:arg.do) != s:TYPE.funcref - \ && (type(a:arg.do) != s:TYPE.string || empty(a:arg.do)) - throw printf(opt_errfmt, 'do', 'string or funcref') - endif - call extend(opts, a:arg) - if has_key(opts, 'dir') - let opts.dir = s:dirpath(s:plug_expand(opts.dir)) - endif - else - throw 'Invalid argument type (expected: string or dictionary)' - endif - return opts -endfunction - -function! s:infer_properties(name, repo) - let repo = a:repo - if s:is_local_plug(repo) - return { 'dir': s:dirpath(s:plug_expand(repo)) } - else - if repo =~ ':' - let uri = repo - else - if repo !~ '/' - throw printf('Invalid argument: %s (implicit `vim-scripts'' expansion is deprecated)', repo) - endif - let fmt = get(g:, 'plug_url_format', 'https://git::@github.com/%s.git') - let uri = printf(fmt, repo) - endif - return { 'dir': s:dirpath(g:plug_home.'/'.a:name), 'uri': uri } - endif -endfunction - -function! s:install(force, names) - call s:update_impl(0, a:force, a:names) -endfunction - -function! s:update(force, names) - call s:update_impl(1, a:force, a:names) -endfunction - -function! plug#helptags() - if !exists('g:plugs') - return s:err('plug#begin was not called') - endif - for spec in values(g:plugs) - let docd = join([s:rtp(spec), 'doc'], '/') - if isdirectory(docd) - silent! execute 'helptags' s:esc(docd) - endif - endfor - return 1 -endfunction - -function! s:syntax() - syntax clear - syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber - syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX - syn match plugNumber /[0-9]\+[0-9.]*/ contained - syn match plugBracket /[[\]]/ contained - syn match plugX /x/ contained - syn match plugDash /^-\{1}\ / - syn match plugPlus /^+/ - syn match plugStar /^*/ - syn match plugMessage /\(^- \)\@<=.*/ - syn match plugName /\(^- \)\@<=[^ ]*:/ - syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ - syn match plugTag /(tag: [^)]\+)/ - syn match plugInstall /\(^+ \)\@<=[^:]*/ - syn match plugUpdate /\(^* \)\@<=[^:]*/ - syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag - syn match plugEdge /^ \X\+$/ - syn match plugEdge /^ \X*/ contained nextgroup=plugSha - syn match plugSha /[0-9a-f]\{7,9}/ contained - syn match plugRelDate /([^)]*)$/ contained - syn match plugNotLoaded /(not loaded)$/ - syn match plugError /^x.*/ - syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ - syn match plugH2 /^.*:\n-\+$/ - syn match plugH2 /^-\{2,}/ - syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean - hi def link plug1 Title - hi def link plug2 Repeat - hi def link plugH2 Type - hi def link plugX Exception - hi def link plugBracket Structure - hi def link plugNumber Number - - hi def link plugDash Special - hi def link plugPlus Constant - hi def link plugStar Boolean - - hi def link plugMessage Function - hi def link plugName Label - hi def link plugInstall Function - hi def link plugUpdate Type - - hi def link plugError Error - hi def link plugDeleted Ignore - hi def link plugRelDate Comment - hi def link plugEdge PreProc - hi def link plugSha Identifier - hi def link plugTag Constant - - hi def link plugNotLoaded Comment -endfunction - -function! s:lpad(str, len) - return a:str . repeat(' ', a:len - len(a:str)) -endfunction - -function! s:lines(msg) - return split(a:msg, "[\r\n]") -endfunction - -function! s:lastline(msg) - return get(s:lines(a:msg), -1, '') -endfunction - -function! s:new_window() - execute get(g:, 'plug_window', 'vertical topleft new') -endfunction - -function! s:plug_window_exists() - let buflist = tabpagebuflist(s:plug_tab) - return !empty(buflist) && index(buflist, s:plug_buf) >= 0 -endfunction - -function! s:switch_in() - if !s:plug_window_exists() - return 0 - endif - - if winbufnr(0) != s:plug_buf - let s:pos = [tabpagenr(), winnr(), winsaveview()] - execute 'normal!' s:plug_tab.'gt' - let winnr = bufwinnr(s:plug_buf) - execute winnr.'wincmd w' - call add(s:pos, winsaveview()) - else - let s:pos = [winsaveview()] - endif - - setlocal modifiable - return 1 -endfunction - -function! s:switch_out(...) - call winrestview(s:pos[-1]) - setlocal nomodifiable - if a:0 > 0 - execute a:1 - endif - - if len(s:pos) > 1 - execute 'normal!' s:pos[0].'gt' - execute s:pos[1] 'wincmd w' - call winrestview(s:pos[2]) - endif -endfunction - -function! s:finish_bindings() - nnoremap R :call retry() - nnoremap D :PlugDiff - nnoremap S :PlugStatus - nnoremap U :call status_update() - xnoremap U :call status_update() - nnoremap ]] :silent! call section('') - nnoremap [[ :silent! call section('b') -endfunction - -function! s:prepare(...) - if empty(s:plug_getcwd()) - throw 'Invalid current working directory. Cannot proceed.' - endif - - for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] - if exists(evar) - throw evar.' detected. Cannot proceed.' - endif - endfor - - call s:job_abort() - if s:switch_in() - if b:plug_preview == 1 - pc - endif - enew - else - call s:new_window() - endif - - nnoremap q :call close_pane() - if a:0 == 0 - call s:finish_bindings() - endif - let b:plug_preview = -1 - let s:plug_tab = tabpagenr() - let s:plug_buf = winbufnr(0) - call s:assign_name() - - for k in ['', 'L', 'o', 'X', 'd', 'dd'] - execute 'silent! unmap ' k - endfor - setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline modifiable nospell - if exists('+colorcolumn') - setlocal colorcolumn= - endif - setf vim-plug - if exists('g:syntax_on') - call s:syntax() - endif -endfunction - -function! s:close_pane() - if b:plug_preview == 1 - pc - let b:plug_preview = -1 - else - bd - endif -endfunction - -function! s:assign_name() - " Assign buffer name - let prefix = '[Plugins]' - let name = prefix - let idx = 2 - while bufexists(name) - let name = printf('%s (%s)', prefix, idx) - let idx = idx + 1 - endwhile - silent! execute 'f' fnameescape(name) -endfunction - -function! s:chsh(swap) - let prev = [&shell, &shellcmdflag, &shellredir] - if !s:is_win - set shell=sh - endif - if a:swap - if s:is_powershell(&shell) - let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' - elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' - set shellredir=>%s\ 2>&1 - endif - endif - return prev -endfunction - -function! s:bang(cmd, ...) - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(a:0) - " FIXME: Escaping is incomplete. We could use shellescape with eval, - " but it won't work on Windows. - let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd - if s:is_win - let [batchfile, cmd] = s:batchfile(cmd) - endif - let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%') - execute "normal! :execute g:_plug_bang\\" - finally - unlet g:_plug_bang - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry - return v:shell_error ? 'Exit status: ' . v:shell_error : '' -endfunction - -function! s:regress_bar() - let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') - call s:progress_bar(2, bar, len(bar)) -endfunction - -function! s:is_updated(dir) - return !empty(s:system_chomp(['git', 'log', '--pretty=format:%h', 'HEAD...HEAD@{1}'], a:dir)) -endfunction - -function! s:do(pull, force, todo) - for [name, spec] in items(a:todo) - if !isdirectory(spec.dir) - continue - endif - let installed = has_key(s:update.new, name) - let updated = installed ? 0 : - \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) - if a:force || installed || updated - execute 'cd' s:esc(spec.dir) - call append(3, '- Post-update hook for '. name .' ... ') - let error = '' - let type = type(spec.do) - if type == s:TYPE.string - if spec.do[0] == ':' - if !get(s:loaded, name, 0) - let s:loaded[name] = 1 - call s:reorg_rtp() - endif - call s:load_plugin(spec) - try - execute spec.do[1:] - catch - let error = v:exception - endtry - if !s:plug_window_exists() - cd - - throw 'Warning: vim-plug was terminated by the post-update hook of '.name - endif - else - let error = s:bang(spec.do) - endif - elseif type == s:TYPE.funcref - try - call s:load_plugin(spec) - let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') - call spec.do({ 'name': name, 'status': status, 'force': a:force }) - catch - let error = v:exception - endtry - else - let error = 'Invalid hook type' - endif - call s:switch_in() - call setline(4, empty(error) ? (getline(4) . 'OK') - \ : ('x' . getline(4)[1:] . error)) - if !empty(error) - call add(s:update.errors, name) - call s:regress_bar() - endif - cd - - endif - endfor -endfunction - -function! s:hash_match(a, b) - return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 -endfunction - -function! s:checkout(spec) - let sha = a:spec.commit - let output = s:git_revision(a:spec.dir) - if !empty(output) && !s:hash_match(sha, s:lines(output)[0]) - let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : '' - let output = s:system( - \ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir) - endif - return output -endfunction - -function! s:finish(pull) - let new_frozen = len(filter(keys(s:update.new), 'g:plugs[v:val].frozen')) - if new_frozen - let s = new_frozen > 1 ? 's' : '' - call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) - endif - call append(3, '- Finishing ... ') | 4 - redraw - call plug#helptags() - call plug#end() - call setline(4, getline(4) . 'Done!') - redraw - let msgs = [] - if !empty(s:update.errors) - call add(msgs, "Press 'R' to retry.") - endif - if a:pull && len(s:update.new) < len(filter(getline(5, '$'), - \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'")) - call add(msgs, "Press 'D' to see the updated changes.") - endif - echo join(msgs, ' ') - call s:finish_bindings() -endfunction - -function! s:retry() - if empty(s:update.errors) - return - endif - echo - call s:update_impl(s:update.pull, s:update.force, - \ extend(copy(s:update.errors), [s:update.threads])) -endfunction - -function! s:is_managed(name) - return has_key(g:plugs[a:name], 'uri') -endfunction - -function! s:names(...) - return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) -endfunction - -function! s:check_ruby() - silent! ruby require 'thread'; VIM::command("let g:plug_ruby = '#{RUBY_VERSION}'") - if !exists('g:plug_ruby') - redraw! - return s:warn('echom', 'Warning: Ruby interface is broken') - endif - let ruby_version = split(g:plug_ruby, '\.') - unlet g:plug_ruby - return s:version_requirement(ruby_version, [1, 8, 7]) -endfunction - -function! s:update_impl(pull, force, args) abort - let sync = index(a:args, '--sync') >= 0 || has('vim_starting') - let args = filter(copy(a:args), 'v:val != "--sync"') - let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? - \ remove(args, -1) : get(g:, 'plug_threads', 16) - - let managed = filter(copy(g:plugs), 's:is_managed(v:key)') - let todo = empty(args) ? filter(managed, '!v:val.frozen || !isdirectory(v:val.dir)') : - \ filter(managed, 'index(args, v:key) >= 0') - - if empty(todo) - return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) - endif - - if !s:is_win && s:git_version_requirement(2, 3) - let s:git_terminal_prompt = exists('$GIT_TERMINAL_PROMPT') ? $GIT_TERMINAL_PROMPT : '' - let $GIT_TERMINAL_PROMPT = 0 - for plug in values(todo) - let plug.uri = substitute(plug.uri, - \ '^https://git::@github\.com', 'https://github.com', '') - endfor - endif - - if !isdirectory(g:plug_home) - try - call mkdir(g:plug_home, 'p') - catch - return s:err(printf('Invalid plug directory: %s. '. - \ 'Try to call plug#begin with a valid directory', g:plug_home)) - endtry - endif - - if has('nvim') && !exists('*jobwait') && threads > 1 - call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') - endif - - let use_job = s:nvim || s:vim8 - let python = (has('python') || has('python3')) && !use_job - let ruby = has('ruby') && !use_job && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && threads > 1 && s:check_ruby() - - let s:update = { - \ 'start': reltime(), - \ 'all': todo, - \ 'todo': copy(todo), - \ 'errors': [], - \ 'pull': a:pull, - \ 'force': a:force, - \ 'new': {}, - \ 'threads': (python || ruby || use_job) ? min([len(todo), threads]) : 1, - \ 'bar': '', - \ 'fin': 0 - \ } - - call s:prepare(1) - call append(0, ['', '']) - normal! 2G - silent! redraw - - " Set remote name, overriding a possible user git config's clone.defaultRemoteName - let s:clone_opt = ['--origin', 'origin'] - if get(g:, 'plug_shallow', 1) - call extend(s:clone_opt, ['--depth', '1']) - if s:git_version_requirement(1, 7, 10) - call add(s:clone_opt, '--no-single-branch') - endif - endif - - if has('win32unix') || has('wsl') - call extend(s:clone_opt, ['-c', 'core.eol=lf', '-c', 'core.autocrlf=input']) - endif - - let s:submodule_opt = s:git_version_requirement(2, 8) ? ' --jobs='.threads : '' - - " Python version requirement (>= 2.7) - if python && !has('python3') && !ruby && !use_job && s:update.threads > 1 - redir => pyv - silent python import platform; print platform.python_version() - redir END - let python = s:version_requirement( - \ map(split(split(pyv)[0], '\.'), 'str2nr(v:val)'), [2, 6]) - endif - - if (python || ruby) && s:update.threads > 1 - try - let imd = &imd - if s:mac_gui - set noimd - endif - if ruby - call s:update_ruby() - else - call s:update_python() - endif - catch - let lines = getline(4, '$') - let printed = {} - silent! 4,$d _ - for line in lines - let name = s:extract_name(line, '.', '') - if empty(name) || !has_key(printed, name) - call append('$', line) - if !empty(name) - let printed[name] = 1 - if line[0] == 'x' && index(s:update.errors, name) < 0 - call add(s:update.errors, name) - end - endif - endif - endfor - finally - let &imd = imd - call s:update_finish() - endtry - else - call s:update_vim() - while use_job && sync - sleep 100m - if s:update.fin - break - endif - endwhile - endif -endfunction - -function! s:log4(name, msg) - call setline(4, printf('- %s (%s)', a:msg, a:name)) - redraw -endfunction - -function! s:update_finish() - if exists('s:git_terminal_prompt') - let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt - endif - if s:switch_in() - call append(3, '- Updating ...') | 4 - for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) - let [pos, _] = s:logpos(name) - if !pos - continue - endif - if has_key(spec, 'commit') - call s:log4(name, 'Checking out '.spec.commit) - let out = s:checkout(spec) - elseif has_key(spec, 'tag') - let tag = spec.tag - if tag =~ '\*' - let tags = s:lines(s:system('git tag --list '.plug#shellescape(tag).' --sort -version:refname 2>&1', spec.dir)) - if !v:shell_error && !empty(tags) - let tag = tags[0] - call s:log4(name, printf('Latest tag for %s -> %s', spec.tag, tag)) - call append(3, '') - endif - endif - call s:log4(name, 'Checking out '.tag) - let out = s:system('git checkout -q '.plug#shellescape(tag).' -- 2>&1', spec.dir) - else - let branch = s:git_origin_branch(spec) - call s:log4(name, 'Merging origin/'.s:esc(branch)) - let out = s:system('git checkout -q '.plug#shellescape(branch).' -- 2>&1' - \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only '.plug#shellescape('origin/'.branch).' 2>&1')), spec.dir) - endif - if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && - \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) - call s:log4(name, 'Updating submodules. This may take a while.') - let out .= s:bang('git submodule update --init --recursive'.s:submodule_opt.' 2>&1', spec.dir) - endif - let msg = s:format_message(v:shell_error ? 'x': '-', name, out) - if v:shell_error - call add(s:update.errors, name) - call s:regress_bar() - silent execute pos 'd _' - call append(4, msg) | 4 - elseif !empty(out) - call setline(pos, msg[0]) - endif - redraw - endfor - silent 4 d _ - try - call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) - catch - call s:warn('echom', v:exception) - call s:warn('echo', '') - return - endtry - call s:finish(s:update.pull) - call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') - call s:switch_out('normal! gg') - endif -endfunction - -function! s:job_abort() - if (!s:nvim && !s:vim8) || !exists('s:jobs') - return - endif - - for [name, j] in items(s:jobs) - if s:nvim - silent! call jobstop(j.jobid) - elseif s:vim8 - silent! call job_stop(j.jobid) - endif - if j.new - call s:rm_rf(g:plugs[name].dir) - endif - endfor - let s:jobs = {} -endfunction - -function! s:last_non_empty_line(lines) - let len = len(a:lines) - for idx in range(len) - let line = a:lines[len-idx-1] - if !empty(line) - return line - endif - endfor - return '' -endfunction - -function! s:job_out_cb(self, data) abort - let self = a:self - let data = remove(self.lines, -1) . a:data - let lines = map(split(data, "\n", 1), 'split(v:val, "\r", 1)[-1]') - call extend(self.lines, lines) - " To reduce the number of buffer updates - let self.tick = get(self, 'tick', -1) + 1 - if !self.running || self.tick % len(s:jobs) == 0 - let bullet = self.running ? (self.new ? '+' : '*') : (self.error ? 'x' : '-') - let result = self.error ? join(self.lines, "\n") : s:last_non_empty_line(self.lines) - call s:log(bullet, self.name, result) - endif -endfunction - -function! s:job_exit_cb(self, data) abort - let a:self.running = 0 - let a:self.error = a:data != 0 - call s:reap(a:self.name) - call s:tick() -endfunction - -function! s:job_cb(fn, job, ch, data) - if !s:plug_window_exists() " plug window closed - return s:job_abort() - endif - call call(a:fn, [a:job, a:data]) -endfunction - -function! s:nvim_cb(job_id, data, event) dict abort - return (a:event == 'stdout' || a:event == 'stderr') ? - \ s:job_cb('s:job_out_cb', self, 0, join(a:data, "\n")) : - \ s:job_cb('s:job_exit_cb', self, 0, a:data) -endfunction - -function! s:spawn(name, cmd, opts) - let job = { 'name': a:name, 'running': 1, 'error': 0, 'lines': [''], - \ 'new': get(a:opts, 'new', 0) } - let s:jobs[a:name] = job - - if s:nvim - if has_key(a:opts, 'dir') - let job.cwd = a:opts.dir - endif - let argv = a:cmd - call extend(job, { - \ 'on_stdout': function('s:nvim_cb'), - \ 'on_stderr': function('s:nvim_cb'), - \ 'on_exit': function('s:nvim_cb'), - \ }) - let jid = s:plug_call('jobstart', argv, job) - if jid > 0 - let job.jobid = jid - else - let job.running = 0 - let job.error = 1 - let job.lines = [jid < 0 ? argv[0].' is not executable' : - \ 'Invalid arguments (or job table is full)'] - endif - elseif s:vim8 - let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"script": 0})')) - if has_key(a:opts, 'dir') - let cmd = s:with_cd(cmd, a:opts.dir, 0) - endif - let argv = s:is_win ? ['cmd', '/s', '/c', '"'.cmd.'"'] : ['sh', '-c', cmd] - let jid = job_start(s:is_win ? join(argv, ' ') : argv, { - \ 'out_cb': function('s:job_cb', ['s:job_out_cb', job]), - \ 'err_cb': function('s:job_cb', ['s:job_out_cb', job]), - \ 'exit_cb': function('s:job_cb', ['s:job_exit_cb', job]), - \ 'err_mode': 'raw', - \ 'out_mode': 'raw' - \}) - if job_status(jid) == 'run' - let job.jobid = jid - else - let job.running = 0 - let job.error = 1 - let job.lines = ['Failed to start job'] - endif - else - let job.lines = s:lines(call('s:system', has_key(a:opts, 'dir') ? [a:cmd, a:opts.dir] : [a:cmd])) - let job.error = v:shell_error != 0 - let job.running = 0 - endif -endfunction - -function! s:reap(name) - let job = s:jobs[a:name] - if job.error - call add(s:update.errors, a:name) - elseif get(job, 'new', 0) - let s:update.new[a:name] = 1 - endif - let s:update.bar .= job.error ? 'x' : '=' - - let bullet = job.error ? 'x' : '-' - let result = job.error ? join(job.lines, "\n") : s:last_non_empty_line(job.lines) - call s:log(bullet, a:name, empty(result) ? 'OK' : result) - call s:bar() - - call remove(s:jobs, a:name) -endfunction - -function! s:bar() - if s:switch_in() - let total = len(s:update.all) - call setline(1, (s:update.pull ? 'Updating' : 'Installing'). - \ ' plugins ('.len(s:update.bar).'/'.total.')') - call s:progress_bar(2, s:update.bar, total) - call s:switch_out() - endif -endfunction - -function! s:logpos(name) - let max = line('$') - for i in range(4, max > 4 ? max : 4) - if getline(i) =~# '^[-+x*] '.a:name.':' - for j in range(i + 1, max > 5 ? max : 5) - if getline(j) !~ '^ ' - return [i, j - 1] - endif - endfor - return [i, i] - endif - endfor - return [0, 0] -endfunction - -function! s:log(bullet, name, lines) - if s:switch_in() - let [b, e] = s:logpos(a:name) - if b > 0 - silent execute printf('%d,%d d _', b, e) - if b > winheight('.') - let b = 4 - endif - else - let b = 4 - endif - " FIXME For some reason, nomodifiable is set after :d in vim8 - setlocal modifiable - call append(b - 1, s:format_message(a:bullet, a:name, a:lines)) - call s:switch_out() - endif -endfunction - -function! s:update_vim() - let s:jobs = {} - - call s:bar() - call s:tick() -endfunction - -function! s:tick() - let pull = s:update.pull - let prog = s:progress_opt(s:nvim || s:vim8) -while 1 " Without TCO, Vim stack is bound to explode - if empty(s:update.todo) - if empty(s:jobs) && !s:update.fin - call s:update_finish() - let s:update.fin = 1 - endif - return - endif - - let name = keys(s:update.todo)[0] - let spec = remove(s:update.todo, name) - let new = empty(globpath(spec.dir, '.git', 1)) - - call s:log(new ? '+' : '*', name, pull ? 'Updating ...' : 'Installing ...') - redraw - - let has_tag = has_key(spec, 'tag') - if !new - let [error, _] = s:git_validate(spec, 0) - if empty(error) - if pull - let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] - if has_tag && !empty(globpath(spec.dir, '.git/shallow')) - call extend(cmd, ['--depth', '99999999']) - endif - if !empty(prog) - call add(cmd, prog) - endif - call s:spawn(name, cmd, { 'dir': spec.dir }) - else - let s:jobs[name] = { 'running': 0, 'lines': ['Already installed'], 'error': 0 } - endif - else - let s:jobs[name] = { 'running': 0, 'lines': s:lines(error), 'error': 1 } - endif - else - let cmd = ['git', 'clone'] - if !has_tag - call extend(cmd, s:clone_opt) - endif - if !empty(prog) - call add(cmd, prog) - endif - call s:spawn(name, extend(cmd, [spec.uri, s:trim(spec.dir)]), { 'new': 1 }) - endif - - if !s:jobs[name].running - call s:reap(name) - endif - if len(s:jobs) >= s:update.threads - break - endif -endwhile -endfunction - -function! s:update_python() -let py_exe = has('python') ? 'python' : 'python3' -execute py_exe "<< EOF" -import datetime -import functools -import os -try: - import queue -except ImportError: - import Queue as queue -import random -import re -import shutil -import signal -import subprocess -import tempfile -import threading as thr -import time -import traceback -import vim - -G_NVIM = vim.eval("has('nvim')") == '1' -G_PULL = vim.eval('s:update.pull') == '1' -G_RETRIES = int(vim.eval('get(g:, "plug_retries", 2)')) + 1 -G_TIMEOUT = int(vim.eval('get(g:, "plug_timeout", 60)')) -G_CLONE_OPT = ' '.join(vim.eval('s:clone_opt')) -G_PROGRESS = vim.eval('s:progress_opt(1)') -G_LOG_PROB = 1.0 / int(vim.eval('s:update.threads')) -G_STOP = thr.Event() -G_IS_WIN = vim.eval('s:is_win') == '1' - -class PlugError(Exception): - def __init__(self, msg): - self.msg = msg -class CmdTimedOut(PlugError): - pass -class CmdFailed(PlugError): - pass -class InvalidURI(PlugError): - pass -class Action(object): - INSTALL, UPDATE, ERROR, DONE = ['+', '*', 'x', '-'] - -class Buffer(object): - def __init__(self, lock, num_plugs, is_pull): - self.bar = '' - self.event = 'Updating' if is_pull else 'Installing' - self.lock = lock - self.maxy = int(vim.eval('winheight(".")')) - self.num_plugs = num_plugs - - def __where(self, name): - """ Find first line with name in current buffer. Return line num. """ - found, lnum = False, 0 - matcher = re.compile('^[-+x*] {0}:'.format(name)) - for line in vim.current.buffer: - if matcher.search(line) is not None: - found = True - break - lnum += 1 - - if not found: - lnum = -1 - return lnum - - def header(self): - curbuf = vim.current.buffer - curbuf[0] = self.event + ' plugins ({0}/{1})'.format(len(self.bar), self.num_plugs) - - num_spaces = self.num_plugs - len(self.bar) - curbuf[1] = '[{0}{1}]'.format(self.bar, num_spaces * ' ') - - with self.lock: - vim.command('normal! 2G') - vim.command('redraw') - - def write(self, action, name, lines): - first, rest = lines[0], lines[1:] - msg = ['{0} {1}{2}{3}'.format(action, name, ': ' if first else '', first)] - msg.extend([' ' + line for line in rest]) - - try: - if action == Action.ERROR: - self.bar += 'x' - vim.command("call add(s:update.errors, '{0}')".format(name)) - elif action == Action.DONE: - self.bar += '=' - - curbuf = vim.current.buffer - lnum = self.__where(name) - if lnum != -1: # Found matching line num - del curbuf[lnum] - if lnum > self.maxy and action in set([Action.INSTALL, Action.UPDATE]): - lnum = 3 - else: - lnum = 3 - curbuf.append(msg, lnum) - - self.header() - except vim.error: - pass - -class Command(object): - CD = 'cd /d' if G_IS_WIN else 'cd' - - def __init__(self, cmd, cmd_dir=None, timeout=60, cb=None, clean=None): - self.cmd = cmd - if cmd_dir: - self.cmd = '{0} {1} && {2}'.format(Command.CD, cmd_dir, self.cmd) - self.timeout = timeout - self.callback = cb if cb else (lambda msg: None) - self.clean = clean if clean else (lambda: None) - self.proc = None - - @property - def alive(self): - """ Returns true only if command still running. """ - return self.proc and self.proc.poll() is None - - def execute(self, ntries=3): - """ Execute the command with ntries if CmdTimedOut. - Returns the output of the command if no Exception. - """ - attempt, finished, limit = 0, False, self.timeout - - while not finished: - try: - attempt += 1 - result = self.try_command() - finished = True - return result - except CmdTimedOut: - if attempt != ntries: - self.notify_retry() - self.timeout += limit - else: - raise - - def notify_retry(self): - """ Retry required for command, notify user. """ - for count in range(3, 0, -1): - if G_STOP.is_set(): - raise KeyboardInterrupt - msg = 'Timeout. Will retry in {0} second{1} ...'.format( - count, 's' if count != 1 else '') - self.callback([msg]) - time.sleep(1) - self.callback(['Retrying ...']) - - def try_command(self): - """ Execute a cmd & poll for callback. Returns list of output. - Raises CmdFailed -> return code for Popen isn't 0 - Raises CmdTimedOut -> command exceeded timeout without new output - """ - first_line = True - - try: - tfile = tempfile.NamedTemporaryFile(mode='w+b') - preexec_fn = not G_IS_WIN and os.setsid or None - self.proc = subprocess.Popen(self.cmd, stdout=tfile, - stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, shell=True, - preexec_fn=preexec_fn) - thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) - thrd.start() - - thread_not_started = True - while thread_not_started: - try: - thrd.join(0.1) - thread_not_started = False - except RuntimeError: - pass - - while self.alive: - if G_STOP.is_set(): - raise KeyboardInterrupt - - if first_line or random.random() < G_LOG_PROB: - first_line = False - line = '' if G_IS_WIN else nonblock_read(tfile.name) - if line: - self.callback([line]) - - time_diff = time.time() - os.path.getmtime(tfile.name) - if time_diff > self.timeout: - raise CmdTimedOut(['Timeout!']) - - thrd.join(0.5) - - tfile.seek(0) - result = [line.decode('utf-8', 'replace').rstrip() for line in tfile] - - if self.proc.returncode != 0: - raise CmdFailed([''] + result) - - return result - except: - self.terminate() - raise - - def terminate(self): - """ Terminate process and cleanup. """ - if self.alive: - if G_IS_WIN: - os.kill(self.proc.pid, signal.SIGINT) - else: - os.killpg(self.proc.pid, signal.SIGTERM) - self.clean() - -class Plugin(object): - def __init__(self, name, args, buf_q, lock): - self.name = name - self.args = args - self.buf_q = buf_q - self.lock = lock - self.tag = args.get('tag', 0) - - def manage(self): - try: - if os.path.exists(self.args['dir']): - self.update() - else: - self.install() - with self.lock: - thread_vim_command("let s:update.new['{0}'] = 1".format(self.name)) - except PlugError as exc: - self.write(Action.ERROR, self.name, exc.msg) - except KeyboardInterrupt: - G_STOP.set() - self.write(Action.ERROR, self.name, ['Interrupted!']) - except: - # Any exception except those above print stack trace - msg = 'Trace:\n{0}'.format(traceback.format_exc().rstrip()) - self.write(Action.ERROR, self.name, msg.split('\n')) - raise - - def install(self): - target = self.args['dir'] - if target[-1] == '\\': - target = target[0:-1] - - def clean(target): - def _clean(): - try: - shutil.rmtree(target) - except OSError: - pass - return _clean - - self.write(Action.INSTALL, self.name, ['Installing ...']) - callback = functools.partial(self.write, Action.INSTALL, self.name) - cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( - '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], - esc(target)) - com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) - result = com.execute(G_RETRIES) - self.write(Action.DONE, self.name, result[-1:]) - - def repo_uri(self): - cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' - command = Command(cmd, self.args['dir'], G_TIMEOUT,) - result = command.execute(G_RETRIES) - return result[-1] - - def update(self): - actual_uri = self.repo_uri() - expect_uri = self.args['uri'] - regex = re.compile(r'^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$') - ma = regex.match(actual_uri) - mb = regex.match(expect_uri) - if ma is None or mb is None or ma.groups() != mb.groups(): - msg = ['', - 'Invalid URI: {0}'.format(actual_uri), - 'Expected {0}'.format(expect_uri), - 'PlugClean required.'] - raise InvalidURI(msg) - - if G_PULL: - self.write(Action.UPDATE, self.name, ['Updating ...']) - callback = functools.partial(self.write, Action.UPDATE, self.name) - fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' - cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) - com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) - result = com.execute(G_RETRIES) - self.write(Action.DONE, self.name, result[-1:]) - else: - self.write(Action.DONE, self.name, ['Already installed']) - - def write(self, action, name, msg): - self.buf_q.put((action, name, msg)) - -class PlugThread(thr.Thread): - def __init__(self, tname, args): - super(PlugThread, self).__init__() - self.tname = tname - self.args = args - - def run(self): - thr.current_thread().name = self.tname - buf_q, work_q, lock = self.args - - try: - while not G_STOP.is_set(): - name, args = work_q.get_nowait() - plug = Plugin(name, args, buf_q, lock) - plug.manage() - work_q.task_done() - except queue.Empty: - pass - -class RefreshThread(thr.Thread): - def __init__(self, lock): - super(RefreshThread, self).__init__() - self.lock = lock - self.running = True - - def run(self): - while self.running: - with self.lock: - thread_vim_command('noautocmd normal! a') - time.sleep(0.33) - - def stop(self): - self.running = False - -if G_NVIM: - def thread_vim_command(cmd): - vim.session.threadsafe_call(lambda: vim.command(cmd)) -else: - def thread_vim_command(cmd): - vim.command(cmd) - -def esc(name): - return '"' + name.replace('"', '\"') + '"' - -def nonblock_read(fname): - """ Read a file with nonblock flag. Return the last line. """ - fread = os.open(fname, os.O_RDONLY | os.O_NONBLOCK) - buf = os.read(fread, 100000).decode('utf-8', 'replace') - os.close(fread) - - line = buf.rstrip('\r\n') - left = max(line.rfind('\r'), line.rfind('\n')) - if left != -1: - left += 1 - line = line[left:] - - return line - -def main(): - thr.current_thread().name = 'main' - nthreads = int(vim.eval('s:update.threads')) - plugs = vim.eval('s:update.todo') - mac_gui = vim.eval('s:mac_gui') == '1' - - lock = thr.Lock() - buf = Buffer(lock, len(plugs), G_PULL) - buf_q, work_q = queue.Queue(), queue.Queue() - for work in plugs.items(): - work_q.put(work) - - start_cnt = thr.active_count() - for num in range(nthreads): - tname = 'PlugT-{0:02}'.format(num) - thread = PlugThread(tname, (buf_q, work_q, lock)) - thread.start() - if mac_gui: - rthread = RefreshThread(lock) - rthread.start() - - while not buf_q.empty() or thr.active_count() != start_cnt: - try: - action, name, msg = buf_q.get(True, 0.25) - buf.write(action, name, ['OK'] if not msg else msg) - buf_q.task_done() - except queue.Empty: - pass - except KeyboardInterrupt: - G_STOP.set() - - if mac_gui: - rthread.stop() - rthread.join() - -main() -EOF -endfunction - -function! s:update_ruby() - ruby << EOF - module PlugStream - SEP = ["\r", "\n", nil] - def get_line - buffer = '' - loop do - char = readchar rescue return - if SEP.include? char.chr - buffer << $/ - break - else - buffer << char - end - end - buffer - end - end unless defined?(PlugStream) - - def esc arg - %["#{arg.gsub('"', '\"')}"] - end - - def killall pid - pids = [pid] - if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM - pids.each { |pid| Process.kill 'INT', pid.to_i rescue nil } - else - unless `which pgrep 2> /dev/null`.empty? - children = pids - until children.empty? - children = children.map { |pid| - `pgrep -P #{pid}`.lines.map { |l| l.chomp } - }.flatten - pids += children - end - end - pids.each { |pid| Process.kill 'TERM', pid.to_i rescue nil } - end - end - - def compare_git_uri a, b - regex = %r{^(?:\w+://)?(?:[^@/]*@)?([^:/]*(?::[0-9]*)?)[:/](.*?)(?:\.git)?/?$} - regex.match(a).to_a.drop(1) == regex.match(b).to_a.drop(1) - end - - require 'thread' - require 'fileutils' - require 'timeout' - running = true - iswin = VIM::evaluate('s:is_win').to_i == 1 - pull = VIM::evaluate('s:update.pull').to_i == 1 - base = VIM::evaluate('g:plug_home') - all = VIM::evaluate('s:update.todo') - limit = VIM::evaluate('get(g:, "plug_timeout", 60)') - tries = VIM::evaluate('get(g:, "plug_retries", 2)') + 1 - nthr = VIM::evaluate('s:update.threads').to_i - maxy = VIM::evaluate('winheight(".")').to_i - vim7 = VIM::evaluate('v:version').to_i <= 703 && RUBY_PLATFORM =~ /darwin/ - cd = iswin ? 'cd /d' : 'cd' - tot = VIM::evaluate('len(s:update.todo)') || 0 - bar = '' - skip = 'Already installed' - mtx = Mutex.new - take1 = proc { mtx.synchronize { running && all.shift } } - logh = proc { - cnt = bar.length - $curbuf[1] = "#{pull ? 'Updating' : 'Installing'} plugins (#{cnt}/#{tot})" - $curbuf[2] = '[' + bar.ljust(tot) + ']' - VIM::command('normal! 2G') - VIM::command('redraw') - } - where = proc { |name| (1..($curbuf.length)).find { |l| $curbuf[l] =~ /^[-+x*] #{name}:/ } } - log = proc { |name, result, type| - mtx.synchronize do - ing = ![true, false].include?(type) - bar += type ? '=' : 'x' unless ing - b = case type - when :install then '+' when :update then '*' - when true, nil then '-' else - VIM::command("call add(s:update.errors, '#{name}')") - 'x' - end - result = - if type || type.nil? - ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] - elsif result =~ /^Interrupted|^Timeout/ - ["#{b} #{name}: #{result}"] - else - ["#{b} #{name}"] + result.lines.map { |l| " " << l } - end - if lnum = where.call(name) - $curbuf.delete lnum - lnum = 4 if ing && lnum > maxy - end - result.each_with_index do |line, offset| - $curbuf.append((lnum || 4) - 1 + offset, line.gsub(/\e\[./, '').chomp) - end - logh.call - end - } - bt = proc { |cmd, name, type, cleanup| - tried = timeout = 0 - begin - tried += 1 - timeout += limit - fd = nil - data = '' - if iswin - Timeout::timeout(timeout) do - tmp = VIM::evaluate('tempname()') - system("(#{cmd}) > #{tmp}") - data = File.read(tmp).chomp - File.unlink tmp rescue nil - end - else - fd = IO.popen(cmd).extend(PlugStream) - first_line = true - log_prob = 1.0 / nthr - while line = Timeout::timeout(timeout) { fd.get_line } - data << line - log.call name, line.chomp, type if name && (first_line || rand < log_prob) - first_line = false - end - fd.close - end - [$? == 0, data.chomp] - rescue Timeout::Error, Interrupt => e - if fd && !fd.closed? - killall fd.pid - fd.close - end - cleanup.call if cleanup - if e.is_a?(Timeout::Error) && tried < tries - 3.downto(1) do |countdown| - s = countdown > 1 ? 's' : '' - log.call name, "Timeout. Will retry in #{countdown} second#{s} ...", type - sleep 1 - end - log.call name, 'Retrying ...', type - retry - end - [false, e.is_a?(Interrupt) ? "Interrupted!" : "Timeout!"] - end - } - main = Thread.current - threads = [] - watcher = Thread.new { - if vim7 - while VIM::evaluate('getchar(1)') - sleep 0.1 - end - else - require 'io/console' # >= Ruby 1.9 - nil until IO.console.getch == 3.chr - end - mtx.synchronize do - running = false - threads.each { |t| t.raise Interrupt } unless vim7 - end - threads.each { |t| t.join rescue nil } - main.kill - } - refresh = Thread.new { - while true - mtx.synchronize do - break unless running - VIM::command('noautocmd normal! a') - end - sleep 0.2 - end - } if VIM::evaluate('s:mac_gui') == 1 - - clone_opt = VIM::evaluate('s:clone_opt').join(' ') - progress = VIM::evaluate('s:progress_opt(1)') - nthr.times do - mtx.synchronize do - threads << Thread.new { - while pair = take1.call - name = pair.first - dir, uri, tag = pair.last.values_at *%w[dir uri tag] - exists = File.directory? dir - ok, result = - if exists - chdir = "#{cd} #{iswin ? dir : esc(dir)}" - ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil - current_uri = data.lines.to_a.last - if !ret - if data =~ /^Interrupted|^Timeout/ - [false, data] - else - [false, [data.chomp, "PlugClean required."].join($/)] - end - elsif !compare_git_uri(current_uri, uri) - [false, ["Invalid URI: #{current_uri}", - "Expected: #{uri}", - "PlugClean required."].join($/)] - else - if pull - log.call name, 'Updating ...', :update - fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' - bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil - else - [true, skip] - end - end - else - d = esc dir.sub(%r{[\\/]+$}, '') - log.call name, 'Installing ...', :install - bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { - FileUtils.rm_rf dir - } - end - mtx.synchronize { VIM::command("let s:update.new['#{name}'] = 1") } if !exists && ok - log.call name, result, ok - end - } if running - end - end - threads.each { |t| t.join rescue nil } - logh.call - refresh.kill if refresh - watcher.kill -EOF -endfunction - -function! s:shellesc_cmd(arg, script) - let escaped = substitute('"'.a:arg.'"', '[&|<>()@^!"]', '^&', 'g') - return substitute(escaped, '%', (a:script ? '%' : '^') . '&', 'g') -endfunction - -function! s:shellesc_ps1(arg) - return "'".substitute(escape(a:arg, '\"'), "'", "''", 'g')."'" -endfunction - -function! s:shellesc_sh(arg) - return "'".substitute(a:arg, "'", "'\\\\''", 'g')."'" -endfunction - -" Escape the shell argument based on the shell. -" Vim and Neovim's shellescape() are insufficient. -" 1. shellslash determines whether to use single/double quotes. -" Double-quote escaping is fragile for cmd.exe. -" 2. It does not work for powershell. -" 3. It does not work for *sh shells if the command is executed -" via cmd.exe (ie. cmd.exe /c sh -c command command_args) -" 4. It does not support batchfile syntax. -" -" Accepts an optional dictionary with the following keys: -" - shell: same as Vim/Neovim 'shell' option. -" If unset, fallback to 'cmd.exe' on Windows or 'sh'. -" - script: If truthy and shell is cmd.exe, escape for batchfile syntax. -function! plug#shellescape(arg, ...) - if a:arg =~# '^[A-Za-z0-9_/:.-]\+$' - return a:arg - endif - let opts = a:0 > 0 && type(a:1) == s:TYPE.dict ? a:1 : {} - let shell = get(opts, 'shell', s:is_win ? 'cmd.exe' : 'sh') - let script = get(opts, 'script', 1) - if shell =~# 'cmd\(\.exe\)\?$' - return s:shellesc_cmd(a:arg, script) - elseif s:is_powershell(shell) - return s:shellesc_ps1(a:arg) - endif - return s:shellesc_sh(a:arg) -endfunction - -function! s:glob_dir(path) - return map(filter(s:glob(a:path, '**'), 'isdirectory(v:val)'), 's:dirpath(v:val)') -endfunction - -function! s:progress_bar(line, bar, total) - call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']') -endfunction - -function! s:compare_git_uri(a, b) - " See `git help clone' - " https:// [user@] github.com[:port] / junegunn/vim-plug [.git] - " [git@] github.com[:port] : junegunn/vim-plug [.git] - " file:// / junegunn/vim-plug [/] - " / junegunn/vim-plug [/] - let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$' - let ma = matchlist(a:a, pat) - let mb = matchlist(a:b, pat) - return ma[1:2] ==# mb[1:2] -endfunction - -function! s:format_message(bullet, name, message) - if a:bullet != 'x' - return [printf('%s %s: %s', a:bullet, a:name, s:lastline(a:message))] - else - let lines = map(s:lines(a:message), '" ".v:val') - return extend([printf('x %s:', a:name)], lines) - endif -endfunction - -function! s:with_cd(cmd, dir, ...) - let script = a:0 > 0 ? a:1 : 1 - return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd) -endfunction - -function! s:system(cmd, ...) - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(1) - if type(a:cmd) == s:TYPE.list - " Neovim's system() supports list argument to bypass the shell - " but it cannot set the working directory for the command. - " Assume that the command does not rely on the shell. - if has('nvim') && a:0 == 0 - return system(a:cmd) - endif - let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) - if s:is_powershell(&shell) - let cmd = '& ' . cmd - endif - else - let cmd = a:cmd - endif - if a:0 > 0 - let cmd = s:with_cd(cmd, a:1, type(a:cmd) != s:TYPE.list) - endif - if s:is_win && type(a:cmd) != s:TYPE.list - let [batchfile, cmd] = s:batchfile(cmd) - endif - return system(cmd) - finally - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry -endfunction - -function! s:system_chomp(...) - let ret = call('s:system', a:000) - return v:shell_error ? '' : substitute(ret, '\n$', '', '') -endfunction - -function! s:git_validate(spec, check_branch) - let err = '' - if isdirectory(a:spec.dir) - let result = [s:git_local_branch(a:spec.dir), s:git_origin_url(a:spec.dir)] - let remote = result[-1] - if empty(remote) - let err = join([remote, 'PlugClean required.'], "\n") - elseif !s:compare_git_uri(remote, a:spec.uri) - let err = join(['Invalid URI: '.remote, - \ 'Expected: '.a:spec.uri, - \ 'PlugClean required.'], "\n") - elseif a:check_branch && has_key(a:spec, 'commit') - let sha = s:git_revision(a:spec.dir) - if empty(sha) - let err = join(add(result, 'PlugClean required.'), "\n") - elseif !s:hash_match(sha, a:spec.commit) - let err = join([printf('Invalid HEAD (expected: %s, actual: %s)', - \ a:spec.commit[:6], sha[:6]), - \ 'PlugUpdate required.'], "\n") - endif - elseif a:check_branch - let current_branch = result[0] - " Check tag - let origin_branch = s:git_origin_branch(a:spec) - if has_key(a:spec, 'tag') - let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir) - if a:spec.tag !=# tag && a:spec.tag !~ '\*' - let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.', - \ (empty(tag) ? 'N/A' : tag), a:spec.tag) - endif - " Check branch - elseif origin_branch !=# current_branch - let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.', - \ current_branch, origin_branch) - endif - if empty(err) - let [ahead, behind] = split(s:lastline(s:system([ - \ 'git', 'rev-list', '--count', '--left-right', - \ printf('HEAD...origin/%s', origin_branch) - \ ], a:spec.dir)), '\t') - if !v:shell_error && ahead - if behind - " Only mention PlugClean if diverged, otherwise it's likely to be - " pushable (and probably not that messed up). - let err = printf( - \ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n" - \ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', origin_branch, ahead, behind) - else - let err = printf("Ahead of origin/%s by %d commit(s).\n" - \ .'Cannot update until local changes are pushed.', - \ origin_branch, ahead) - endif - endif - endif - endif - else - let err = 'Not found' - endif - return [err, err =~# 'PlugClean'] -endfunction - -function! s:rm_rf(dir) - if isdirectory(a:dir) - return s:system(s:is_win - \ ? 'rmdir /S /Q '.plug#shellescape(a:dir) - \ : ['rm', '-rf', a:dir]) - endif -endfunction - -function! s:clean(force) - call s:prepare() - call append(0, 'Searching for invalid plugins in '.g:plug_home) - call append(1, '') - - " List of valid directories - let dirs = [] - let errs = {} - let [cnt, total] = [0, len(g:plugs)] - for [name, spec] in items(g:plugs) - if !s:is_managed(name) - call add(dirs, spec.dir) - else - let [err, clean] = s:git_validate(spec, 1) - if clean - let errs[spec.dir] = s:lines(err)[0] - else - call add(dirs, spec.dir) - endif - endif - let cnt += 1 - call s:progress_bar(2, repeat('=', cnt), total) - normal! 2G - redraw - endfor - - let allowed = {} - for dir in dirs - let allowed[s:dirpath(s:plug_fnamemodify(dir, ':h:h'))] = 1 - let allowed[dir] = 1 - for child in s:glob_dir(dir) - let allowed[child] = 1 - endfor - endfor - - let todo = [] - let found = sort(s:glob_dir(g:plug_home)) - while !empty(found) - let f = remove(found, 0) - if !has_key(allowed, f) && isdirectory(f) - call add(todo, f) - call append(line('$'), '- ' . f) - if has_key(errs, f) - call append(line('$'), ' ' . errs[f]) - endif - let found = filter(found, 'stridx(v:val, f) != 0') - end - endwhile - - 4 - redraw - if empty(todo) - call append(line('$'), 'Already clean.') - else - let s:clean_count = 0 - call append(3, ['Directories to delete:', '']) - redraw! - if a:force || s:ask_no_interrupt('Delete all directories?') - call s:delete([6, line('$')], 1) - else - call setline(4, 'Cancelled.') - nnoremap d :set opfunc=delete_opg@ - nmap dd d_ - xnoremap d :call delete_op(visualmode(), 1) - echo 'Delete the lines (d{motion}) to delete the corresponding directories' - endif - endif - 4 - setlocal nomodifiable -endfunction - -function! s:delete_op(type, ...) - call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) -endfunction - -function! s:delete(range, force) - let [l1, l2] = a:range - let force = a:force - let err_count = 0 - while l1 <= l2 - let line = getline(l1) - if line =~ '^- ' && isdirectory(line[2:]) - execute l1 - redraw! - let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) - let force = force || answer > 1 - if answer - let err = s:rm_rf(line[2:]) - setlocal modifiable - if empty(err) - call setline(l1, '~'.line[1:]) - let s:clean_count += 1 - else - delete _ - call append(l1 - 1, s:format_message('x', line[1:], err)) - let l2 += len(s:lines(err)) - let err_count += 1 - endif - let msg = printf('Removed %d directories.', s:clean_count) - if err_count > 0 - let msg .= printf(' Failed to remove %d directories.', err_count) - endif - call setline(4, msg) - setlocal nomodifiable - endif - endif - let l1 += 1 - endwhile -endfunction - -function! s:upgrade() - echo 'Downloading the latest version of vim-plug' - redraw - let tmp = s:plug_tempname() - let new = tmp . '/plug.vim' - - try - let out = s:system(['git', 'clone', '--depth', '1', s:plug_src, tmp]) - if v:shell_error - return s:err('Error upgrading vim-plug: '. out) - endif - - if readfile(s:me) ==# readfile(new) - echo 'vim-plug is already up-to-date' - return 0 - else - call rename(s:me, s:me . '.old') - call rename(new, s:me) - unlet g:loaded_plug - echo 'vim-plug has been upgraded' - return 1 - endif - finally - silent! call s:rm_rf(tmp) - endtry -endfunction - -function! s:upgrade_specs() - for spec in values(g:plugs) - let spec.frozen = get(spec, 'frozen', 0) - endfor -endfunction - -function! s:status() - call s:prepare() - call append(0, 'Checking plugins') - call append(1, '') - - let ecnt = 0 - let unloaded = 0 - let [cnt, total] = [0, len(g:plugs)] - for [name, spec] in items(g:plugs) - let is_dir = isdirectory(spec.dir) - if has_key(spec, 'uri') - if is_dir - let [err, _] = s:git_validate(spec, 1) - let [valid, msg] = [empty(err), empty(err) ? 'OK' : err] - else - let [valid, msg] = [0, 'Not found. Try PlugInstall.'] - endif - else - if is_dir - let [valid, msg] = [1, 'OK'] - else - let [valid, msg] = [0, 'Not found.'] - endif - endif - let cnt += 1 - let ecnt += !valid - " `s:loaded` entry can be missing if PlugUpgraded - if is_dir && get(s:loaded, name, -1) == 0 - let unloaded = 1 - let msg .= ' (not loaded)' - endif - call s:progress_bar(2, repeat('=', cnt), total) - call append(3, s:format_message(valid ? '-' : 'x', name, msg)) - normal! 2G - redraw - endfor - call setline(1, 'Finished. '.ecnt.' error(s).') - normal! gg - setlocal nomodifiable - if unloaded - echo "Press 'L' on each line to load plugin, or 'U' to update" - nnoremap L :call status_load(line('.')) - xnoremap L :call status_load(line('.')) - end -endfunction - -function! s:extract_name(str, prefix, suffix) - return matchstr(a:str, '^'.a:prefix.' \zs[^:]\+\ze:.*'.a:suffix.'$') -endfunction - -function! s:status_load(lnum) - let line = getline(a:lnum) - let name = s:extract_name(line, '-', '(not loaded)') - if !empty(name) - call plug#load(name) - setlocal modifiable - call setline(a:lnum, substitute(line, ' (not loaded)$', '', '')) - setlocal nomodifiable - endif -endfunction - -function! s:status_update() range - let lines = getline(a:firstline, a:lastline) - let names = filter(map(lines, 's:extract_name(v:val, "[x-]", "")'), '!empty(v:val)') - if !empty(names) - echo - execute 'PlugUpdate' join(names) - endif -endfunction - -function! s:is_preview_window_open() - silent! wincmd P - if &previewwindow - wincmd p - return 1 - endif -endfunction - -function! s:find_name(lnum) - for lnum in reverse(range(1, a:lnum)) - let line = getline(lnum) - if empty(line) - return '' - endif - let name = s:extract_name(line, '-', '') - if !empty(name) - return name - endif - endfor - return '' -endfunction - -function! s:preview_commit() - if b:plug_preview < 0 - let b:plug_preview = !s:is_preview_window_open() - endif - - let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}') - if empty(sha) - let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$') - if empty(name) - return - endif - let title = 'HEAD@{1}..' - let command = 'git diff --no-color HEAD@{1}' - else - let title = sha - let command = 'git show --no-color --pretty=medium '.sha - let name = s:find_name(line('.')) - endif - - if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir) - return - endif - - if exists('g:plug_pwindow') && !s:is_preview_window_open() - execute g:plug_pwindow - execute 'e' title - else - execute 'pedit' title - wincmd P - endif - setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable - let batchfile = '' - try - let [sh, shellcmdflag, shrd] = s:chsh(1) - let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command - if s:is_win - let [batchfile, cmd] = s:batchfile(cmd) - endif - execute 'silent %!' cmd - finally - let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd] - if s:is_win && filereadable(batchfile) - call delete(batchfile) - endif - endtry - setlocal nomodifiable - nnoremap q :q - wincmd p -endfunction - -function! s:section(flags) - call search('\(^[x-] \)\@<=[^:]\+:', a:flags) -endfunction - -function! s:format_git_log(line) - let indent = ' ' - let tokens = split(a:line, nr2char(1)) - if len(tokens) != 5 - return indent.substitute(a:line, '\s*$', '', '') - endif - let [graph, sha, refs, subject, date] = tokens - let tag = matchstr(refs, 'tag: [^,)]\+') - let tag = empty(tag) ? ' ' : ' ('.tag.') ' - return printf('%s%s%s%s%s (%s)', indent, graph, sha, tag, subject, date) -endfunction - -function! s:append_ul(lnum, text) - call append(a:lnum, ['', a:text, repeat('-', len(a:text))]) -endfunction - -function! s:diff() - call s:prepare() - call append(0, ['Collecting changes ...', '']) - let cnts = [0, 0] - let bar = '' - let total = filter(copy(g:plugs), 's:is_managed(v:key) && isdirectory(v:val.dir)') - call s:progress_bar(2, bar, len(total)) - for origin in [1, 0] - let plugs = reverse(sort(items(filter(copy(total), (origin ? '' : '!').'(has_key(v:val, "commit") || has_key(v:val, "tag"))')))) - if empty(plugs) - continue - endif - call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') - for [k, v] in plugs - let branch = s:git_origin_branch(v) - if len(branch) - let range = origin ? '..origin/'.branch : 'HEAD@{1}..' - let cmd = ['git', 'log', '--graph', '--color=never'] - if s:git_version_requirement(2, 10, 0) - call add(cmd, '--no-show-signature') - endif - call extend(cmd, ['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range]) - if has_key(v, 'rtp') - call extend(cmd, ['--', v.rtp]) - endif - let diff = s:system_chomp(cmd, v.dir) - if !empty(diff) - let ref = has_key(v, 'tag') ? (' (tag: '.v.tag.')') : has_key(v, 'commit') ? (' '.v.commit) : '' - call append(5, extend(['', '- '.k.':'.ref], map(s:lines(diff), 's:format_git_log(v:val)'))) - let cnts[origin] += 1 - endif - endif - let bar .= '=' - call s:progress_bar(2, bar, len(total)) - normal! 2G - redraw - endfor - if !cnts[origin] - call append(5, ['', 'N/A']) - endif - endfor - call setline(1, printf('%d plugin(s) updated.', cnts[0]) - \ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : '')) - - if cnts[0] || cnts[1] - nnoremap (plug-preview) :silent! call preview_commit() - if empty(maparg("\", 'n')) - nmap (plug-preview) - endif - if empty(maparg('o', 'n')) - nmap o (plug-preview) - endif - endif - if cnts[0] - nnoremap X :call revert() - echo "Press 'X' on each block to revert the update" - endif - normal! gg - setlocal nomodifiable -endfunction - -function! s:revert() - if search('^Pending updates', 'bnW') - return - endif - - let name = s:find_name(line('.')) - if empty(name) || !has_key(g:plugs, name) || - \ input(printf('Revert the update of %s? (y/N) ', name)) !~? '^y' - return - endif - - call s:system('git reset --hard HEAD@{1} && git checkout '.plug#shellescape(g:plugs[name].branch).' --', g:plugs[name].dir) - setlocal modifiable - normal! "_dap - setlocal nomodifiable - echo 'Reverted' -endfunction - -function! s:snapshot(force, ...) abort - call s:prepare() - setf vim - call append(0, ['" Generated by vim-plug', - \ '" '.strftime("%c"), - \ '" :source this file in vim to restore the snapshot', - \ '" or execute: vim -S snapshot.vim', - \ '', '', 'PlugUpdate!']) - 1 - let anchor = line('$') - 3 - let names = sort(keys(filter(copy(g:plugs), - \'has_key(v:val, "uri") && isdirectory(v:val.dir)'))) - for name in reverse(names) - let sha = has_key(g:plugs[name], 'commit') ? g:plugs[name].commit : s:git_revision(g:plugs[name].dir) - if !empty(sha) - call append(anchor, printf("silent! let g:plugs['%s'].commit = '%s'", name, sha)) - redraw - endif - endfor - - if a:0 > 0 - let fn = s:plug_expand(a:1) - if filereadable(fn) && !(a:force || s:ask(a:1.' already exists. Overwrite?')) - return - endif - call writefile(getline(1, '$'), fn) - echo 'Saved as '.a:1 - silent execute 'e' s:esc(fn) - setf vim - endif -endfunction - -function! s:split_rtp() - return split(&rtp, '\\\@ -" Version: 0.9 -" Last Updated: 18 Jun 2009 -" -" Changes -" TODO: -" 'info' item output can use some formatting work -" Add an "unsafe eval" mode, to allow for return type evaluation -" Complete basic syntax along with import statements -" i.e. "import url" -" Continue parsing on invalid line?? -" -" v 0.9 -" * Fixed docstring parsing for classes and functions -" * Fixed parsing of *args and **kwargs type arguments -" * Better function param parsing to handle things like tuples and -" lambda defaults args -" -" v 0.8 -" * Fixed an issue where the FIRST assignment was always used instead of -" using a subsequent assignment for a variable -" * Fixed a scoping issue when working inside a parameterless function -" -" -" v 0.7 -" * Fixed function list sorting (_ and __ at the bottom) -" * Removed newline removal from docs. It appears vim handles these better in -" recent patches -" -" v 0.6: -" * Fixed argument completion -" * Removed the 'kind' completions, as they are better indicated -" with real syntax -" * Added tuple assignment parsing (whoops, that was forgotten) -" * Fixed import handling when flattening scope -" -" v 0.5: -" Yeah, I skipped a version number - 0.4 was never public. -" It was a bugfix version on top of 0.3. This is a complete -" rewrite. -" - -if !has('python') - echo "Error: Required vim compiled with +python" - finish -endif - -function! pythoncomplete#Complete(findstart, base) - "findstart = 1 when we need to get the text length - if a:findstart == 1 - let line = getline('.') - let idx = col('.') - while idx > 0 - let idx -= 1 - let c = line[idx] - if c =~ '\w' - continue - elseif ! c =~ '\.' - let idx = -1 - break - else - break - endif - endwhile - - return idx - "findstart = 0 when we need to return the list of completions - else - "vim no longer moves the cursor upon completion... fix that - let line = getline('.') - let idx = col('.') - let cword = '' - while idx > 0 - let idx -= 1 - let c = line[idx] - if c =~ '\w' || c =~ '\.' - let cword = c . cword - continue - elseif strlen(cword) > 0 || idx == 0 - break - endif - endwhile - execute "python vimcomplete('" . cword . "', '" . a:base . "')" - return g:pythoncomplete_completions - endif -endfunction - -function! s:DefPython() -python << PYTHONEOF -import sys, tokenize, cStringIO, types -from token import NAME, DEDENT, NEWLINE, STRING - -debugstmts=[] -def dbg(s): debugstmts.append(s) -def showdbg(): - for d in debugstmts: print "DBG: %s " % d - -def vimcomplete(context,match): - global debugstmts - debugstmts = [] - try: - import vim - def complsort(x,y): - try: - xa = x['abbr'] - ya = y['abbr'] - if xa[0] == '_': - if xa[1] == '_' and ya[0:2] == '__': - return xa > ya - elif ya[0:2] == '__': - return -1 - elif y[0] == '_': - return xa > ya - else: - return 1 - elif ya[0] == '_': - return -1 - else: - return xa > ya - except: - return 0 - cmpl = Completer() - cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')")) - all = cmpl.get_completions(context,match) - all.sort(complsort) - dictstr = '[' - # have to do this for double quoting - for cmpl in all: - dictstr += '{' - for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x]) - dictstr += '"icase":0},' - if dictstr[-1] == ',': dictstr = dictstr[:-1] - dictstr += ']' - #dbg("dict: %s" % dictstr) - vim.command("silent let g:pythoncomplete_completions = %s" % dictstr) - #dbg("Completion dict:\n%s" % all) - except vim.error: - dbg("VIM Error: %s" % vim.error) - -class Completer(object): - def __init__(self): - self.compldict = {} - self.parser = PyParser() - - def evalsource(self,text,line=0): - sc = self.parser.parse(text,line) - src = sc.get_code() - dbg("source: %s" % src) - try: exec(src) in self.compldict - except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1])) - for l in sc.locals: - try: exec(l) in self.compldict - except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l)) - - def _cleanstr(self,doc): - return doc.replace('"',' ').replace("'",' ') - - def get_arguments(self,func_obj): - def _ctor(obj): - try: return class_ob.__init__.im_func - except AttributeError: - for base in class_ob.__bases__: - rc = _find_constructor(base) - if rc is not None: return rc - return None - - arg_offset = 1 - if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj) - elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func - else: arg_offset = 0 - - arg_text='' - if type(func_obj) in [types.FunctionType, types.LambdaType]: - try: - cd = func_obj.func_code - real_args = cd.co_varnames[arg_offset:cd.co_argcount] - defaults = func_obj.func_defaults or '' - defaults = map(lambda name: "=%s" % name, defaults) - defaults = [""] * (len(real_args)-len(defaults)) + defaults - items = map(lambda a,d: a+d, real_args, defaults) - if func_obj.func_code.co_flags & 0x4: - items.append("...") - if func_obj.func_code.co_flags & 0x8: - items.append("***") - arg_text = (','.join(items)) + ')' - - except: - dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1])) - pass - if len(arg_text) == 0: - # The doc string sometimes contains the function signature - # this works for alot of C modules that are part of the - # standard library - doc = func_obj.__doc__ - if doc: - doc = doc.lstrip() - pos = doc.find('\n') - if pos > 0: - sigline = doc[:pos] - lidx = sigline.find('(') - ridx = sigline.find(')') - if lidx > 0 and ridx > 0: - arg_text = sigline[lidx+1:ridx] + ')' - if len(arg_text) == 0: arg_text = ')' - return arg_text - - def get_completions(self,context,match): - dbg("get_completions('%s','%s')" % (context,match)) - stmt = '' - if context: stmt += str(context) - if match: stmt += str(match) - try: - result = None - all = {} - ridx = stmt.rfind('.') - if len(stmt) > 0 and stmt[-1] == '(': - result = eval(_sanitize(stmt[:-1]), self.compldict) - doc = result.__doc__ - if doc is None: doc = '' - args = self.get_arguments(result) - return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}] - elif ridx == -1: - match = stmt - all = self.compldict - else: - match = stmt[ridx+1:] - stmt = _sanitize(stmt[:ridx]) - result = eval(stmt, self.compldict) - all = dir(result) - - dbg("completing: stmt:%s" % stmt) - completions = [] - - try: maindoc = result.__doc__ - except: maindoc = ' ' - if maindoc is None: maindoc = ' ' - for m in all: - if m == "_PyCmplNoType": continue #this is internal - try: - dbg('possible completion: %s' % m) - if m.find(match) == 0: - if result is None: inst = all[m] - else: inst = getattr(result,m) - try: doc = inst.__doc__ - except: doc = maindoc - typestr = str(inst) - if doc is None or doc == '': doc = maindoc - - wrd = m[len(match):] - c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)} - if "function" in typestr: - c['word'] += '(' - c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) - elif "method" in typestr: - c['word'] += '(' - c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) - elif "module" in typestr: - c['word'] += '.' - elif "class" in typestr: - c['word'] += '(' - c['abbr'] += '(' - completions.append(c) - except: - i = sys.exc_info() - dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt)) - return completions - except: - i = sys.exc_info() - dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt)) - return [] - -class Scope(object): - def __init__(self,name,indent,docstr=''): - self.subscopes = [] - self.docstr = docstr - self.locals = [] - self.parent = None - self.name = name - self.indent = indent - - def add(self,sub): - #print 'push scope: [%s@%s]' % (sub.name,sub.indent) - sub.parent = self - self.subscopes.append(sub) - return sub - - def doc(self,str): - """ Clean up a docstring """ - d = str.replace('\n',' ') - d = d.replace('\t',' ') - while d.find(' ') > -1: d = d.replace(' ',' ') - while d[0] in '"\'\t ': d = d[1:] - while d[-1] in '"\'\t ': d = d[:-1] - dbg("Scope(%s)::docstr = %s" % (self,d)) - self.docstr = d - - def local(self,loc): - self._checkexisting(loc) - self.locals.append(loc) - - def copy_decl(self,indent=0): - """ Copy a scope's declaration only, at the specified indent level - not local variables """ - return Scope(self.name,indent,self.docstr) - - def _checkexisting(self,test): - "Convienance function... keep out duplicates" - if test.find('=') > -1: - var = test.split('=')[0].strip() - for l in self.locals: - if l.find('=') > -1 and var == l.split('=')[0].strip(): - self.locals.remove(l) - - def get_code(self): - str = "" - if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n' - for l in self.locals: - if l.startswith('import'): str += l+'\n' - str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n' - for sub in self.subscopes: - str += sub.get_code() - for l in self.locals: - if not l.startswith('import'): str += l+'\n' - - return str - - def pop(self,indent): - #print 'pop scope: [%s] to [%s]' % (self.indent,indent) - outer = self - while outer.parent != None and outer.indent >= indent: - outer = outer.parent - return outer - - def currentindent(self): - #print 'parse current indent: %s' % self.indent - return ' '*self.indent - - def childindent(self): - #print 'parse child indent: [%s]' % (self.indent+1) - return ' '*(self.indent+1) - -class Class(Scope): - def __init__(self, name, supers, indent, docstr=''): - Scope.__init__(self,name,indent, docstr) - self.supers = supers - def copy_decl(self,indent=0): - c = Class(self.name,self.supers,indent, self.docstr) - for s in self.subscopes: - c.add(s.copy_decl(indent+1)) - return c - def get_code(self): - str = '%sclass %s' % (self.currentindent(),self.name) - if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers) - str += ':\n' - if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n' - if len(self.subscopes) > 0: - for s in self.subscopes: str += s.get_code() - else: - str += '%spass\n' % self.childindent() - return str - - -class Function(Scope): - def __init__(self, name, params, indent, docstr=''): - Scope.__init__(self,name,indent, docstr) - self.params = params - def copy_decl(self,indent=0): - return Function(self.name,self.params,indent, self.docstr) - def get_code(self): - str = "%sdef %s(%s):\n" % \ - (self.currentindent(),self.name,','.join(self.params)) - if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n' - str += "%spass\n" % self.childindent() - return str - -class PyParser: - def __init__(self): - self.top = Scope('global',0) - self.scope = self.top - - def _parsedotname(self,pre=None): - #returns (dottedname, nexttoken) - name = [] - if pre is None: - tokentype, token, indent = self.next() - if tokentype != NAME and token != '*': - return ('', token) - else: token = pre - name.append(token) - while True: - tokentype, token, indent = self.next() - if token != '.': break - tokentype, token, indent = self.next() - if tokentype != NAME: break - name.append(token) - return (".".join(name), token) - - def _parseimportlist(self): - imports = [] - while True: - name, token = self._parsedotname() - if not name: break - name2 = '' - if token == 'as': name2, token = self._parsedotname() - imports.append((name, name2)) - while token != "," and "\n" not in token: - tokentype, token, indent = self.next() - if token != ",": break - return imports - - def _parenparse(self): - name = '' - names = [] - level = 1 - while True: - tokentype, token, indent = self.next() - if token in (')', ',') and level == 1: - if '=' not in name: name = name.replace(' ', '') - names.append(name.strip()) - name = '' - if token == '(': - level += 1 - name += "(" - elif token == ')': - level -= 1 - if level == 0: break - else: name += ")" - elif token == ',' and level == 1: - pass - else: - name += "%s " % str(token) - return names - - def _parsefunction(self,indent): - self.scope=self.scope.pop(indent) - tokentype, fname, ind = self.next() - if tokentype != NAME: return None - - tokentype, open, ind = self.next() - if open != '(': return None - params=self._parenparse() - - tokentype, colon, ind = self.next() - if colon != ':': return None - - return Function(fname,params,indent) - - def _parseclass(self,indent): - self.scope=self.scope.pop(indent) - tokentype, cname, ind = self.next() - if tokentype != NAME: return None - - super = [] - tokentype, next, ind = self.next() - if next == '(': - super=self._parenparse() - elif next != ':': return None - - return Class(cname,super,indent) - - def _parseassignment(self): - assign='' - tokentype, token, indent = self.next() - if tokentype == tokenize.STRING or token == 'str': - return '""' - elif token == '(' or token == 'tuple': - return '()' - elif token == '[' or token == 'list': - return '[]' - elif token == '{' or token == 'dict': - return '{}' - elif tokentype == tokenize.NUMBER: - return '0' - elif token == 'open' or token == 'file': - return 'file' - elif token == 'None': - return '_PyCmplNoType()' - elif token == 'type': - return 'type(_PyCmplNoType)' #only for method resolution - else: - assign += token - level = 0 - while True: - tokentype, token, indent = self.next() - if token in ('(','{','['): - level += 1 - elif token in (']','}',')'): - level -= 1 - if level == 0: break - elif level == 0: - if token in (';','\n'): break - assign += token - return "%s" % assign - - def next(self): - type, token, (lineno, indent), end, self.parserline = self.gen.next() - if lineno == self.curline: - #print 'line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name) - self.currentscope = self.scope - return (type, token, indent) - - def _adjustvisibility(self): - newscope = Scope('result',0) - scp = self.currentscope - while scp != None: - if type(scp) == Function: - slice = 0 - #Handle 'self' params - if scp.parent != None and type(scp.parent) == Class: - slice = 1 - newscope.local('%s = %s' % (scp.params[0],scp.parent.name)) - for p in scp.params[slice:]: - i = p.find('=') - if len(p) == 0: continue - pvar = '' - ptype = '' - if i == -1: - pvar = p - ptype = '_PyCmplNoType()' - else: - pvar = p[:i] - ptype = _sanitize(p[i+1:]) - if pvar.startswith('**'): - pvar = pvar[2:] - ptype = '{}' - elif pvar.startswith('*'): - pvar = pvar[1:] - ptype = '[]' - - newscope.local('%s = %s' % (pvar,ptype)) - - for s in scp.subscopes: - ns = s.copy_decl(0) - newscope.add(ns) - for l in scp.locals: newscope.local(l) - scp = scp.parent - - self.currentscope = newscope - return self.currentscope - - #p.parse(vim.current.buffer[:],vim.eval("line('.')")) - def parse(self,text,curline=0): - self.curline = int(curline) - buf = cStringIO.StringIO(''.join(text) + '\n') - self.gen = tokenize.generate_tokens(buf.readline) - self.currentscope = self.scope - - try: - freshscope=True - while True: - tokentype, token, indent = self.next() - #dbg( 'main: token=[%s] indent=[%s]' % (token,indent)) - - if tokentype == DEDENT or token == "pass": - self.scope = self.scope.pop(indent) - elif token == 'def': - func = self._parsefunction(indent) - if func is None: - print "function: syntax error..." - continue - dbg("new scope: function") - freshscope = True - self.scope = self.scope.add(func) - elif token == 'class': - cls = self._parseclass(indent) - if cls is None: - print "class: syntax error..." - continue - freshscope = True - dbg("new scope: class") - self.scope = self.scope.add(cls) - - elif token == 'import': - imports = self._parseimportlist() - for mod, alias in imports: - loc = "import %s" % mod - if len(alias) > 0: loc += " as %s" % alias - self.scope.local(loc) - freshscope = False - elif token == 'from': - mod, token = self._parsedotname() - if not mod or token != "import": - print "from: syntax error..." - continue - names = self._parseimportlist() - for name, alias in names: - loc = "from %s import %s" % (mod,name) - if len(alias) > 0: loc += " as %s" % alias - self.scope.local(loc) - freshscope = False - elif tokentype == STRING: - if freshscope: self.scope.doc(token) - elif tokentype == NAME: - name,token = self._parsedotname(token) - if token == '=': - stmt = self._parseassignment() - dbg("parseassignment: %s = %s" % (name, stmt)) - if stmt != None: - self.scope.local("%s = %s" % (name,stmt)) - freshscope = False - except StopIteration: #thrown on EOF - pass - except: - dbg("parse error: %s, %s @ %s" % - (sys.exc_info()[0], sys.exc_info()[1], self.parserline)) - return self._adjustvisibility() - -def _sanitize(str): - val = '' - level = 0 - for c in str: - if c in ('(','{','['): - level += 1 - elif c in (']','}',')'): - level -= 1 - elif level == 0: - val += c - return val - -sys.path.extend(['.','..']) -PYTHONEOF -endfunction - -call s:DefPython() -" vim: set et ts=4: diff --git a/.vim/autoload/rubycomplete.vim b/.vim/autoload/rubycomplete.vim deleted file mode 100644 index 003dc0b..0000000 --- a/.vim/autoload/rubycomplete.vim +++ /dev/null @@ -1,530 +0,0 @@ -" Vim completion script -" Language: Ruby -" Maintainer: Mark Guzman -" Info: $Id: rubycomplete.vim,v 1.33 2006/06/19 17:10:24 segy Exp $ -" Version: 0.6 -" URL: http://vim-ruby.rubyforge.org -" Anon CVS: See above site -" Release Coordinator: Doug Kearns -" ---------------------------------------------------------------------------- -" -" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) -" ---------------------------------------------------------------------------- - -" {{{ requirement checks -if !has('ruby') - s:ErrMsg( "Error: Required vim compiled with +ruby" ) - finish -endif - -if version < 700 - s:ErrMsg( "Error: Required vim >= 7.0" ) - finish -endif -" }}} requirement checks - -if !exists("g:rubycomplete_rails") - let g:rubycomplete_rails = 0 -endif - -if !exists("g:rubycomplete_classes_in_global") - let g:rubycomplete_classes_in_global = 0 -endif - -if !exists("g:rubycomplete_buffer_loading") - let g:rubycomplete_classes_in_global = 0 -endif - - -" {{{ vim-side support functions -function! s:ErrMsg(msg) - echohl ErrorMsg - echo a:msg - echohl None -endfunction - -function! s:GetBufferRubyModule(name) - let [snum,enum] = s:GetBufferRubyEntity(a:name, "module") - return snum . '..' . enum -endfunction - -function! s:GetBufferRubyClass(name) - let [snum,enum] = s:GetBufferRubyEntity(a:name, "class") - return snum . '..' . enum -endfunction - -function! s:GetBufferRubySingletonMethods(name) -endfunction - -function! s:GetBufferRubyEntity( name, type ) - let stopline = 1 - let crex = '^\s*' . a:type . '\s*' . a:name . '\s*\(<\s*.*\s*\)\?\n*\(\(\s\|#\).*\n*\)*\n*\s*end$' - let [lnum,lcol] = searchpos( crex, 'nbw') - if lnum == 0 && lcol == 0 - return [0,0] - endif - - let [enum,ecol] = searchpos( crex, 'nebw') - if lnum > enum - let realdef = getline( lnum ) - let crexb = '^' . realdef . '\n*\(\(\s\|#\).*\n*\)*\n*\s*end$' - let [enum,ecol] = searchpos( crexb, 'necw' ) - endif - " we found a the class def - return [lnum,enum] -endfunction - -function! s:IsInClassDef() - let [snum,enum] = s:GetBufferRubyEntity( '.*', "class" ) - let ret = 'nil' - let pos = line('.') - - if snum < pos && pos < enum - let ret = snum . '..' . enum - endif - - return ret -endfunction - -function! s:GetRubyVarType(v) - let stopline = 1 - let vtp = '' - let pos = getpos('.') - let [lnum,lcol] = searchpos('^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$','nb',stopline) - if lnum != 0 && lcol != 0 - call setpos('.',pos) - let str = getline(lnum) - let vtp = substitute(str,'^\s*#\s*@var\s*'.a:v.'\>\s\+\([^ \t]\+\)\s*$','\1','') - return vtp - endif - call setpos('.',pos) - if exists('g:rubycomplete_rails') && g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1 - let ctors = '\(now\|new\|open\|get_instance\|find\|create\)' - else - let ctors = '\(now\|new\|open\|get_instance\)' - endif - - let [lnum,lcol] = searchpos(''.a:v.'\>\s*[+\-*/]*=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%r{\|[A-Za-z0-9@:\-()]\+...\?\)','nb',stopline) - if lnum != 0 && lcol != 0 - let str = matchstr(getline(lnum),'=\s*\([^ \t]\+.' . ctors . '\>\|[\[{"''/]\|%r{\|[A-Za-z0-9@:\-()]\+...\?\)',lcol) - let str = substitute(str,'^=\s*','','') - call setpos('.',pos) - if str == '"' || str == '''' - return 'String' - elseif str == '[' - return 'Array' - elseif str == '{' - return 'Hash' - elseif str == '/' || str == '%r{' - return 'Regexp' - elseif strlen(str) >= 4 && stridx(str,'..') != -1 - return 'Range' - elseif strlen(str) > 4 - let l = stridx(str,'.') - return str[0:l-1] - end - return '' - endif - call setpos('.',pos) - return '' -endfunction - -"}}} vim-side support functions - -function! rubycomplete#Complete(findstart, base) - "findstart = 1 when we need to get the text length - if a:findstart - let line = getline('.') - let idx = col('.') - while idx > 0 - let idx -= 1 - let c = line[idx-1] - if c =~ '\w' - continue - elseif ! c =~ '\.' - idx = -1 - break - else - break - endif - endwhile - - return idx - "findstart = 0 when we need to return the list of completions - else - let g:rubycomplete_completions = [] - execute "ruby get_completions('" . a:base . "')" - return g:rubycomplete_completions - endif -endfunction - - -function! s:DefRuby() -ruby << RUBYEOF -# {{{ ruby completion -RailsWords = [ - "has_many", "has_one", - "belongs_to", - ] - -ReservedWords = [ - "BEGIN", "END", - "alias", "and", - "begin", "break", - "case", "class", - "def", "defined", "do", - "else", "elsif", "end", "ensure", - "false", "for", - "if", "in", - "module", - "next", "nil", "not", - "or", - "redo", "rescue", "retry", "return", - "self", "super", - "then", "true", - "undef", "unless", "until", - "when", "while", - "yield", - ] - -Operators = [ "%", "&", "*", "**", "+", "-", "/", - "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", - "[]", "[]=", "^", ] - - -def load_requires - buf = VIM::Buffer.current - enum = buf.line_number - nums = Range.new( 1, enum ) - nums.each do |x| - ln = buf[x] - begin - eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln ) - rescue Exception - #ignore? - end - end -end - -def load_buffer_class(name) - classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') - return if classdef == nil - - pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) - load_buffer_class( $2 ) if pare != nil - - mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef ) - load_buffer_module( $2 ) if mixre != nil - - begin - eval classdef - rescue - VIM::evaluate( "s:ErrMsg( 'Problem loading class \"%s\", was it already completed?' )" % name ) - end -end - -def load_buffer_module(name) - classdef = get_buffer_entity(name, 's:GetBufferRubyModule("%s")') - return if classdef == nil - - begin - eval classdef - rescue - VIM::evaluate( "s:ErrMsg( 'Problem loading module \"%s\", was it already completed?' )" % name ) - end -end - -def get_buffer_entity(name, vimfun) - loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - return nil if loading_allowed != '1' - return nil if /(\"|\')+/.match( name ) - buf = VIM::Buffer.current - nums = eval( VIM::evaluate( vimfun % name ) ) - return nil if nums == nil - return nil if nums.min == nums.max && nums.min == 0 - - cur_line = VIM::Buffer.current.line_number - classdef = "" - nums.each do |x| - if x != cur_line - ln = buf[x] - classdef += "%s\n" % ln - end - end - - return classdef -end - -def get_var_type( receiver ) - if /(\"|\')+/.match( receiver ) - "String" - else - VIM::evaluate("s:GetRubyVarType('%s')" % receiver) - end -end - -def get_buffer_classes() - # this will be a little expensive. - loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global") - return [] if allow_aggressive_load != '1' || loading_allowed != '1' - - buf = VIM::Buffer.current - eob = buf.length - ret = [] - rg = 1..eob - - rg.each do |x| - if /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/.match( buf[x] ) - ret.push $1 - end - end - - return ret -end - -def load_rails() - allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") - return if allow_rails != '1' - - buf_path = VIM::evaluate('expand("%:p")') - file_name = VIM::evaluate('expand("%:t")') - path = buf_path.gsub( file_name, '' ) - path.gsub!( /\\/, "/" ) - pup = [ "./", "../", "../../", "../../../", "../../../../" ] - pok = nil - - pup.each do |sup| - tpok = "%s%sconfig" % [ path, sup ] - if File.exists?( tpok ) - pok = tpok - break - end - end - - return if pok == nil - - bootfile = pok + "/boot.rb" - envfile = pok + "/environment.rb" - if File.exists?( bootfile ) && File.exists?( envfile ) - begin - require bootfile - require envfile - begin - require 'console_app' - require 'console_with_helpers' - rescue - # 1.0 - end - Rails::Initializer.run - VIM::command('let s:rubycomplete_rails_loaded = 1') - rescue - VIM::evaluate( "s:ErrMsg('Error loading rails environment')" ) - end - end -end - -def get_rails_helpers - allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") - rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' - return RailsWords -end - -def add_rails_columns( cls ) - allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") - rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' - eval( "#{cls}.establish_connection" ) - return [] unless eval( "#{cls}.ancestors.include?(ActiveRecord::Base).to_s" ) - col = eval( "#{cls}.column_names" ) - return col if col - return [] -end - -def clean_sel(sel, msg) - sel.delete_if { |x| x == nil } - sel.uniq! - sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil -end - -def get_completions(base) - loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - if loading_allowed == '1' - load_requires - load_rails - end - - input = VIM::Buffer.current.line - cpos = VIM::Window.current.cursor[1] - 1 - input = input[0..cpos] - input += base - input.sub!(/.*[ \t\n\"\\'`><=;|&{(]/, '') # Readline.basic_word_break_characters - input.sub!(/self\./, '') - - message = nil - receiver = nil - methods = [] - variables = [] - classes = [] - - case input - when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp - receiver = $1 - message = Regexp.quote($2) - methods = Regexp.instance_methods(true) - - when /^([^\]]*\])\.([^.]*)$/ # Array - receiver = $1 - message = Regexp.quote($2) - methods = Array.instance_methods(true) - - when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash - receiver = $1 - message = Regexp.quote($2) - methods = Proc.instance_methods(true) | Hash.instance_methods(true) - - when /^(:[^:.]*)$/ # Symbol - if Symbol.respond_to?(:all_symbols) - receiver = $1 - message = $1.sub( /:/, '' ) - methods = Symbol.all_symbols.collect{|s| s.id2name} - methods.delete_if { |c| c.match( /'/ ) } - end - - when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods - receiver = $1 - methods = Object.constants - methods.grep(/^#{receiver}/).collect{|e| "::" + e} - - when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # Constant or class methods - receiver = $1 - message = Regexp.quote($4) - begin - methods = eval("#{receiver}.constants | #{receiver}.methods") - rescue Exception - methods = [] - end - methods.grep(/^#{message}/).collect{|e| receiver + "::" + e} - - when /^(:[^:.]+)\.([^.]*)$/ # Symbol - receiver = $1 - message = Regexp.quote($2) - methods = Symbol.instance_methods(true) - - when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric - receiver = $1 - message = Regexp.quote($4) - begin - methods = eval(receiver).methods - rescue Exception - methods = [] - end - - when /^(\$[^.]*)$/ #global - methods = global_variables.grep(Regexp.new(Regexp.quote($1))) - - when /^((\.?[^.]+)+)\.([^.]*)$/ # variable - receiver = $1 - message = Regexp.quote($3) - load_buffer_class( receiver ) - - cv = eval("self.class.constants") - vartype = get_var_type( receiver ) - if vartype != '' - load_buffer_class( vartype ) - - begin - methods = eval("#{vartype}.instance_methods") - variables = eval("#{vartype}.instance_variables") - rescue Exception - end - elsif (cv).include?(receiver) - # foo.func and foo is local var. - methods = eval("#{receiver}.methods") - vartype = receiver - elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver - vartype = receiver - # Foo::Bar.func - begin - methods = eval("#{receiver}.methods") - rescue Exception - end - else - # func1.func2 - ObjectSpace.each_object(Module){|m| - next if m.name != "IRB::Context" and - /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name - methods.concat m.instance_methods(false) - } - end - variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 - - when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ - message = $1 - methods = Range.instance_methods(true) - - when /^\.([^.]*)$/ # unknown(maybe String) - message = Regexp.quote($1) - methods = String.instance_methods(true) - - else - inclass = eval( VIM::evaluate("s:IsInClassDef()") ) - - if inclass != nil - classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] - found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef ) - - if found != nil - receiver = $1 - message = input - load_buffer_class( receiver ) - begin - methods = eval( "#{receiver}.instance_methods" ) - methods += get_rails_helpers - variables += add_rails_columns( "#{receiver}" ) - rescue Exception - found = nil - end - end - end - - if inclass == nil || found == nil - classes = eval("self.class.constants") - classes += get_buffer_classes - message = receiver = input - end - end - - methods = clean_sel( methods, message ) - methods = (methods-Object.instance_methods) - variables = clean_sel( variables, message ) - classes = clean_sel( classes, message ) - valid = [] - valid += methods.collect { |m| { :name => m, :type => 'f' } } - valid += variables.collect { |v| { :name => v, :type => 'v' } } - valid += classes.collect { |c| { :name => c, :type => 't' } } - valid.sort! { |x,y| x[:name] <=> y[:name] } - - outp = "" - - rg = 0..valid.length - rg.step(150) do |x| - stpos = 0+x - enpos = 150+x - valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] } - outp.sub!(/,$/, '') - - VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp) - outp = "" - end -end - -# }}} ruby completion -RUBYEOF -endfunction - -let s:rubycomplete_rails_loaded = 0 - -call s:DefRuby() -" vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: diff --git a/.vim/autoload/snipMate.vim b/.vim/autoload/snipMate.vim deleted file mode 100644 index dcd28f6..0000000 --- a/.vim/autoload/snipMate.vim +++ /dev/null @@ -1,433 +0,0 @@ -fun! Filename(...) - let filename = expand('%:t:r') - if filename == '' | return a:0 == 2 ? a:2 : '' | endif - return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g') -endf - -fun s:RemoveSnippet() - unl! g:snipPos s:curPos s:snipLen s:endCol s:endLine s:prevLen - \ s:lastBuf s:oldWord - if exists('s:update') - unl s:startCol s:origWordLen s:update - if exists('s:oldVars') | unl s:oldVars s:oldEndCol | endif - endif - aug! snipMateAutocmds -endf - -fun snipMate#expandSnip(snip, col) - let lnum = line('.') | let col = a:col - - let snippet = s:ProcessSnippet(a:snip) - " Avoid error if eval evaluates to nothing - if snippet == '' | return '' | endif - - " Expand snippet onto current position with the tab stops removed - let snipLines = split(substitute(snippet, '$\d\+\|${\d\+.\{-}}', '', 'g'), "\n", 1) - - let line = getline(lnum) - let afterCursor = strpart(line, col - 1) - " Keep text after the cursor - if afterCursor != "\t" && afterCursor != ' ' - let line = strpart(line, 0, col - 1) - let snipLines[-1] .= afterCursor - else - let afterCursor = '' - " For some reason the cursor needs to move one right after this - if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' - let col += 1 - endif - endif - - call setline(lnum, line.snipLines[0]) - - " Autoindent snippet according to previous indentation - let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1 - call append(lnum, map(snipLines[1:], "'".strpart(line, 0, indent - 1)."'.v:val")) - - " Open any folds snippet expands into - if &fen | sil! exe lnum.','.(lnum + len(snipLines) - 1).'foldopen' | endif - - let [g:snipPos, s:snipLen] = s:BuildTabStops(snippet, lnum, col - indent, indent) - - if s:snipLen - aug snipMateAutocmds - au CursorMovedI * call s:UpdateChangedSnip(0) - au InsertEnter * call s:UpdateChangedSnip(1) - aug END - let s:lastBuf = bufnr(0) " Only expand snippet while in current buffer - let s:curPos = 0 - let s:endCol = g:snipPos[s:curPos][1] - let s:endLine = g:snipPos[s:curPos][0] - - call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) - let s:prevLen = [line('$'), col('$')] - if g:snipPos[s:curPos][2] != -1 | return s:SelectWord() | endif - else - unl g:snipPos s:snipLen - " Place cursor at end of snippet if no tab stop is given - let newlines = len(snipLines) - 1 - call cursor(lnum + newlines, indent + len(snipLines[-1]) - len(afterCursor) - \ + (newlines ? 0: col - 1)) - endif - return '' -endf - -" Prepare snippet to be processed by s:BuildTabStops -fun s:ProcessSnippet(snip) - let snippet = a:snip - " Evaluate eval (`...`) expressions. - " Using a loop here instead of a regex fixes a bug with nested "\=". - if stridx(snippet, '`') != -1 - while match(snippet, '`.\{-}`') != -1 - let snippet = substitute(snippet, '`.\{-}`', - \ substitute(eval(matchstr(snippet, '`\zs.\{-}\ze`')), - \ "\n\\%$", '', ''), '') - endw - let snippet = substitute(snippet, "\r", "\n", 'g') - endif - - " Place all text after a colon in a tab stop after the tab stop - " (e.g. "${#:foo}" becomes "${:foo}foo"). - " This helps tell the position of the tab stops later. - let snippet = substitute(snippet, '${\d\+:\(.\{-}\)}', '&\1', 'g') - - " Update the a:snip so that all the $# become the text after - " the colon in their associated ${#}. - " (e.g. "${1:foo}" turns all "$1"'s into "foo") - let i = 1 - while stridx(snippet, '${'.i) != -1 - let s = matchstr(snippet, '${'.i.':\zs.\{-}\ze}') - if s != '' - let snippet = substitute(snippet, '$'.i, s.'&', 'g') - endif - let i += 1 - endw - - if &et " Expand tabs to spaces if 'expandtab' is set. - return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g') - endif - return snippet -endf - -" Counts occurences of haystack in needle -fun s:Count(haystack, needle) - let counter = 0 - let index = stridx(a:haystack, a:needle) - while index != -1 - let index = stridx(a:haystack, a:needle, index+1) - let counter += 1 - endw - return counter -endf - -" Builds a list of a list of each tab stop in the snippet containing: -" 1.) The tab stop's line number. -" 2.) The tab stop's column number -" (by getting the length of the string between the last "\n" and the -" tab stop). -" 3.) The length of the text after the colon for the current tab stop -" (e.g. "${1:foo}" would return 3). If there is no text, -1 is returned. -" 4.) If the "${#:}" construct is given, another list containing all -" the matches of "$#", to be replaced with the placeholder. This list is -" composed the same way as the parent; the first item is the line number, -" and the second is the column. -fun s:BuildTabStops(snip, lnum, col, indent) - let snipPos = [] - let i = 1 - let withoutVars = substitute(a:snip, '$\d\+', '', 'g') - while stridx(a:snip, '${'.i) != -1 - let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D') - let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g') - - let j = i - 1 - call add(snipPos, [0, 0, -1]) - let snipPos[j][0] = a:lnum + s:Count(beforeTabStop, "\n") - let snipPos[j][1] = a:indent + len(matchstr(withoutOthers, '.*\(\n\|^\)\zs.*\ze${'.i.'\D')) - if snipPos[j][0] == a:lnum | let snipPos[j][1] += a:col | endif - - " Get all $# matches in another list, if ${#:name} is given - if stridx(withoutVars, '${'.i.':') != -1 - let snipPos[j][2] = len(matchstr(withoutVars, '${'.i.':\zs.\{-}\ze}')) - let dots = repeat('.', snipPos[j][2]) - call add(snipPos[j], []) - let withoutOthers = substitute(a:snip, '${\d\+.\{-}}\|$'.i.'\@!\d\+', '', 'g') - while match(withoutOthers, '$'.i.'\(\D\|$\)') != -1 - let beforeMark = matchstr(withoutOthers, '^.\{-}\ze'.dots.'$'.i.'\(\D\|$\)') - call add(snipPos[j][3], [0, 0]) - let snipPos[j][3][-1][0] = a:lnum + s:Count(beforeMark, "\n") - let snipPos[j][3][-1][1] = a:indent + (snipPos[j][3][-1][0] > a:lnum - \ ? len(matchstr(beforeMark, '.*\n\zs.*')) - \ : a:col + len(beforeMark)) - let withoutOthers = substitute(withoutOthers, '$'.i.'\ze\(\D\|$\)', '', '') - endw - endif - let i += 1 - endw - return [snipPos, i - 1] -endf - -fun snipMate#jumpTabStop(backwards) - let leftPlaceholder = exists('s:origWordLen') - \ && s:origWordLen != g:snipPos[s:curPos][2] - if leftPlaceholder && exists('s:oldEndCol') - let startPlaceholder = s:oldEndCol + 1 - endif - - if exists('s:update') - call s:UpdatePlaceholderTabStops() - else - call s:UpdateTabStops() - endif - - " Don't reselect placeholder if it has been modified - if leftPlaceholder && g:snipPos[s:curPos][2] != -1 - if exists('startPlaceholder') - let g:snipPos[s:curPos][1] = startPlaceholder - else - let g:snipPos[s:curPos][1] = col('.') - let g:snipPos[s:curPos][2] = 0 - endif - endif - - let s:curPos += a:backwards ? -1 : 1 - " Loop over the snippet when going backwards from the beginning - if s:curPos < 0 | let s:curPos = s:snipLen - 1 | endif - - if s:curPos == s:snipLen - let sMode = s:endCol == g:snipPos[s:curPos-1][1]+g:snipPos[s:curPos-1][2] - call s:RemoveSnippet() - return sMode ? "\" : TriggerSnippet() - endif - - call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) - - let s:endLine = g:snipPos[s:curPos][0] - let s:endCol = g:snipPos[s:curPos][1] - let s:prevLen = [line('$'), col('$')] - - return g:snipPos[s:curPos][2] == -1 ? '' : s:SelectWord() -endf - -fun s:UpdatePlaceholderTabStops() - let changeLen = s:origWordLen - g:snipPos[s:curPos][2] - unl s:startCol s:origWordLen s:update - if !exists('s:oldVars') | return | endif - " Update tab stops in snippet if text has been added via "$#" - " (e.g., in "${1:foo}bar$1${2}"). - if changeLen != 0 - let curLine = line('.') - - for pos in g:snipPos - if pos == g:snipPos[s:curPos] | continue | endif - let changed = pos[0] == curLine && pos[1] > s:oldEndCol - let changedVars = 0 - let endPlaceholder = pos[2] - 1 + pos[1] - " Subtract changeLen from each tab stop that was after any of - " the current tab stop's placeholders. - for [lnum, col] in s:oldVars - if lnum > pos[0] | break | endif - if pos[0] == lnum - if pos[1] > col || (pos[2] == -1 && pos[1] == col) - let changed += 1 - elseif col < endPlaceholder - let changedVars += 1 - endif - endif - endfor - let pos[1] -= changeLen * changed - let pos[2] -= changeLen * changedVars " Parse variables within placeholders - " e.g., "${1:foo} ${2:$1bar}" - - if pos[2] == -1 | continue | endif - " Do the same to any placeholders in the other tab stops. - for nPos in pos[3] - let changed = nPos[0] == curLine && nPos[1] > s:oldEndCol - for [lnum, col] in s:oldVars - if lnum > nPos[0] | break | endif - if nPos[0] == lnum && nPos[1] > col - let changed += 1 - endif - endfor - let nPos[1] -= changeLen * changed - endfor - endfor - endif - unl s:endCol s:oldVars s:oldEndCol -endf - -fun s:UpdateTabStops() - let changeLine = s:endLine - g:snipPos[s:curPos][0] - let changeCol = s:endCol - g:snipPos[s:curPos][1] - if exists('s:origWordLen') - let changeCol -= s:origWordLen - unl s:origWordLen - endif - let lnum = g:snipPos[s:curPos][0] - let col = g:snipPos[s:curPos][1] - " Update the line number of all proceeding tab stops if has - " been inserted. - if changeLine != 0 - let changeLine -= 1 - for pos in g:snipPos - if pos[0] >= lnum - if pos[0] == lnum | let pos[1] += changeCol | endif - let pos[0] += changeLine - endif - if pos[2] == -1 | continue | endif - for nPos in pos[3] - if nPos[0] >= lnum - if nPos[0] == lnum | let nPos[1] += changeCol | endif - let nPos[0] += changeLine - endif - endfor - endfor - elseif changeCol != 0 - " Update the column of all proceeding tab stops if text has - " been inserted/deleted in the current line. - for pos in g:snipPos - if pos[1] >= col && pos[0] == lnum - let pos[1] += changeCol - endif - if pos[2] == -1 | continue | endif - for nPos in pos[3] - if nPos[0] > lnum | break | endif - if nPos[0] == lnum && nPos[1] >= col - let nPos[1] += changeCol - endif - endfor - endfor - endif -endf - -fun s:SelectWord() - let s:origWordLen = g:snipPos[s:curPos][2] - let s:oldWord = strpart(getline('.'), g:snipPos[s:curPos][1] - 1, - \ s:origWordLen) - let s:prevLen[1] -= s:origWordLen - if !empty(g:snipPos[s:curPos][3]) - let s:update = 1 - let s:endCol = -1 - let s:startCol = g:snipPos[s:curPos][1] - 1 - endif - if !s:origWordLen | return '' | endif - let l = col('.') != 1 ? 'l' : '' - if &sel == 'exclusive' - return "\".l.'v'.s:origWordLen."l\" - endif - return s:origWordLen == 1 ? "\".l.'gh' - \ : "\".l.'v'.(s:origWordLen - 1)."l\" -endf - -" This updates the snippet as you type when text needs to be inserted -" into multiple places (e.g. in "${1:default text}foo$1bar$1", -" "default text" would be highlighted, and if the user types something, -" UpdateChangedSnip() would be called so that the text after "foo" & "bar" -" are updated accordingly) -" -" It also automatically quits the snippet if the cursor is moved out of it -" while in insert mode. -fun s:UpdateChangedSnip(entering) - if exists('g:snipPos') && bufnr(0) != s:lastBuf - call s:RemoveSnippet() - elseif exists('s:update') " If modifying a placeholder - if !exists('s:oldVars') && s:curPos + 1 < s:snipLen - " Save the old snippet & word length before it's updated - " s:startCol must be saved too, in case text is added - " before the snippet (e.g. in "foo$1${2}bar${1:foo}"). - let s:oldEndCol = s:startCol - let s:oldVars = deepcopy(g:snipPos[s:curPos][3]) - endif - let col = col('.') - 1 - - if s:endCol != -1 - let changeLen = col('$') - s:prevLen[1] - let s:endCol += changeLen - else " When being updated the first time, after leaving select mode - if a:entering | return | endif - let s:endCol = col - 1 - endif - - " If the cursor moves outside the snippet, quit it - if line('.') != g:snipPos[s:curPos][0] || col < s:startCol || - \ col - 1 > s:endCol - unl! s:startCol s:origWordLen s:oldVars s:update - return s:RemoveSnippet() - endif - - call s:UpdateVars() - let s:prevLen[1] = col('$') - elseif exists('g:snipPos') - if !a:entering && g:snipPos[s:curPos][2] != -1 - let g:snipPos[s:curPos][2] = -2 - endif - - let col = col('.') - let lnum = line('.') - let changeLine = line('$') - s:prevLen[0] - - if lnum == s:endLine - let s:endCol += col('$') - s:prevLen[1] - let s:prevLen = [line('$'), col('$')] - endif - if changeLine != 0 - let s:endLine += changeLine - let s:endCol = col - endif - - " Delete snippet if cursor moves out of it in insert mode - if (lnum == s:endLine && (col > s:endCol || col < g:snipPos[s:curPos][1])) - \ || lnum > s:endLine || lnum < g:snipPos[s:curPos][0] - call s:RemoveSnippet() - endif - endif -endf - -" This updates the variables in a snippet when a placeholder has been edited. -" (e.g., each "$1" in "${1:foo} $1bar $1bar") -fun s:UpdateVars() - let newWordLen = s:endCol - s:startCol + 1 - let newWord = strpart(getline('.'), s:startCol, newWordLen) - if newWord == s:oldWord || empty(g:snipPos[s:curPos][3]) - return - endif - - let changeLen = g:snipPos[s:curPos][2] - newWordLen - let curLine = line('.') - let startCol = col('.') - let oldStartSnip = s:startCol - let updateTabStops = changeLen != 0 - let i = 0 - - for [lnum, col] in g:snipPos[s:curPos][3] - if updateTabStops - let start = s:startCol - if lnum == curLine && col <= start - let s:startCol -= changeLen - let s:endCol -= changeLen - endif - for nPos in g:snipPos[s:curPos][3][(i):] - " This list is in ascending order, so quit if we've gone too far. - if nPos[0] > lnum | break | endif - if nPos[0] == lnum && nPos[1] > col - let nPos[1] -= changeLen - endif - endfor - if lnum == curLine && col > start - let col -= changeLen - let g:snipPos[s:curPos][3][i][1] = col - endif - let i += 1 - endif - - " "Very nomagic" is used here to allow special characters. - call setline(lnum, substitute(getline(lnum), '\%'.col.'c\V'. - \ escape(s:oldWord, '\'), escape(newWord, '\&'), '')) - endfor - if oldStartSnip != s:startCol - call cursor(0, startCol + s:startCol - oldStartSnip) - endif - - let s:oldWord = newWord - let g:snipPos[s:curPos][2] = newWordLen -endf -" vim:noet:sw=4:ts=4:ft=vim diff --git a/.vim/buftabs.vim b/.vim/buftabs.vim deleted file mode 100644 index 30edea9..0000000 --- a/.vim/buftabs.vim +++ /dev/null @@ -1,309 +0,0 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" buftabs (C) 2006 Ico Doornekamp -" -" This program is free software; you can redistribute it and/or modify it -" under the terms of the GNU General Public License as published by the Free -" Software Foundation; either version 2 of the License, or (at your option) -" any later version. -" -" This program is distributed in the hope that it will be useful, but WITHOUT -" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -" more details. -" -" Introduction -" ------------ -" -" This is a simple script that shows a tabs-like list of buffers in the bottom -" of the window. The biggest advantage of this script over various others is -" that it does not take any lines away from your terminal, leaving more space -" for the document you're editing. The tabs are only visible when you need -" them - when you are switchin between buffers. -" -" Usage -" ----- -" -" This script draws buffer tabs on vim startup, when a new buffer is created -" and when switching between buffers. -" -" It might be handy to create a few maps for easy switching of buffers in your -" .vimrc file. For example, using F1 and F2 keys: -" -" noremap :bprev -" noremap :bnext -" -" or using control-left and control-right keys: -" -" :noremap :bprev -" :noremap :bnext -" -" -" The following extra configuration variables are availabe: -" -" * g:buftabs_only_basename -" -" Define this variable to make buftabs only print the filename of each buffer, -" omitting the preceding directory name. Add to your .vimrc: -" -" :let g:buftabs_only_basename=1 -" -" -" * g:buftabs_in_statusline -" -" Define this variable to make the plugin show the buftabs in the statusline -" instead of the command line. It is a good idea to configure vim to show -" the statusline as well when only one window is open. Add to your .vimrc: -" -" set laststatus=2 -" :let g:buftabs_in_statusline=1 -" -" -" * g:buftabs_active_highlight_group -" * g:buftabs_inactive_highlight_group -" -" The name of a highlight group (:help highligh-groups) which is used to -" show the name of the current active buffer and of all other inactive -" buffers. If these variables are not defined, no highlighting is used. -" (Highlighting is only functional when g:buftabs_in_statusline is enabled) -" -" :let g:buftabs_active_highlight_group="Visual" -" -" -" * g:buftabs_marker_start [ -" * g:buftabs_marker_end ] -" * g:buftabs_separator - -" -" These strings are drawn around each tab as separators. -" -" :let g:buftabs_separator = "." -" :let g:buftabs_marker_start = "(" -" :let g:buftabs_marker_end = ")" -" -" -" Changelog -" --------- -" -" 0.1 2006-09-22 Initial version -" -" 0.2 2006-09-22 Better handling when the list of buffers is longer then the -" window width. -" -" 0.3 2006-09-27 Some cleanups, set 'hidden' mode by default -" -" 0.4 2007-02-26 Don't draw buftabs until VimEnter event to avoid clutter at -" startup in some circumstances -" -" 0.5 2007-02-26 Added option for showing only filenames without directories -" in tabs -" -" 0.6 2007-03-04 'only_basename' changed to a global variable. Removed -" functions and add event handlers instead. 'hidden' mode -" broke some things, so is disabled now. Fixed documentation -" -" 0.7 2007-03-07 Added configuration option to show tabs in statusline -" instead of cmdline -" -" 0.8 2007-04-02 Update buftabs when leaving insertmode -" -" 0.9 2007-08-22 Now compatible with older Vim versions < 7.0 -" -" 0.10 2008-01-26 Added GPL license -" -" 0.11 2008-02-29 Added optional syntax highlighting to active buffer name -" -" 0.12 2009-03-18 Fixed support for split windows -" -" 0.13 2009-05-07 Store and reuse right-aligned part of original statusline -" -" 0.14 2010-01-28 Fixed bug that caused buftabs in command line being -" overwritten when 'hidden' mode is enabled. -" -" 0.15 2010-02-16 Fixed window width handling bug which caused strange -" behaviour in combination with the bufferlist plugin. -" Fixed wrong buffer display when deleting last window. -" Added extra options for tabs style and highlighting. -" -" 0.16 2010-02-28 Fixed bug causing errors when using buftabs in vim -" diff mode. -" -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -let w:buftabs_enabled = 0 -let w:original_statusline = matchstr(&statusline, "%=.*") - -" -" Don't bother when in diff mode -" - -if &diff - finish -endif - - -" -" Called on VimEnter event -" - -function! Buftabs_enable() - let w:buftabs_enabled = 1 -endfunction - - -" -" Persistent echo to avoid overwriting of status line when 'hidden' is enabled -" - -function! Pecho(msg) - let s:hold_ut=&ut|let &ut=1 - let s:Pecho=a:msg - aug Pecho - au CursorHold * ec s:Pecho - \|let &ut=s:hold_ut - \|aug Pecho|exe 'au!'|aug END|aug! Pecho - aug END -endf - - -" -" Draw the buftabs -" - -function! Buftabs_show(deleted_buf) - - let l:i = 1 - let l:list = '' - let l:start = 0 - let l:end = 0 - if ! exists("w:from") - let w:from = 0 - endif - - if ! exists("w:buftabs_enabled") - return - endif - - " Walk the list of buffers - - while(l:i <= bufnr('$')) - - " Only show buffers in the list, and omit help screens - - if buflisted(l:i) && getbufvar(l:i, "&modifiable") && a:deleted_buf != l:i - - " Get the name of the current buffer, and escape characters that might - " mess up the statusline - - if exists("g:buftabs_only_basename") - let l:name = fnamemodify(bufname(l:i), ":t") - else - let l:name = bufname(l:i) - endif - let l:name = substitute(l:name, "%", "%%", "g") - - " Append the current buffer number and name to the list. If the buffer - " is the active buffer, enclose it in some magick characters which will - " be replaced by markers later. If it is modified, it is appended with - " an exclaimation mark - - if winbufnr(winnr()) == l:i - let l:start = strlen(l:list) - let l:list = l:list . "\x01" - else - let l:list = l:list . ' ' - endif - - let l:buftabs_separator = "-" - if exists("g:buftabs_separator") - let l:buftabs_separator = g:buftabs_separator - endif - - let l:list = l:list . l:i . l:buftabs_separator - let l:list = l:list . l:name - - if getbufvar(l:i, "&modified") == 1 - let l:list = l:list . "!" - endif - - if winbufnr(winnr()) == l:i - let l:list = l:list . "\x02" - let l:end = strlen(l:list) - else - let l:list = l:list . ' ' - endif - end - - let l:i = l:i + 1 - endwhile - - " If the resulting list is too long to fit on the screen, chop - " out the appropriate part - - let l:width = winwidth(0) - 12 - - if(l:start < w:from) - let w:from = l:start - 1 - endif - if l:end > w:from + l:width - let w:from = l:end - l:width - endif - - let l:list = strpart(l:list, w:from, l:width) - - " Replace the magic characters by visible markers for highlighting the - " current buffer. The markers can be simple characters like square brackets, - " but can also be special codes with highlight groups - - let l:buftabs_marker_start = "[" - if exists("g:buftabs_marker_start") - let l:buftabs_marker_start = g:buftabs_marker_start - endif - - let l:buftabs_marker_end = "]" - if exists("g:buftabs_marker_end") - let l:buftabs_marker_end = g:buftabs_marker_end - endif - - if exists("g:buftabs_active_highlight_group") - if exists("g:buftabs_in_statusline") - let l:buftabs_marker_start = "%#" . g:buftabs_active_highlight_group . "#" . l:buftabs_marker_start - let l:buftabs_marker_end = l:buftabs_marker_end . "%##" - end - end - - if exists("g:buftabs_inactive_highlight_group") - if exists("g:buftabs_in_statusline") - let l:list = '%#' . g:buftabs_inactive_highlight_group . '#' . l:list - let l:list .= '%##' - let l:buftabs_marker_end = l:buftabs_marker_end . '%#' . g:buftabs_inactive_highlight_group . '#' - end - end - - let l:list = substitute(l:list, "\x01", l:buftabs_marker_start, 'g') - let l:list = substitute(l:list, "\x02", l:buftabs_marker_end, 'g') - - " Show the list. The buftabs_in_statusline variable determines of the list - " is displayed in the command line (volatile) or in the statusline - " (persistent) - - if exists("g:buftabs_in_statusline") - let &l:statusline = l:list . w:original_statusline - else - redraw - call Pecho(l:list) - end - -endfunction - - -" Hook to events to show buftabs at startup, when creating and when switching -" buffers - -autocmd VimEnter * call Buftabs_enable() -autocmd VimEnter,BufNew,BufEnter,BufWritePost * call Buftabs_show(-1) -autocmd BufDelete * call Buftabs_show(expand('')) -if version >= 700 - autocmd InsertLeave,VimResized * call Buftabs_show(-1) -end - -" vi: ts=2 sw=2 - diff --git a/.vim/charm.vim b/.vim/charm.vim deleted file mode 100644 index 38f2c89..0000000 --- a/.vim/charm.vim +++ /dev/null @@ -1,18 +0,0 @@ -fu! SendToCharm(subject,mood) - if a:subject == "" - let subject=input("Subject: ") - else - let subject=a:subject - endif - if a:mood == "" - let mood=input("Mood: ") - else - let mood=a:mood - endif - exe "w!" - exe "!cat % | charm -q -s \"".subject."\" -m \"".mood."\"" -endf - -if !exists(":PostToLJ") - command PostToLJ :call SendToCharm("","") -endif diff --git a/.vim/closetag.vim b/.vim/closetag.vim deleted file mode 100644 index 6ce41fb..0000000 --- a/.vim/closetag.vim +++ /dev/null @@ -1,327 +0,0 @@ -" File: closetag.vim -" Summary: Functions and mappings to close open HTML/XML tags -" Uses: -- close matching open tag -" Author: Steven Mueller -" Last Modified: Tue May 24 13:29:48 PDT 2005 -" Version: 0.9.1 -" XXX - breaks if close attempted while XIM is in preedit mode -" TODO - allow usability as a global plugin - -" Add g:unaryTagsStack - always contains html tags settings -" and g:closetag_default_xml - user should define this to default to xml -" When a close is attempted but b:unaryTagsStack undefined, -" use b:closetag_html_style to determine if the file is to be treated -" as html or xml. Failing that, check the filetype for xml or html. -" Finally, default to g:closetag_html_style. -" If the file is html, let b:unaryTagsStack=g:unaryTagsStack -" otherwise, let b:unaryTagsStack="" -" TODO - make matching work for all comments -" -- kinda works now, but needs syn sync minlines to be very long -" -- Only check whether in syntax in the beginning, then store comment tags -" in the tagstacks to determine whether to move into or out of comment mode -" TODO - The new normal mode mapping clears recent messages with its , and -" it doesn't fix the null-undo issue for vim 5.7 anyway. -" TODO - make use of the following neat features: -" -- the ternary ?: operator -" -- :echomsg and :echoerr -" -- curly brace expansion for variables and function name definitions? -" -- check up on map \FuncName -" -" Description: -" This script eases redundant typing when writing html or xml files (even if -" you're very good with ctrl-p and ctrl-n :). Hitting ctrl-_ will initiate a -" search for the most recent open tag above that is not closed in the -" intervening space and then insert the matching close tag at the cursor. In -" normal mode, the close tag is inserted one character after cursor rather than -" at it, as if a had been used. This allows putting close tags at the -" ends of lines while in normal mode, but disallows inserting them in the -" first column. -" -" For HTML, a configurable list of tags are ignored in the matching process. -" By default, the following tags will not be matched and thus not closed -" automatically: area, base, br, dd, dt, hr, img, input, link, meta, and -" param. -" -" For XML, all tags must have a closing match or be terminated by />, as in -" . These empty element tags are ignored for matching. -" -" Comment checking is now handled by vim's internal syntax checking. If tag -" closing is initiated outside a comment, only tags outside of comments will -" be matched. When closing tags in comments, only tags within comments will -" be matched, skipping any non-commented out code (wee!). However, the -" process of determining the syntax ID of an arbitrary position can still be -" erroneous if a comment is not detected because the syntax highlighting is -" out of sync, or really slow if syn sync minlines is large. -" Set the b:closetag_disable_synID variable to disable this feature if you -" have really big chunks of comment in your code and closing tags is too slow. -" -" If syntax highlighting is not enabled, comments will not be handled very -" well. Commenting out HTML in certain ways may cause a "tag mismatch" -" message and no completion. For example, '' -" between the cursor and the most recent unclosed open tag above causes -" trouble. Properly matched well formed tags in comments don't cause a -" problem. -" -" Install: -" To use, place this file in your standard vim scripts directory, and source -" it while editing the file you wish to close tags in. If the filetype is not -" set or the file is some sort of template with embedded HTML, you may force -" HTML style tag matching by first defining the b:closetag_html_style buffer -" variable. Otherwise, the default is XML style tag matching. -" -" Example: -" :let b:closetag_html_style=1 -" :source ~/.vim/scripts/closetag.vim -" -" For greater convenience, load this script in an autocommand: -" :au Filetype html,xml,xsl source ~/.vim/scripts/closetag.vim -" -" Also, set noignorecase for html files or edit b:unaryTagsStack to match your -" capitalization style. You may set this variable before or after loading the -" script, or simply change the file itself. -" -" Configuration Variables: -" -" b:unaryTagsStack Buffer local string containing a whitespace -" seperated list of element names that should be -" ignored while finding matching closetags. Checking -" is done according to the current setting of the -" ignorecase option. -" -" b:closetag_html_style Define this (as with let b:closetag_html_style=1) -" and source the script again to set the -" unaryTagsStack to its default value for html. -" -" b:closetag_disable_synID Define this to disable comment checking if tag -" closing is too slow. This can be set or unset -" without having to source again. -" -" Changelog: -" May 24, 2005 Tuesday -" * Changed function names to be script-local to avoid conflicts with other -" scripts' stack implementations. -" -" June 07, 2001 Thursday -" * Added comment handling. Currently relies on synID, so if syn sync -" minlines is small, the chance for failure is high, but if minlines is -" large, tagclosing becomes rather slow... -" -" * Changed normal mode closetag mapping to use in insert mode -" rather than p in normal mode. This has 2 implications: -" - Tag closing no longer clobbers the unnamed register -" - When tag closing fails or finds no match, no longer adds to the undo -" buffer for recent vim 6.0 development versions. -" - However, clears the last message when closing tags in normal mode -" -" * Changed the closetag_html_style variable to be buffer-local rather than -" global. -" -" * Expanded documentation - -"------------------------------------------------------------------------------ -" User configurable settings -"------------------------------------------------------------------------------ - -" if html, don't close certain tags. Works best if ignorecase is set. -" otherwise, capitalize these elements according to your html editing style -if !exists("b:unaryTagsStack") || exists("b:closetag_html_style") - if &filetype == "html" || exists("b:closetag_html_style") - let b:unaryTagsStack="area base br dd dt hr img input link meta param" - else " for xsl and xsl - let b:unaryTagsStack="" - endif -endif - -" Has this already been loaded? -if exists("loaded_closetag") - finish -endif -let loaded_closetag=1 - -" set up mappings for tag closing -inoremap =GetCloseTag() -map a - -"------------------------------------------------------------------------------ -" Tag closer - uses the stringstack implementation below -"------------------------------------------------------------------------------ - -" Returns the most recent unclosed tag-name -" (ignores tags in the variable referenced by a:unaryTagsStack) -function! GetLastOpenTag(unaryTagsStack) - " Search backwards through the file line by line using getline() - " Overall strategy (moving backwards through the file from the cursor): - " Push closing tags onto a stack. - " On an opening tag, if the tag matches the stack top, discard both. - " -- if the tag doesn't match, signal an error. - " -- if the stack is empty, use this tag - let linenum=line(".") - let lineend=col(".") - 1 " start: cursor position - let first=1 " flag for first line searched - let b:TagStack="" " main stack of tags - let startInComment=s:InComment() - - let tagpat='' - " Search for: closing tags - while (linenum>0) - " Every time we see an end-tag, we push it on the stack. When we see an - " open tag, if the stack isn't empty, we pop it and see if they match. - " If no, signal an error. - " If yes, continue searching backwards. - " If stack is empty, return this open tag as the one that needs closing. - let line=getline(linenum) - if first - let line=strpart(line,0,lineend) - else - let lineend=strlen(line) - endif - let b:lineTagStack="" - let mpos=0 - let b:TagCol=0 - " Search the current line in the forward direction, pushing any tags - " onto a special stack for the current line - while (mpos > -1) - let mpos=matchend(line,tagpat) - if mpos > -1 - let b:TagCol=b:TagCol+mpos - let tag=matchstr(line,tagpat) - - if exists("b:closetag_disable_synID") || startInComment==s:InCommentAt(linenum, b:TagCol) - let b:TagLine=linenum - call s:Push(matchstr(tag,'[^<>]\+'),"b:lineTagStack") - endif - "echo "Tag: ".tag." ending at position ".mpos." in '".line."'." - let lineend=lineend-mpos - let line=strpart(line,mpos,lineend) - endif - endwhile - " Process the current line stack - while (!s:EmptystackP("b:lineTagStack")) - let tag=s:Pop("b:lineTagStack") - if match(tag, "^/") == 0 "found end tag - call s:Push(tag,"b:TagStack") - "echo linenum." ".b:TagStack - elseif s:EmptystackP("b:TagStack") && !s:Instack(tag, a:unaryTagsStack) "found unclosed tag - return tag - else - let endtag=s:Peekstack("b:TagStack") - if endtag == "/".tag || endtag == "/" - call s:Pop("b:TagStack") "found a open/close tag pair - "echo linenum." ".b:TagStack - elseif !s:Instack(tag, a:unaryTagsStack) "we have a mismatch error - echohl Error - echon "\rError:" - echohl None - echo " tag mismatch: <".tag."> doesn't match <".endtag.">. (Line ".linenum." Tagstack: ".b:TagStack.")" - return "" - endif - endif - endwhile - let linenum=linenum-1 | let first=0 - endwhile - " At this point, we have exhausted the file and not found any opening tag - echo "No opening tags." - return "" -endfunction - -" Returns closing tag for most recent unclosed tag, respecting the -" current setting of b:unaryTagsStack for tags that should not be closed -function! GetCloseTag() - let tag=GetLastOpenTag("b:unaryTagsStack") - if tag == "" - return "" - else - return "" - endif -endfunction - -" return 1 if the cursor is in a syntactically identified comment field -" (fails for empty lines: always returns not-in-comment) -function! s:InComment() - return synIDattr(synID(line("."), col("."), 0), "name") =~ 'Comment' -endfunction - -" return 1 if the position specified is in a syntactically identified comment field -function! s:InCommentAt(line, col) - return synIDattr(synID(a:line, a:col, 0), "name") =~ 'Comment' -endfunction - -"------------------------------------------------------------------------------ -" String Stacks -"------------------------------------------------------------------------------ -" These are strings of whitespace-separated elements, matched using the \< and -" \> patterns after setting the iskeyword option. -" -" The sname argument should contain a symbolic reference to the stack variable -" on which method should operate on (i.e., sname should be a string containing -" a fully qualified (ie: g:, b:, etc) variable name.) - -" Helper functions -function! s:SetKeywords() - let g:IsKeywordBak=&iskeyword - let &iskeyword="33-255" -endfunction - -function! s:RestoreKeywords() - let &iskeyword=g:IsKeywordBak -endfunction - -" Push el onto the stack referenced by sname -function! s:Push(el, sname) - if !s:EmptystackP(a:sname) - exe "let ".a:sname."=a:el.' '.".a:sname - else - exe "let ".a:sname."=a:el" - endif -endfunction - -" Check whether the stack is empty -function! s:EmptystackP(sname) - exe "let stack=".a:sname - if match(stack,"^ *$") == 0 - return 1 - else - return 0 - endif -endfunction - -" Return 1 if el is in stack sname, else 0. -function! s:Instack(el, sname) - exe "let stack=".a:sname - call s:SetKeywords() - let m=match(stack, "\\<".a:el."\\>") - call s:RestoreKeywords() - if m < 0 - return 0 - else - return 1 - endif -endfunction - -" Return the first element in the stack -function! s:Peekstack(sname) - call s:SetKeywords() - exe "let stack=".a:sname - let top=matchstr(stack, "\\<.\\{-1,}\\>") - call s:RestoreKeywords() - return top -endfunction - -" Remove and return the first element in the stack -function! s:Pop(sname) - if s:EmptystackP(a:sname) - echo "Error! Stack ".a:sname." is empty and can't be popped." - return "" - endif - exe "let stack=".a:sname - " Find the first space, loc is 0-based. Marks the end of 1st elt in stack. - call s:SetKeywords() - let loc=matchend(stack,"\\<.\\{-1,}\\>") - exe "let ".a:sname."=strpart(stack, loc+1, strlen(stack))" - let top=strpart(stack, match(stack, "\\<"), loc) - call s:RestoreKeywords() - return top -endfunction - -function! s:Clearstack(sname) - exe "let ".a:sname."=''" -endfunction diff --git a/.vim/coc-settings.json b/.vim/coc-settings.json deleted file mode 100644 index eea4ad7..0000000 --- a/.vim/coc-settings.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "suggest.timeout": 5000, - "suggest.enablePreview": true, - "suggest.maxPreviewWidth": 70, - "diagnostic.displayByAle": false, - "diagnostic.checkCurrentLine": true, - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.mypyEnabled": true, - "python.linting.mypyArgs": ["--ignore-missing-imports"], - "python.venvPath": "~/.virtualenvs", - "python.analysis.typeCheckingMode": "off", - "suggest.detailField": "abbr", - "suggest.snippetIndicator": "", - "rust-analyzer.server.path": "rust-analyzer", - "rust-analyzer.inlayHints.enable": false, - "languageserver": { - "ccls": { - "command": "ccls", - "filetypes": ["c", "cc", "cpp", "cuda", "objc", "objcpp"], - "rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"], - "initializationOptions": { - "cache": { - "directory": ".ccls-cache" - } - } - }, - "golang": { - "command": "gopls", - "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], - "filetypes": ["go"] - } - } -} diff --git a/.vim/colors/barak.vim b/.vim/colors/barak.vim deleted file mode 100644 index c882944..0000000 --- a/.vim/colors/barak.vim +++ /dev/null @@ -1,110 +0,0 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" File: "/home/michener/.vim/barak.vim" -" Copyright (C) 2008, Barak Michener -" Modified from colorscheme "dante": -" Copyright (C) 2002, Caciano Machado -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Colorscheme Option: -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -hi clear -if exists("syntax on") - syntax reset -endif -let g:colors_name = "barak" - -" General colors -hi Normal ctermfg=gray guifg=grey75 guibg=black -hi Directory term=bold ctermfg=blue guifg=royalblue -hi ErrorMsg term=standout ctermfg=white ctermbg=red guifg=white guibg=red3 -"hi NonText term=bold ctermfg=darkgray guibg=gray3 guifg=gray20 -hi NonText term=bold ctermfg=gray guibg=gray3 guifg=gray40 -hi SpecialKey term=bold ctermfg=darkgray guifg=gray30 -hi LineNr term=underline ctermfg=darkgray guifg=ivory4 guibg=gray4 -hi IncSearch term=reverse cterm=reverse gui=reverse,bold guifg=darkgoldenrod2 -hi Search term=reverse ctermfg=black ctermbg=yellow guifg=gray10 guibg=gold2 -hi Visual term=bold,reverse cterm=bold,reverse ctermfg=gray ctermbg=black gui=bold,reverse guifg=gray40 guibg=black -hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline -hi MoreMsg term=bold ctermfg=green gui=bold guifg=olivedrab1 -hi ModeMsg term=bold ctermfg=red cterm=bold gui=bold guifg=red -hi Question term=standout ctermfg=green gui=bold guifg=olivedrab1 -hi WarningMsg term=standout ctermfg=red gui=bold guifg=red3 -hi WildMenu term=standout ctermfg=black ctermbg=yellow guifg=black guibg=gold2 -hi Folded term=standout ctermfg=blue ctermbg=white guifg=royalblue1 guibg=white -hi FoldColumn term=standout ctermfg=blue ctermbg=white guifg=royalblue3 guibg=white -hi DiffAdd term=bold ctermbg=blue guibg=royalblue2 -hi DiffChange term=bold ctermbg=darkmagenta guibg=maroon -hi DiffDelete term=bold cterm=bold ctermfg=lightblue ctermbg=cyan gui=bold guifg=lightblue guibg=cyan4 -hi DiffText term=reverse cterm=bold ctermbg=red gui=bold guibg=red3 -hi Cursor guifg=bg guibg=fg -hi CursorLine term=NONE cterm=bold guibg=grey20 -"hi lCursor guifg=bg guibg=fg -hi StatusLine term=reverse cterm=reverse gui=reverse guifg=gray60 -hi StatusLineNC term=reverse cterm=reverse gui=reverse guifg=gray40 -hi VertSplit term=reverse cterm=reverse gui=bold,reverse guifg=gray40 -hi Title term=bold ctermfg=magenta gui=bold guifg=aquamarine - -if version >= 700 - hi Pmenu ctermfg=white ctermbg=blue guifg=white guibg=MidnightBlue - hi PmenuSel ctermfg=darkblue ctermbg=white guibg=white guifg=MidnightBlue - hi PmenuSbar ctermfg=lightgray ctermbg=darkgray - hi PmenuThumb cterm=reverse - hi WildMenu term=standout ctermfg=white ctermbg=blue -endif - -" syntax hi colors -hi Comment term=bold ctermfg=darkgreen guifg=ForestGreen -hi PreProc term=underline ctermfg=darkmagenta guifg=magenta3 - -hi makoDelim term=underline ctermfg=darkyellow guifg=goldenrod1 guibg=gray25 -hi makoAttributeKey term=underline ctermfg=darkcyan gui=bold guifg=turquoise3 guibg=gray25 -hi makoAttributeValue term=underline ctermfg=red guifg=firebrick3 guibg=gray25 -hi makoText ctermfg=gray guifg=gray55 guibg=gray25 -hi makoEnd term=bold ctermfg=blue gui=bold guifg=RoyalBlue1 guibg=gray25 -hi makoComment term=bold ctermfg=darkgreen guifg=ForestGreen guibg=gray25 -hi makoEscape term=underline ctermfg=brown guifg=khaki3 guibg=gray25 - -hi Constant term=underline ctermfg=red guifg=#b62f61 -hi String term=underline ctermfg=red guifg=firebrick3 -hi Boolean term=underline ctermfg=magenta guifg=LightSalmon1 -"hi Type term=underline ctermfg=darkcyan gui=none guifg=CadetBlue3 -hi Type term=underline ctermfg=darkcyan gui=bold guifg=turquoise3 -hi Statement term=bold ctermfg=blue gui=bold guifg=RoyalBlue1 -hi Identifier term=underline ctermfg=darkcyan guifg=DeepSkyBlue -hi Function ctermfg=darkcyan gui=bold guifg=MediumPurple2 -hi Ignore term=bold ctermfg=darkgray gui=bold guifg=gray45 -hi Special term=underline ctermfg=brown guifg=khaki3 -hi Error term=reverse ctermfg=gray ctermbg=red guifg=gray guibg=red3 -hi Todo term=standout ctermfg=black ctermbg=yellow gui=bold guifg=gray10 guibg=yellow4 -hi Underlined term=underline cterm=underline ctermfg=blue gui=underline guifg=slateblue -hi Number term=underline ctermfg=darkyellow guifg=goldenrod1 -" syntax hi links -hi link String Constant -hi link Character Constant -hi link Number Constant -"hi link Boolean Constant -hi link javaScriptNull Special -hi link Float Number -"hi link Function Identifier -hi link Number Constant -hi link Conditional Statement -hi link Repeat Statement -hi link Label Statement -hi link Keyword Statement -hi link Exception Statement -hi link Operator Statement -hi link Include PreProc -"hi link Define PreProc -hi link Define Statement -hi link Macro PreProc -hi link PreCondit PreProc -"hi link StorageClass Type -hi link StorageClass Statement -"hi link Structure Type -hi link Structure Statement -hi link Typedef Type -hi link Tag Special -hi link SpecialChar Special -hi link Delimiter Special -hi link SpecialComment Special -hi link Debug Special -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/.vim/colors/baraknew.vim b/.vim/colors/baraknew.vim deleted file mode 100644 index 504e3c5..0000000 --- a/.vim/colors/baraknew.vim +++ /dev/null @@ -1,434 +0,0 @@ -" Vim color file -" Maintainer: Barak Michener -" Modified From: "lucius.vim" by Jonathan Filip -" Last Modified: Tue Mar 16 18:11:08 PDT 2010 -" Version: 1.0 -" -" GUI / 256 color terminal -" -" I started out trying to combine my favorite parts of other schemes and ended -" up with this (oceandeep, moria, peaksea, wombat, zenburn). -" -" This file also tries to have descriptive comments for each higlighting group -" so it is easy to understand what each part does. - - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif -let colors_name="baraknew" - -" Some other colors to save -" blue: 3eb8e5 -" green: 92d400 -" c green: d5f876, cae682 -" new blue: 002D62 -" new gray: CCCCCC - - -" Base color -" ---------- -hi Normal guifg=#e0e0e0 guibg=#121212 -hi Normal ctermfg=253 ctermbg=NONE - - -" Comment Group -" ------------- -" any comment -hi Comment guifg=#238e23 gui=italic -hi Comment ctermfg=34 cterm=italic - - -" Constant Group -" -------------- -" any constant -hi Constant guifg=#e3ac3d gui=none -hi Constant ctermfg=172 cterm=none -" strings -hi String guifg=#f05656 gui=none -hi String ctermfg=203 cterm=none -" character constant -hi Character guifg=#e3ac3d gui=none -hi Character ctermfg=172 cterm=none -" numbers decimal/hex -hi Number guifg=#eead0e gui=none -hi Number ctermfg=214 cterm=none -" true, false -hi Boolean guifg=#e1634f gui=none -hi Boolean ctermfg=203 cterm=none -" float -hi Float guifg=#8cd0d3 gui=none -hi Float ctermfg=116 cterm=none - - -" Identifier Group -" ---------------- -" any variable name -hi Identifier guifg=#00bfff gui=none -hi Identifier ctermfg=39 cterm=none -" function, method, class -"hi Function guifg=#8e72c7 gui=none -"hi Function ctermfg=98 cterm=none -hi Function guifg=#c5a6ff gui=none -hi Function ctermfg=141 cterm=none - - -" Statement Group -" --------------- -" any statement -hi Statement guifg=#4876ff gui=bold -hi Statement ctermfg=33 cterm=bold -" if, then, else -"XXX Test this out -"hi Conditional guifg=#b3d38c gui=none -"hi Conditional ctermfg=150 cterm=none -hi Conditional guifg=#5fa6e8 gui=bold -hi Conditional ctermfg=75 cterm=bold -" try, catch, throw, raise -"XXX Test this out -"hi Exception guifg=#b3d38c gui=none -"hi Exception ctermfg=150 cterm=none -hi Exception guifg=#5fa6e8 gui=bold -hi Exception ctermfg=75 cterm=bold -" for, while, do -"XXX Test this out -"hi Repeat guifg=#b3d38c gui=none -"hi Repeat ctermfg=150 cterm=none -hi Repeat guifg=#5fa6e8 gui=bold -hi Repeat ctermfg=75 cterm=bold -" case, default -hi Label guifg=#4876ff gui=bold -hi Label ctermfg=69 cterm=bold -" sizeof, +, * -"hi Operator guifg=#b3d38c gui=none -"hi Operator ctermfg=150 cterm=none -hi Operator guifg=#5fa6e8 gui=bold -hi Operator ctermfg=75 cterm=bold -" any other keyword -hi Keyword guifg=#b3d38c gui=none -hi Keyword ctermfg=150 cterm=none - - -" Preprocessor Group -" ------------------ -" generic preprocessor -hi PreProc guifg=#e9dfaf gui=none -hi PreProc ctermfg=223 cterm=none -" #include -hi Include guifg=#e9dfaf gui=none -hi Include ctermfg=223 cterm=none -" #define -hi Define guifg=#e9dfaf gui=none -hi Define ctermfg=223 cterm=none -" same as define -hi Macro guifg=#e9dfaf gui=none -hi Macro ctermfg=223 cterm=none -" #if, #else, #endif -hi PreCondit guifg=#e9dfaf gui=none -hi PreCondit ctermfg=223 cterm=none - - -" Type Group -" ---------- -" int, long, char -hi Type guifg=#73e1e6 gui=none -hi Type ctermfg=116 cterm=none -" static, register, volative -hi StorageClass guifg=#66b7e1 gui=none -hi StorageClass ctermfg=116 cterm=none -" struct, union, enum -hi Structure guifg=#73e1e6 gui=none -hi Structure ctermfg=116 cterm=none -" typedef -hi Typedef guifg=#73e1e6 gui=none -hi Typedef ctermfg=116 cterm=none -" classes? b2ad50/143 -hi Class guifg=#00afff gui=none -hi Class ctermfg=39 cterm=none - -hi link cCustomClass Class -hi link javaCustomClass Class - - -" Special Group -" ------------- -" any special symbol -"hi Special guifg=#cca3b3 gui=none -"hi Special ctermfg=227 cterm=none -hi Special guifg=#c2b742 gui=none -hi Special ctermfg=179 cterm=none -" special character in a constant -hi SpecialChar guifg=#c2b742 gui=none -hi SpecialChar ctermfg=179 cterm=none -" things you can CTRL-] -hi Tag guifg=#c2b742 gui=none -hi Tag ctermfg=179 cterm=none -" character that needs attention -hi Delimiter guifg=#c2b742 gui=none -hi Delimiter ctermfg=179 cterm=none -" special things inside a comment -hi SpecialComment guifg=#c2b742 gui=none -hi SpecialComment ctermfg=179 cterm=none -" debugging statements -hi Debug guifg=#c2b742 guibg=NONE gui=none -hi Debug ctermfg=179 ctermbg=NONE cterm=none - - -" Underlined Group -" ---------------- -" text that stands out, html links -hi Underlined guifg=fg gui=underline -hi Underlined ctermfg=fg cterm=underline - - -" Ignore Group -" ------------ -" left blank, hidden -hi Ignore guifg=bg -hi Ignore ctermfg=0 - - -" Error Group -" ----------- -" any erroneous construct -hi Error guifg=#e37170 guibg=#432323 gui=none -hi Error ctermfg=167 ctermbg=52 cterm=none - - -" Todo Group -" ---------- -" todo, fixme, note, xxx -hi Todo guifg=#efefaf guibg=#434323 gui=bold -hi Todo ctermfg=229 ctermbg=58 cterm=bold - - -" Spelling -" -------- -" word not recognized -hi SpellBad guisp=#ee0000 gui=undercurl -hi SpellBad ctermbg=9 cterm=undercurl -" word not capitalized -hi SpellCap guisp=#eeee00 gui=undercurl -hi SpellCap ctermbg=12 cterm=undercurl -" rare word -hi SpellRare guisp=#ffa500 gui=undercurl -hi SpellRare ctermbg=13 cterm=undercurl -" wrong spelling for selected region -hi SpellLocal guisp=#ffa500 gui=undercurl -hi SpellLocal ctermbg=14 cterm=undercurl - - -" Cursor -" ------ -" character under the cursor -hi Cursor guifg=bg guibg=#a3e3ed -hi Cursor ctermfg=0 ctermbg=153 -" like cursor, but used when in IME mode -hi CursorIM guifg=bg guibg=#96cdcd -hi CursorIM ctermfg=0 ctermbg=116 -" cursor column -hi CursorColumn guifg=NONE guibg=#202438 gui=none -hi CursorColumn ctermfg=NONE ctermbg=236 cterm=none -" cursor line/row -hi CursorLine gui=NONE guibg=#202438 gui=none -hi CursorLine cterm=NONE ctermbg=236 cterm=none - - -" Misc -" ---- -" directory names and other special names in listings -hi Directory guifg=#c0e0b0 gui=none -hi Directory ctermfg=151 cterm=none -" error messages on the command line -hi ErrorMsg guifg=#ee0000 guibg=NONE gui=none -hi ErrorMsg ctermfg=196 ctermbg=NONE cterm=none -" column separating vertically split windows -hi VertSplit guifg=#777777 guibg=#363946 gui=none -hi VertSplit ctermfg=242 ctermbg=237 cterm=none -" columns where signs are displayed (used in IDEs) -hi SignColumn guifg=#9fafaf guibg=#181818 gui=none -hi SignColumn ctermfg=145 ctermbg=233 cterm=none -" line numbers -hi LineNr guifg=#818698 guibg=#363946 -hi LineNr ctermfg=102 ctermbg=237 -" match parenthesis, brackets -hi MatchParen guifg=#00ff00 guibg=NONE gui=bold -hi MatchParen ctermfg=46 ctermbg=NONE cterm=bold -" the 'more' prompt when output takes more than one line -hi MoreMsg guifg=#2e8b57 gui=none -hi MoreMsg ctermfg=29 cterm=none -" text showing what mode you are in -hi ModeMsg guifg=#76d5f8 guibg=NONE gui=none -hi ModeMsg ctermfg=117 ctermbg=NONE cterm=none -" the '~' and '@' and showbreak, '>' double wide char doesn't fit on line -hi NonText guifg=#404040 gui=none -hi NonText ctermfg=235 cterm=none -" the hit-enter prompt (show more output) and yes/no questions -hi Question guifg=fg gui=none -hi Question ctermfg=fg cterm=none -" meta and special keys used with map, unprintable characters -hi SpecialKey guifg=#405060 -hi SpecialKey ctermfg=237 -" titles for output from :set all, :autocmd, etc -hi Title guifg=#62bdde gui=none -hi Title ctermfg=74 cterm=none -"hi Title guifg=#5ec8e5 gui=none -" warning messages -hi WarningMsg guifg=#e5786d gui=none -hi WarningMsg ctermfg=173 cterm=none -" current match in the wildmenu completion -hi WildMenu guifg=#cae682 guibg=#363946 gui=bold,underline -hi WildMenu ctermfg=16 ctermbg=186 cterm=bold - - -" Diff -" ---- -" added line -hi DiffAdd guifg=#80a090 guibg=#313c36 gui=none -hi DiffAdd ctermfg=fg ctermbg=22 cterm=none -" changed line -hi DiffChange guifg=NONE guibg=#4a343a gui=none -hi DiffChange ctermfg=fg ctermbg=58 cterm=none -" deleted line -hi DiffDelete guifg=#6c6661 guibg=#3c3631 gui=none -hi DiffDelete ctermfg=fg ctermbg=52 cterm=none -" changed text within line -hi DiffText guifg=#f05060 guibg=#4a343a gui=bold -hi DiffText ctermfg=203 ctermbg=52 cterm=bold - - -" Folds -" ----- -" line used for closed folds -hi Folded guifg=#91d6f8 guibg=#363946 gui=none -hi Folded ctermfg=117 ctermbg=238 cterm=none -" column on side used to indicated open and closed folds -hi FoldColumn guifg=#91d6f8 guibg=#363946 gui=none -hi FoldColumn ctermfg=117 ctermbg=238 cterm=none - - -" Search -" ------ -" highlight incremental search text; also highlight text replaced with :s///c -hi IncSearch guifg=#66ffff gui=reverse -hi IncSearch ctermfg=87 cterm=reverse -" hlsearch (last search pattern), also used for quickfix -hi Search guibg=#e0e096 gui=none -hi Search ctermbg=214 cterm=none - - -" Popup Menu -" ---------- -" normal item in popup -"hi Pmenu guifg=#e0e0e0 guibg=#303840 gui=none -"hi Pmenu ctermfg=253 ctermbg=233 cterm=none -hi Pmenu guifg=#e0e0e0 guibg=#303840 gui=none -hi Pmenu ctermfg=253 ctermbg=237 cterm=none -" selected item in popup -hi PmenuSel guifg=#cae682 guibg=#505860 gui=none -hi PmenuSel ctermfg=186 ctermbg=239 cterm=none -" scrollbar in popup -hi PMenuSbar guibg=#505860 gui=none -hi PMenuSbar ctermbg=59 cterm=none -" thumb of the scrollbar in the popup -hi PMenuThumb guibg=#808890 gui=none -hi PMenuThumb ctermbg=102 cterm=none - - -" Status Line -" ----------- -" status line for current window -hi StatusLine guifg=#e0e0e0 guibg=#363946 gui=bold -hi StatusLine ctermfg=254 ctermbg=237 cterm=bold -" status line for non-current windows -hi StatusLineNC guifg=#767986 guibg=#363946 gui=none -hi StatusLineNC ctermfg=244 ctermbg=237 cterm=none - - -" Tab Lines -" --------- -" tab pages line, not active tab page label -hi TabLine guifg=#b6bf98 guibg=#363946 gui=none -hi TabLine ctermfg=244 ctermbg=236 cterm=none -" tab pages line, where there are no labels -hi TabLineFill guifg=#cfcfaf guibg=#363946 gui=none -hi TabLineFill ctermfg=187 ctermbg=236 cterm=none -" tab pages line, active tab page label -hi TabLineSel guifg=#efefef guibg=#414658 gui=bold -hi TabLineSel ctermfg=254 ctermbg=236 cterm=bold - - -" Visual -" ------ -" visual mode selection -hi Visual guifg=NONE guibg=#364458 -hi Visual ctermfg=NONE ctermbg=24 -" visual mode selection when vim is not owning the selection (x11 only) -hi VisualNOS guifg=fg gui=underline -hi VisualNOS ctermfg=fg cterm=underline - -" Specials for Languages -" ---------------------- - -"hi makoLine guibg=#111111 gui=none -"hi makoLine ctermbg=234 cterm=none -hi makoAttributeKey term=underline ctermfg=darkcyan gui=bold guifg=turquoise3 guibg=gray25 ctermbg=234 -hi makoAttributeValue term=underline ctermfg=red guifg=firebrick3 guibg=gray25 ctermbg=234 -"hi makoText ctermfg=gray guifg=gray55 guibg=gray25 ctermbg=234 -hi makoEnd guifg=#b3d38c gui=bold guibg=gray25 -hi makoEnd ctermfg=150 cterm=bold ctermbg=234 -hi makoDelim guifg=#e9dfaf gui=none guibg=gray25 -hi makoDelim ctermfg=223 cterm=none ctermbg=234 -hi makoEscape term=underline guibg=gray25 ctermbg=234 - - -" Specials for org-mode -" --------------------- - - -" define foreground colors for ****UNfolded**** outline heading levels -hi OL1 guifg=#7744ff ctermfg=blue -hi OL2 guifg=#aaaa22 ctermfg=brown -hi OL3 guifg=#00ccff ctermfg=cyan -hi OL4 guifg=#999999 gui=italic ctermfg=gray -hi OL5 guifg=#eeaaee ctermfg=lightgray -hi OL6 guifg=#9966ff ctermfg=yellow -hi OL7 guifg=#dd99dd ctermfg=red -hi OL8 guifg=cyan ctermfg=grey -hi OL9 guifg=magenta ctermfg=blue - -" various text item highlightings are below -hi Properties guifg=pink ctermfg=lightred -hi Tags guifg=pink ctermfg=lightred -hi Dates guifg=magenta ctermfg=magenta -hi stars guifg=#444444 ctermfg=darkgray -hi Props guifg=#ffa0a0 ctermfg=lightred -hi code guifg=orange gui=bold ctermfg=14 -hi itals gui=italic guifg=#aaaaaa ctermfg=lightgray -hi boldtext gui=bold guifg=#aaaaaa ctermfg=lightgray -hi undertext gui=underline guifg=#aaaaaa ctermfg=lightgray -hi lnumber guifg=#999999 ctermfg=gray - -hi TODO guifg=orange guibg=NONE ctermfg=14 ctermbg=NONE -hi CANCELED guifg=red guibg=NONE ctermfg=red ctermbg=NONE -hi STARTED guifg=yellow guibg=NONE ctermfg=yellow ctermbg=NONE -hi NEXT guifg=cyan guibg=NONE ctermfg=cyan ctermbg=NONE -hi DONE guifg=green guibg=NONE ctermfg=green ctermbg=NONE - -" For denite.nvim -" - -hi deniteMatchedChar guifg=#FFFFFF guibg=#5F87FF ctermfg=15 ctermbg=27 -hi link NormalFloat Pmenu - - -" Vim-Signify -" ---- -hi SignifySignAdd guifg=#80a090 guibg=#181818 gui=none -hi SignifySignAdd ctermfg=29 ctermbg=233 cterm=none -hi SignifySignChange guifg=#4a343a guibg=#181818 gui=none -hi SignifySignChange ctermfg=100 ctermbg=233 cterm=none -hi SignifySignDelete guifg=#6c6661 guibg=#181818 gui=none -hi SignifySignDelete ctermfg=124 ctermbg=233 cterm=none diff --git a/.vim/colors/dante.vim b/.vim/colors/dante.vim deleted file mode 100644 index f584889..0000000 --- a/.vim/colors/dante.vim +++ /dev/null @@ -1,83 +0,0 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" File: "/home/caciano/.vim/dante.vim" -" Created: "Thu, 23 May 2002 00:12:20 -0300 (caciano)" -" Updated: "Sat, 24 Aug 2002 14:04:21 -0300 (caciano)" -" Copyright (C) 2002, Caciano Machado -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Colorscheme Option: -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -hi clear -if exists("syntax on") - syntax reset -endif -let g:colors_name = "dante" - -" General colors -hi Normal ctermfg=gray guifg=peachpuff3 guibg=black -hi Directory term=bold ctermfg=blue guifg=royalblue -hi ErrorMsg term=standout ctermfg=white ctermbg=red guifg=white guibg=red3 -hi NonText term=bold ctermfg=darkgray guibg=gray3 guifg=gray20 -hi SpecialKey term=bold ctermfg=darkgray guifg=gray30 -hi LineNr term=underline ctermfg=darkgray guifg=ivory4 guibg=gray4 -hi IncSearch term=reverse cterm=reverse gui=reverse,bold guifg=darkgoldenrod2 -hi Search term=reverse ctermfg=black ctermbg=yellow guifg=gray10 guibg=gold2 -hi Visual term=bold,reverse cterm=bold,reverse ctermfg=gray ctermbg=black gui=bold,reverse guifg=gray40 guibg=black -hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline -hi MoreMsg term=bold ctermfg=green gui=bold guifg=olivedrab1 -hi ModeMsg term=bold cterm=bold gui=bold -hi Question term=standout ctermfg=green gui=bold guifg=olivedrab1 -hi WarningMsg term=standout ctermfg=red gui=bold guifg=red3 -hi WildMenu term=standout ctermfg=black ctermbg=yellow guifg=black guibg=gold2 -hi Folded term=standout ctermfg=blue ctermbg=white guifg=royalblue1 guibg=white -hi FoldColumn term=standout ctermfg=blue ctermbg=white guifg=royalblue3 guibg=white -hi DiffAdd term=bold ctermbg=blue guibg=royalblue2 -hi DiffChange term=bold ctermbg=darkmagenta guibg=maroon -hi DiffDelete term=bold cterm=bold ctermfg=lightblue ctermbg=cyan gui=bold guifg=lightblue guibg=cyan4 -hi DiffText term=reverse cterm=bold ctermbg=red gui=bold guibg=red3 -hi Cursor guifg=bg guibg=fg -hi lCursor guifg=bg guibg=fg -hi StatusLine term=reverse cterm=reverse gui=reverse guifg=gray60 -hi StatusLineNC term=reverse cterm=reverse gui=reverse guifg=gray40 -hi VertSplit term=reverse cterm=reverse gui=bold,reverse guifg=gray40 -hi Title term=bold ctermfg=magenta gui=bold guifg=aquamarine - -" syntax hi colors -hi Comment term=bold ctermfg=darkcyan guifg=cyan4 -hi PreProc term=underline ctermfg=darkblue guifg=dodgerblue4 -hi Constant term=underline ctermfg=darkred guifg=firebrick3 -hi Type term=underline ctermfg=darkgreen gui=none guifg=chartreuse3 -hi Statement term=bold ctermfg=darkyellow gui=none guifg=gold3 -hi Identifier term=underline ctermfg=darkgreen guifg=darkolivegreen4 -hi Ignore term=bold ctermfg=darkgray guifg=gray45 -hi Special term=underline ctermfg=brown guifg=sienna -hi Error term=reverse ctermfg=gray ctermbg=red guifg=gray guibg=red3 -hi Todo term=standout ctermfg=black ctermbg=yellow gui=bold guifg=gray10 guibg=yellow4 -hi Underlined term=underline cterm=underline ctermfg=darkblue gui=underline guifg=slateblue -hi Number term=underline ctermfg=darkred guifg=red2 -" syntax hi links -hi link String Constant -hi link Character Constant -hi link Number Constant -hi link Boolean Constant -hi link Float Number -hi link Function Identifier -hi link Number Constant -hi link Conditional Statement -hi link Repeat Statement -hi link Label Statement -hi link Keyword Statement -hi link Exception Statement -hi link Operator Statement -hi link Include PreProc -hi link Define PreProc -hi link Macro PreProc -hi link PreCondit PreProc -hi link StorageClass Type -hi link Structure Type -hi link Typedef Type -hi link Tag Special -hi link SpecialChar Special -hi link Delimiter Special -hi link SpecialComment Special -hi link Debug Special -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/.vim/colors/ir_black.vim b/.vim/colors/ir_black.vim deleted file mode 100644 index 2e151d8..0000000 --- a/.vim/colors/ir_black.vim +++ /dev/null @@ -1,212 +0,0 @@ -" ir_black color scheme -" More at: http://blog.infinitered.com/entries/show/8 - - -" ******************************************************************************** -" Standard colors used in all ir_black themes: -" Note, x:x:x are RGB values -" -" normal: #f6f3e8 -" -" string: #A8FF60 168:255:96 -" string inner (punc, code, etc): #00A0A0 0:160:160 -" number: #FF73FD 255:115:253 -" comments: #7C7C7C 124:124:124 -" keywords: #96CBFE 150:203:254 -" operators: white -" class: #FFFFB6 255:255:182 -" method declaration name: #FFD2A7 255:210:167 -" regular expression: #E9C062 233:192:98 -" regexp alternate: #FF8000 255:128:0 -" regexp alternate 2: #B18A3D 177:138:61 -" variable: #C6C5FE 198:197:254 -" -" Misc colors: -" red color (used for whatever): #FF6C60 255:108:96 -" light red: #FFB6B0 255:182:176 -" -" brown: #E18964 good for special -" -" lightpurpleish: #FFCCFF -" -" Interface colors: -" background color: black -" cursor (where underscore is used): #FFA560 255:165:96 -" cursor (where block is used): white -" visual selection: #1D1E2C -" current line: #151515 21:21:21 -" search selection: #07281C 7:40:28 -" line number: #3D3D3D 61:61:61 - - -" ******************************************************************************** -" The following are the preferred 16 colors for your terminal -" Colors Bright Colors -" Black #4E4E4E #7C7C7C -" Red #FF6C60 #FFB6B0 -" Green #A8FF60 #CEFFAB -" Yellow #FFFFB6 #FFFFCB -" Blue #96CBFE #FFFFCB -" Magenta #FF73FD #FF9CFE -" Cyan #C6C5FE #DFDFFE -" White #EEEEEE #FFFFFF - - -" ******************************************************************************** -set background=dark -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "ir_black" - - -"hi Example guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - -" General colors -hi Normal guifg=#f6f3e8 guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE -hi NonText guifg=#070707 guibg=black gui=NONE ctermfg=black ctermbg=NONE cterm=NONE - -hi Cursor guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=reverse -hi LineNr guifg=#3D3D3D guibg=black gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE - -hi VertSplit guifg=#202020 guibg=#202020 gui=NONE ctermfg=darkgray ctermbg=darkgray cterm=NONE -hi StatusLine guifg=#CCCCCC guibg=#202020 gui=italic ctermfg=white ctermbg=darkgray cterm=NONE -hi StatusLineNC guifg=black guibg=#202020 gui=NONE ctermfg=blue ctermbg=darkgray cterm=NONE - -hi Folded guifg=#a0a8b0 guibg=#384048 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE -hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=NONE -hi Visual guifg=NONE guibg=#262D51 gui=NONE ctermfg=NONE ctermbg=darkgray cterm=NONE - -hi SpecialKey guifg=#808080 guibg=#343434 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - -hi WildMenu guifg=green guibg=yellow gui=NONE ctermfg=black ctermbg=yellow cterm=NONE -hi PmenuSbar guifg=black guibg=white gui=NONE ctermfg=black ctermbg=white cterm=NONE -"hi Ignore guifg=gray guibg=black gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - -hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color -hi ErrorMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE -hi WarningMsg guifg=white guibg=#FF6C60 gui=BOLD ctermfg=white ctermbg=red cterm=NONE - -" Message displayed in lower left, such as --INSERT-- -hi ModeMsg guifg=black guibg=#C6C5FE gui=BOLD ctermfg=black ctermbg=cyan cterm=BOLD - -if version >= 700 " Vim 7.x specific colors - hi CursorLine guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD - hi CursorColumn guifg=NONE guibg=#121212 gui=NONE ctermfg=NONE ctermbg=NONE cterm=BOLD - hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=BOLD ctermfg=white ctermbg=darkgray cterm=NONE - hi Pmenu guifg=#f6f3e8 guibg=#444444 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - hi PmenuSel guifg=#000000 guibg=#cae682 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE - hi Search guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline -endif - -" Syntax highlighting -hi Comment guifg=#7C7C7C guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE -hi String guifg=#A8FF60 guibg=NONE gui=NONE ctermfg=green ctermbg=NONE cterm=NONE -hi Number guifg=#FF73FD guibg=NONE gui=NONE ctermfg=magenta ctermbg=NONE cterm=NONE - -hi Keyword guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE -hi PreProc guifg=#96CBFE guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE -hi Conditional guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE " if else end - -hi Todo guifg=#8f8f8f guibg=NONE gui=NONE ctermfg=red ctermbg=NONE cterm=NONE -hi Constant guifg=#99CC99 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE - -hi Identifier guifg=#C6C5FE guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE -hi Function guifg=#FFD2A7 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE -hi Type guifg=#FFFFB6 guibg=NONE gui=NONE ctermfg=yellow ctermbg=NONE cterm=NONE -hi Statement guifg=#6699CC guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE - -hi Special guifg=#E18964 guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE -hi Delimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE -hi Operator guifg=white guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE - -hi link Character Constant -hi link Boolean Constant -hi link Float Number -hi link Repeat Statement -hi link Label Statement -hi link Exception Statement -hi link Include PreProc -hi link Define PreProc -hi link Macro PreProc -hi link PreCondit PreProc -hi link StorageClass Type -hi link Structure Type -hi link Typedef Type -hi link Tag Special -hi link SpecialChar Special -hi link SpecialComment Special -hi link Debug Special - - -" Special for Ruby -hi rubyRegexp guifg=#B18A3D guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE -hi rubyRegexpDelimiter guifg=#FF8000 guibg=NONE gui=NONE ctermfg=brown ctermbg=NONE cterm=NONE -hi rubyEscape guifg=white guibg=NONE gui=NONE ctermfg=cyan ctermbg=NONE cterm=NONE -hi rubyInterpolationDelimiter guifg=#00A0A0 guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE -hi rubyControl guifg=#6699CC guibg=NONE gui=NONE ctermfg=blue ctermbg=NONE cterm=NONE "and break, etc -"hi rubyGlobalVariable guifg=#FFCCFF guibg=NONE gui=NONE ctermfg=lightblue ctermbg=NONE cterm=NONE "yield -hi rubyStringDelimiter guifg=#336633 guibg=NONE gui=NONE ctermfg=lightgreen ctermbg=NONE cterm=NONE -"rubyInclude -"rubySharpBang -"rubyAccess -"rubyPredefinedVariable -"rubyBoolean -"rubyClassVariable -"rubyBeginEnd -"rubyRepeatModifier -"hi link rubyArrayDelimiter Special " [ , , ] -"rubyCurlyBlock { , , } - -hi link rubyClass Keyword -hi link rubyModule Keyword -hi link rubyKeyword Keyword -hi link rubyOperator Operator -hi link rubyIdentifier Identifier -hi link rubyInstanceVariable Identifier -hi link rubyGlobalVariable Identifier -hi link rubyClassVariable Identifier -hi link rubyConstant Type - - -" Special for Java -" hi link javaClassDecl Type -hi link javaScopeDecl Identifier -hi link javaCommentTitle javaDocSeeTag -hi link javaDocTags javaDocSeeTag -hi link javaDocParam javaDocSeeTag -hi link javaDocSeeTagParam javaDocSeeTag - -hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE -hi javaDocSeeTag guifg=#CCCCCC guibg=NONE gui=NONE ctermfg=darkgray ctermbg=NONE cterm=NONE -"hi javaClassDecl guifg=#CCFFCC guibg=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE - - -" Special for XML -hi link xmlTag Keyword -hi link xmlTagName Conditional -hi link xmlEndTag Identifier - - -" Special for HTML -hi link htmlTag Keyword -hi link htmlTagName Conditional -hi link htmlEndTag Identifier - - -" Special for Javascript -hi link javaScriptNumber Number - - -" Special for Python -"hi link pythonEscape Keyword - - -" Special for CSharp -hi link csXmlTag Keyword - - -" Special for PHP diff --git a/.vim/colors/lucius.vim b/.vim/colors/lucius.vim deleted file mode 100644 index 067f333..0000000 --- a/.vim/colors/lucius.vim +++ /dev/null @@ -1,346 +0,0 @@ -" Vim color file -" Maintainer: Jonathan Filip -" Last Modified: Thu Jan 21, 2010 10:57AM -" Version: 3.2 -" -" GUI / 256 color terminal -" -" I started out trying to combine my favorite parts of other schemes and ended -" up with this (oceandeep, moria, peaksea, wombat, zenburn). -" -" This file also tries to have descriptive comments for each higlighting group -" so it is easy to understand what each part does. - - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif -let colors_name="lucius" - -" Some other colors to save -" blue: 3eb8e5 -" green: 92d400 -" c green: d5f876, cae682 -" new blue: 002D62 -" new gray: CCCCCC - - -" Base color -" ---------- -hi Normal guifg=#e0e0e0 guibg=#202020 -hi Normal ctermfg=253 ctermbg=235 - - -" Comment Group -" ------------- -" any comment -hi Comment guifg=#606060 gui=none -hi Comment ctermfg=240 cterm=none - - -" Constant Group -" -------------- -" any constant -hi Constant guifg=#8cd0d3 gui=none -hi Constant ctermfg=116 cterm=none -" strings -hi String guifg=#80c0d9 gui=none -hi String ctermfg=110 cterm=none -" character constant -hi Character guifg=#80c0d9 gui=none -hi Character ctermfg=110 cterm=none -" numbers decimal/hex -hi Number guifg=#8cd0d3 gui=none -hi Number ctermfg=116 cterm=none -" true, false -hi Boolean guifg=#8cd0d3 gui=none -hi Boolean ctermfg=116 cterm=none -" float -hi Float guifg=#8cd0d3 gui=none -hi Float ctermfg=116 cterm=none - - -" Identifier Group -" ---------------- -" any variable name -hi Identifier guifg=#e6c080 gui=none -hi Identifier ctermfg=216 cterm=none -" function, method, class -hi Function guifg=#e6c080 gui=none -hi Function ctermfg=216 cterm=none - - -" Statement Group -" --------------- -" any statement -hi Statement guifg=#b3d38c gui=none -hi Statement ctermfg=150 cterm=none -" if, then, else -hi Conditional guifg=#b3d38c gui=none -hi Conditional ctermfg=150 cterm=none -" try, catch, throw, raise -hi Exception guifg=#b3d38c gui=none -hi Exception ctermfg=150 cterm=none -" for, while, do -hi Repeat guifg=#b3d38c gui=none -hi Repeat ctermfg=150 cterm=none -" case, default -hi Label guifg=#b3d38c gui=none -hi Label ctermfg=150 cterm=none -" sizeof, +, * -hi Operator guifg=#b3d38c gui=none -hi Operator ctermfg=150 cterm=none -" any other keyword -hi Keyword guifg=#b3d38c gui=none -hi Keyword ctermfg=150 cterm=none - - -" Preprocessor Group -" ------------------ -" generic preprocessor -hi PreProc guifg=#e9dfaf gui=none -hi PreProc ctermfg=223 cterm=none -" #include -hi Include guifg=#e9dfaf gui=none -hi Include ctermfg=223 cterm=none -" #define -hi Define guifg=#e9dfaf gui=none -hi Define ctermfg=223 cterm=none -" same as define -hi Macro guifg=#e9dfaf gui=none -hi Macro ctermfg=223 cterm=none -" #if, #else, #endif -hi PreCondit guifg=#e9dfaf gui=none -hi PreCondit ctermfg=223 cterm=none - - -" Type Group -" ---------- -" int, long, char -hi Type guifg=#93d6a9 gui=none -hi Type ctermfg=115 cterm=none -" static, register, volative -hi StorageClass guifg=#93d6a9 gui=none -hi StorageClass ctermfg=115 cterm=none -" struct, union, enum -hi Structure guifg=#93d6a9 gui=none -hi Structure ctermfg=115 cterm=none -" typedef -hi Typedef guifg=#93d6a9 gui=none -hi Typedef ctermfg=115 cterm=none - - -" Special Group -" ------------- -" any special symbol -hi Special guifg=#cca3b3 gui=none -hi Special ctermfg=181 cterm=none -" special character in a constant -hi SpecialChar guifg=#cca3b3 gui=none -hi SpecialChar ctermfg=181 cterm=none -" things you can CTRL-] -hi Tag guifg=#cca3b3 gui=none -hi Tag ctermfg=181 cterm=none -" character that needs attention -hi Delimiter guifg=#cca3b3 gui=none -hi Delimiter ctermfg=181 cterm=none -" special things inside a comment -hi SpecialComment guifg=#cca3b3 gui=none -hi SpecialComment ctermfg=181 cterm=none -" debugging statements -hi Debug guifg=#cca3b3 guibg=NONE gui=none -hi Debug ctermfg=181 ctermbg=NONE cterm=none - - -" Underlined Group -" ---------------- -" text that stands out, html links -hi Underlined guifg=fg gui=underline -hi Underlined ctermfg=fg cterm=underline - - -" Ignore Group -" ------------ -" left blank, hidden -hi Ignore guifg=bg -hi Ignore ctermfg=bg - - -" Error Group -" ----------- -" any erroneous construct -hi Error guifg=#e37170 guibg=#432323 gui=none -hi Error ctermfg=167 ctermbg=52 cterm=none - - -" Todo Group -" ---------- -" todo, fixme, note, xxx -hi Todo guifg=#efef8f guibg=NONE gui=underline -hi Todo ctermfg=228 ctermbg=NONE cterm=underline - - -" Spelling -" -------- -" word not recognized -hi SpellBad guisp=#ee0000 gui=undercurl -hi SpellBad ctermbg=9 cterm=undercurl -" word not capitalized -hi SpellCap guisp=#eeee00 gui=undercurl -hi SpellCap ctermbg=12 cterm=undercurl -" rare word -hi SpellRare guisp=#ffa500 gui=undercurl -hi SpellRare ctermbg=13 cterm=undercurl -" wrong spelling for selected region -hi SpellLocal guisp=#ffa500 gui=undercurl -hi SpellLocal ctermbg=14 cterm=undercurl - - -" Cursor -" ------ -" character under the cursor -hi Cursor guifg=bg guibg=#a3e3ed -hi Cursor ctermfg=bg ctermbg=153 -" like cursor, but used when in IME mode -hi CursorIM guifg=bg guibg=#96cdcd -hi CursorIM ctermfg=bg ctermbg=116 -" cursor column -hi CursorColumn guifg=NONE guibg=#202438 gui=none -hi CursorColumn ctermfg=NONE ctermbg=236 cterm=none -" cursor line/row -hi CursorLine gui=NONE guibg=#202438 gui=none -hi CursorLine cterm=NONE ctermbg=236 cterm=none - - -" Misc -" ---- -" directory names and other special names in listings -hi Directory guifg=#c0e0b0 gui=none -hi Directory ctermfg=151 cterm=none -" error messages on the command line -hi ErrorMsg guifg=#ee0000 guibg=NONE gui=none -hi ErrorMsg ctermfg=196 ctermbg=NONE cterm=none -" column separating vertically split windows -hi VertSplit guifg=#777777 guibg=#363946 gui=none -hi VertSplit ctermfg=242 ctermbg=237 cterm=none -" columns where signs are displayed (used in IDEs) -hi SignColumn guifg=#9fafaf guibg=#181818 gui=none -hi SignColumn ctermfg=145 ctermbg=233 cterm=none -" line numbers -hi LineNr guifg=#818698 guibg=#363946 -hi LineNr ctermfg=102 ctermbg=237 -" match parenthesis, brackets -hi MatchParen guifg=#00ff00 guibg=NONE gui=bold -hi MatchParen ctermfg=46 ctermbg=NONE cterm=bold -" the 'more' prompt when output takes more than one line -hi MoreMsg guifg=#2e8b57 gui=none -hi MoreMsg ctermfg=29 cterm=none -" text showing what mode you are in -hi ModeMsg guifg=#76d5f8 guibg=NONE gui=none -hi ModeMsg ctermfg=117 ctermbg=NONE cterm=none -" the '~' and '@' and showbreak, '>' double wide char doesn't fit on line -hi NonText guifg=#404040 gui=none -hi NonText ctermfg=235 cterm=none -" the hit-enter prompt (show more output) and yes/no questions -hi Question guifg=fg gui=none -hi Question ctermfg=fg cterm=none -" meta and special keys used with map, unprintable characters -hi SpecialKey guifg=#405060 -hi SpecialKey ctermfg=237 -" titles for output from :set all, :autocmd, etc -hi Title guifg=#62bdde gui=none -hi Title ctermfg=74 cterm=none -"hi Title guifg=#5ec8e5 gui=none -" warning messages -hi WarningMsg guifg=#e5786d gui=none -hi WarningMsg ctermfg=173 cterm=none -" current match in the wildmenu completion -hi WildMenu guifg=#cae682 guibg=#363946 gui=bold,underline -hi WildMenu ctermfg=16 ctermbg=186 cterm=bold - - -" Diff -" ---- -" added line -hi DiffAdd guifg=#80a090 guibg=#313c36 gui=none -hi DiffAdd ctermfg=108 ctermbg=22 cterm=none -" changed line -hi DiffChange guifg=NONE guibg=#4a343a gui=none -hi DiffChange ctermfg=fg ctermbg=52 cterm=none -" deleted line -hi DiffDelete guifg=#6c6661 guibg=#3c3631 gui=none -hi DiffDelete ctermfg=59 ctermbg=58 cterm=none -" changed text within line -hi DiffText guifg=#f05060 guibg=#4a343a gui=bold -hi DiffText ctermfg=203 ctermbg=52 cterm=bold - - -" Folds -" ----- -" line used for closed folds -hi Folded guifg=#91d6f8 guibg=#363946 gui=none -hi Folded ctermfg=117 ctermbg=238 cterm=none -" column on side used to indicated open and closed folds -hi FoldColumn guifg=#91d6f8 guibg=#363946 gui=none -hi FoldColumn ctermfg=117 ctermbg=238 cterm=none - - -" Search -" ------ -" highlight incremental search text; also highlight text replaced with :s///c -hi IncSearch guifg=#66ffff gui=reverse -hi IncSearch ctermfg=87 cterm=reverse -" hlsearch (last search pattern), also used for quickfix -hi Search guibg=#ffaa33 gui=none -hi Search ctermbg=214 cterm=none - - -" Popup Menu -" ---------- -" normal item in popup -hi Pmenu guifg=#e0e0e0 guibg=#303840 gui=none -hi Pmenu ctermfg=253 ctermbg=233 cterm=none -" selected item in popup -hi PmenuSel guifg=#cae682 guibg=#505860 gui=none -hi PmenuSel ctermfg=186 ctermbg=237 cterm=none -" scrollbar in popup -hi PMenuSbar guibg=#505860 gui=none -hi PMenuSbar ctermbg=59 cterm=none -" thumb of the scrollbar in the popup -hi PMenuThumb guibg=#808890 gui=none -hi PMenuThumb ctermbg=102 cterm=none - - -" Status Line -" ----------- -" status line for current window -hi StatusLine guifg=#e0e0e0 guibg=#363946 gui=bold -hi StatusLine ctermfg=254 ctermbg=237 cterm=bold -" status line for non-current windows -hi StatusLineNC guifg=#767986 guibg=#363946 gui=none -hi StatusLineNC ctermfg=244 ctermbg=237 cterm=none - - -" Tab Lines -" --------- -" tab pages line, not active tab page label -hi TabLine guifg=#b6bf98 guibg=#363946 gui=none -hi TabLine ctermfg=244 ctermbg=236 cterm=none -" tab pages line, where there are no labels -hi TabLineFill guifg=#cfcfaf guibg=#363946 gui=none -hi TabLineFill ctermfg=187 ctermbg=236 cterm=none -" tab pages line, active tab page label -hi TabLineSel guifg=#efefef guibg=#414658 gui=bold -hi TabLineSel ctermfg=254 ctermbg=236 cterm=bold - - -" Visual -" ------ -" visual mode selection -hi Visual guifg=NONE guibg=#364458 -hi Visual ctermfg=NONE ctermbg=24 -" visual mode selection when vim is not owning the selection (x11 only) -hi VisualNOS guifg=fg gui=underline -hi VisualNOS ctermfg=fg cterm=underline diff --git a/.vim/colors/ps_color.vim b/.vim/colors/ps_color.vim deleted file mode 100644 index fb3e02b..0000000 --- a/.vim/colors/ps_color.vim +++ /dev/null @@ -1,469 +0,0 @@ -" Vim colour file --- PSC -" Maintainer: Pan, Shi Zhu -" URL: http://vim.sourceforge.net/scripts/script.php?script_id=760 -" Last Change: 18 July 2006 -" Version: 2.9 -" -" Please prepend [VIM] in the title when writing e-mail to me, or it will -" be automatically treated as spam and removed. -" -" See the help document for all details, the help document will be -" installed after the script has been sourced once, do not open the -" script when you source it for the first time. -" - -" Initializations: {{{1 -" - -" without user_commands, all these are not possible -if !has("user_commands") - finish -end - -function! s:init_option(var, value) - if !exists("g:psc_".a:var) - execute "let s:".a:var." = ".a:value - else - let s:{a:var} = g:psc_{a:var} - endif -endfunction -command! -nargs=+ InitOpt call s:init_option() - -function! s:multi_hi(setting, ...) - let l:idx = a:0 - while l:idx > 0 - let l:hlgroup = a:{l:idx} - execute "highlight ".l:hlgroup." ".a:setting - let l:idx = l:idx - 1 - endwhile -endfunction -command! -nargs=+ MultiHi call s:multi_hi() - -InitOpt style 'cool' -InitOpt inversed_todo 0 -InitOpt use_default_for_cterm 0 -InitOpt statement_different_from_type 0 -if s:style == 'warm' - InitOpt fontface 'mixed' -else - InitOpt fontface 'plain' -endif - -if !has("gui_running") - call s:init_option("cterm_style", "'".s:style."'") - - " Forces 'cool' style when gui is not present Since the 'warm' style for - " terminal isn't available now, and probably never will be. - if s:cterm_style=='warm' | let s:cterm_style = 'cool' - endif - if s:use_default_for_cterm==1 | let s:cterm_style = 'default' - elseif s:use_default_for_cterm==2 | let s:cterm_style = 'defdark' - endif -endif - - -InitOpt other_style 0 - -if has("gui_running") - if s:style=='warm' || s:style=='default' - set background=light - elseif s:style=='cool' || s:style=='defdark' - set background=dark - else | let s:other_style = 1 - endif -else - if s:cterm_style=='cool' || s:cterm_style=='defdark' - set background=dark - elseif s:cterm_style=='default' - set background=light - else | let s:other_style = 1 - endif -endif - - -highlight clear - -if exists("syntax_on") - syntax reset -endif - -let s:color_name = expand(":t:r") - -if s:other_style==0 | let g:colors_name = s:color_name - " Go from console version to gui, the color scheme should be sourced again - execute "autocmd TermChanged * if g:colors_name == '".s:color_name."' | " - \."colo ".s:color_name." | endif" -else - execute "runtime colors/".s:style.".vim" -endif - -" Command to go different schemes easier. -execute "command! -nargs=1 Colo if '".s:color_name."'!=\"\" | " - \'let g:psc_style = ""| endif | colo '.s:color_name - -" Give control to 'reloaded' scheme if possible -if s:style == 'reloaded' - finish -endif - -" }}}1 - -" Relevant Help: -" :h highlight-groups -" :h psc-cterm-color-table -" :ru syntax/hitest.vim -" -" Hardcoded Colors Comment: -" #aabbcc = Red aa, Green bb, Blue cc -" we must use hard-coded colours to get more 'tender' colours -" - - -" GUI: -" -" I don't want to abuse folding, but here folding is used to avoid confusion. -if s:style=='warm' - " Warm style for gui here {{{2 - " LIGHT COLOR DEFINE START - - highlight Normal guifg=#000000 guibg=#e0e0e0 - highlight Search guifg=#902000 guibg=#f8f8f8 - highlight Visual guifg=fg guibg=#a6caf0 - highlight Cursor guifg=#f0f0f0 guibg=#008000 - " The idea of CursorIM is pretty good, however, the feature is still buggy - " in the current version (Vim 7.0). - " The following line will be kept commented until the bug fixed. - " - " highlight CursorIM guifg=#f0f0f0 guibg=#800080 - highlight Special guifg=#907000 guibg=bg - highlight Comment guifg=#606000 guibg=bg - highlight Number guifg=#907000 guibg=bg - highlight Constant guifg=#007068 guibg=bg - highlight StatusLine guifg=fg guibg=#a6caf0 - highlight LineNr guifg=#686868 guibg=bg - highlight Question guifg=fg guibg=#d0d090 - highlight PreProc guifg=#009030 guibg=bg - if s:statement_different_from_type==1 - highlight Statement guifg=#4020a0 guibg=bg - else - highlight Statement guifg=#2060a8 guibg=bg - endif - highlight Type guifg=#0850a0 guibg=bg - if s:inversed_todo==1 - highlight Todo guifg=#e0e090 guibg=#000080 - else - highlight Todo guifg=#800000 guibg=#e0e090 - endif - " NOTE THIS IS IN THE WARM SECTION - highlight Error guifg=#c03000 guibg=bg - highlight Identifier guifg=#a030a0 guibg=bg - highlight ModeMsg guifg=fg guibg=#b0b0e0 - highlight VisualNOS guifg=fg guibg=#b0b0e0 - highlight SpecialKey guifg=#1050a0 guibg=bg - highlight NonText guifg=#002090 guibg=#d0d0d0 - highlight Directory guifg=#a030a0 guibg=bg - highlight ErrorMsg guifg=fg guibg=#f0b090 - highlight MoreMsg guifg=#489000 guibg=bg - highlight Title guifg=#a030a0 guibg=bg - highlight WarningMsg guifg=#b02000 guibg=bg - highlight WildMenu guifg=fg guibg=#d0d090 - highlight Folded guifg=fg guibg=#b0e0b0 - highlight FoldColumn guifg=fg guibg=#90e090 - highlight DiffAdd guifg=fg guibg=#b0b0e0 - highlight DiffChange guifg=fg guibg=#e0b0e0 - highlight DiffDelete guifg=#002090 guibg=#d0d0d0 - highlight DiffText guifg=fg guibg=#c0e080 - highlight SignColumn guifg=fg guibg=#90e090 - highlight IncSearch guifg=#f0f0f0 guibg=#806060 - highlight StatusLineNC guifg=fg guibg=#c0c0c0 - highlight VertSplit guifg=fg guibg=#c0c0c0 - highlight Underlined guifg=#6a5acd guibg=bg gui=underline - highlight Ignore guifg=bg guibg=bg - " NOTE THIS IS IN THE WARM SECTION - if v:version >= 700 - highlight SpellBad guifg=NONE guibg=NONE guisp=#c03000 - highlight SpellCap guifg=NONE guibg=NONE guisp=#2060a8 - highlight SpellRare guifg=NONE guibg=NONE guisp=#a030a0 - highlight SpellLocal guifg=NONE guibg=NONE guisp=#007068 - highlight Pmenu guifg=fg guibg=#e0b0e0 - highlight PmenuSel guifg=#f0f0f0 guibg=#806060 - highlight PmenuSbar guifg=fg guibg=#c0c0c0 - highlight PmenuThumb guifg=fg guibg=#c0e080 - highlight TabLine guifg=fg guibg=#c0c0c0 gui=underline - highlight TabLineFill guifg=fg guibg=#c0c0c0 gui=underline - highlight TabLineSel guifg=fg guibg=bg - highlight CursorColumn guifg=NONE guibg=#f0b090 - highlight CursorLine guifg=NONE guibg=NONE gui=underline - highlight MatchParen guifg=NONE guibg=#c0e080 - endif - - " LIGHT COLOR DEFINE END - " }}}2 -elseif s:style=='cool' - " Cool style for gui here {{{2 - " DARK COLOR DEFINE START - - highlight Normal guifg=#d0d0d0 guibg=#202020 - highlight Comment guifg=#d0d090 guibg=bg - highlight Constant guifg=#80c0e0 guibg=bg - highlight Number guifg=#e0c060 guibg=bg - highlight Identifier guifg=#f0c0f0 guibg=bg - if s:statement_different_from_type==1 - highlight Statement guifg=#98a8f0 guibg=bg - else - highlight Statement guifg=#c0d8f8 guibg=bg - endif - highlight PreProc guifg=#60f080 guibg=bg - highlight Type guifg=#b0d0f0 guibg=bg - highlight Special guifg=#e0c060 guibg=bg - highlight Error guifg=#f08060 guibg=bg - if s:inversed_todo==1 - highlight Todo guifg=#d0d090 guibg=#000080 - else - highlight Todo guifg=#800000 guibg=#d0d090 - endif - highlight Search guifg=#e0e0e0 guibg=#800000 - highlight Visual guifg=#000000 guibg=#a6caf0 - highlight Cursor guifg=#000000 guibg=#00f000 - " NOTE THIS IS IN THE COOL SECTION - " highlight CursorIM guifg=#000000 guibg=#f000f0 - highlight StatusLine guifg=#000000 guibg=#a6caf0 - highlight LineNr guifg=#b0b0b0 guibg=bg - highlight Question guifg=#000000 guibg=#d0d090 - highlight ModeMsg guifg=fg guibg=#000080 - highlight VisualNOS guifg=fg guibg=#000080 - highlight SpecialKey guifg=#b0d0f0 guibg=bg - highlight NonText guifg=#6080f0 guibg=#101010 - highlight Directory guifg=#80c0e0 guibg=bg - highlight ErrorMsg guifg=#d0d090 guibg=#800000 - highlight MoreMsg guifg=#c0e080 guibg=bg - highlight Title guifg=#f0c0f0 guibg=bg - highlight WarningMsg guifg=#f08060 guibg=bg - highlight WildMenu guifg=#000000 guibg=#d0d090 - highlight Folded guifg=#d0d0d0 guibg=#004000 - highlight FoldColumn guifg=#e0e0e0 guibg=#008000 - highlight DiffAdd guifg=fg guibg=#000080 - highlight DiffChange guifg=fg guibg=#800080 - highlight DiffDelete guifg=#6080f0 guibg=#202020 - highlight DiffText guifg=#000000 guibg=#c0e080 - highlight SignColumn guifg=#e0e0e0 guibg=#008000 - highlight IncSearch guifg=#000000 guibg=#d0d0d0 - highlight StatusLineNC guifg=#000000 guibg=#c0c0c0 - highlight VertSplit guifg=#000000 guibg=#c0c0c0 - highlight Underlined guifg=#80a0ff guibg=bg gui=underline - highlight Ignore guifg=#000000 guibg=bg - " NOTE THIS IS IN THE COOL SECTION - if v:version >= 700 - highlight SpellBad guifg=NONE guibg=NONE guisp=#f08060 - highlight SpellCap guifg=NONE guibg=NONE guisp=#6080f0 - highlight SpellRare guifg=NONE guibg=NONE guisp=#f0c0f0 - highlight SpellLocal guifg=NONE guibg=NONE guisp=#c0d8f8 - highlight Pmenu guifg=fg guibg=#800080 - highlight PmenuSel guifg=#000000 guibg=#d0d0d0 - highlight PmenuSbar guifg=fg guibg=#000080 - highlight PmenuThumb guifg=fg guibg=#008000 - highlight TabLine guifg=fg guibg=#008000 gui=underline - highlight TabLineFill guifg=fg guibg=#008000 gui=underline - highlight TabLineSel guifg=fg guibg=bg - highlight CursorColumn guifg=NONE guibg=#800000 - highlight CursorLine guifg=NONE guibg=NONE gui=underline - highlight MatchParen guifg=NONE guibg=#800080 - endif - - " DARK COLOR DEFINE END - " }}}2 -elseif s:style=='defdark' - highlight Normal guifg=#f0f0f0 guibg=#000000 -endif - -" Take NT gui for example, If you want to use a console font such as -" Lucida_Console with font size larger than 14, the font looks already thick, -" and the bold font for that will be too thick, you may not want it be bolded. -" The following code does this. -" -" All of the bold font may be disabled, since continuously switching between -" bold and plain font hurts consistency and will inevitably fatigue your eye! - -" Maximum 20 parameters for vim script function -" -MultiHi gui=NONE ModeMsg Search Cursor Special Comment Constant Number LineNr Question PreProc Statement Type Todo Error Identifier Normal - -MultiHi gui=NONE VisualNOS SpecialKey NonText Directory ErrorMsg MoreMsg Title WarningMsg WildMenu Folded FoldColumn DiffAdd DiffChange DiffDelete DiffText SignColumn - -" Vim 7 added stuffs -if v:version >= 700 - MultiHi gui=NONE Ignore PmenuSel PmenuSel PmenuSbar PmenuThumb TabLine TabLineFill TabLineSel - - " the gui=undercurl guisp could only support in Vim 7 - MultiHi gui=undercurl SpellBad SpellCap SpellRare SpellLocal - if s:style=="cool" || s:style=="warm" - MultiHi gui=underline TabLine TabLineFill Underlined CursorLine - else - MultiHi gui=underline TabLine Underlined - endif -endif - -" For reversed stuffs -MultiHi gui=NONE IncSearch StatusLine StatusLineNC VertSplit Visual - -if s:style=="cool" || s:style=="warm" - if s:fontface=="mixed" - MultiHi gui=bold IncSearch StatusLine StatusLineNC VertSplit Visual - endif -else - if s:fontface=="mixed" - hi StatusLine gui=bold,reverse - else - hi StatusLine gui=reverse - endif - MultiHi gui=reverse IncSearch StatusLineNC VertSplit Visual -endif - -" Enable the bold style -if s:fontface=="mixed" - MultiHi gui=bold Question DiffText Statement Type MoreMsg ModeMsg NonText Title VisualNOS DiffDelete TabLineSel -endif - - - - -" Color Term: - -" It's not quite possible to support 'cool' and 'warm' simultaneously, since -" we cannot expect a terminal to have more than 16 color names. -" - -" I assume Vim will never go to cterm mode when has("gui_running") returns 1, -" Please enlighten me if I am wrong. -" -if !has('gui_running') - " cterm settings {{{1 - if s:cterm_style=='cool' - - highlight Normal ctermfg=LightGrey ctermbg=Black - highlight Search ctermfg=White ctermbg=DarkRed - highlight Visual ctermfg=Black ctermbg=DarkCyan - highlight Cursor ctermfg=Black ctermbg=Green - highlight Special ctermfg=Yellow ctermbg=Black - highlight Comment ctermfg=DarkYellow ctermbg=Black - highlight Constant ctermfg=Blue ctermbg=Black - highlight Number ctermfg=Yellow ctermbg=Black - highlight StatusLine ctermfg=Black ctermbg=DarkCyan - highlight LineNr ctermfg=DarkGrey ctermbg=Black - highlight Question ctermfg=Black ctermbg=DarkYellow - highlight PreProc ctermfg=Green ctermbg=Black - highlight Statement ctermfg=Cyan ctermbg=Black - highlight Type ctermfg=Cyan ctermbg=Black - if s:inversed_todo==0 - highlight Todo ctermfg=DarkRed ctermbg=DarkYellow - else - highlight Todo ctermfg=DarkYellow ctermbg=DarkBlue - endif - highlight Error ctermfg=Red ctermbg=Black - highlight Identifier ctermfg=Magenta ctermbg=Black - highlight Folded ctermfg=White ctermbg=DarkGreen - highlight ModeMsg ctermfg=Grey ctermbg=DarkBlue - highlight VisualNOS ctermfg=Grey ctermbg=DarkBlue - highlight SpecialKey ctermfg=Cyan ctermbg=Black - highlight NonText ctermfg=Blue ctermbg=Black - highlight Directory ctermfg=Blue ctermbg=Black - highlight ErrorMsg ctermfg=DarkYellow ctermbg=DarkRed - highlight MoreMsg ctermfg=Green ctermbg=Black - highlight Title ctermfg=Magenta ctermbg=Black - highlight WarningMsg ctermfg=Red ctermbg=Black - highlight WildMenu ctermfg=Black ctermbg=DarkYellow - highlight FoldColumn ctermfg=White ctermbg=DarkGreen - highlight SignColumn ctermfg=White ctermbg=DarkGreen - highlight DiffText ctermfg=Black ctermbg=DarkYellow - highlight DiffDelete ctermfg=Blue ctermbg=Black - - if v:version >= 700 - highlight SpellBad ctermfg=NONE ctermbg=DarkRed - highlight SpellCap ctermfg=NONE ctermbg=DarkBlue - highlight SpellRare ctermfg=NONE ctermbg=DarkMagenta - highlight SpellLocal ctermfg=NONE ctermbg=DarkGreen - highlight Pmenu ctermfg=fg ctermbg=DarkMagenta - highlight PmenuSel ctermfg=bg ctermbg=fg - highlight PmenuSbar ctermfg=fg ctermbg=DarkBlue - highlight PmenuThumb ctermfg=fg ctermbg=DarkGreen - highlight TabLine ctermfg=fg ctermbg=DarkGreen cterm=underline - highlight TabLineFill ctermfg=fg ctermbg=DarkGreen cterm=underline - highlight TabLineSel ctermfg=fg ctermbg=bg - highlight CursorColumn ctermfg=NONE ctermbg=DarkRed - highlight CursorLine ctermfg=NONE ctermbg=NONE cterm=underline - highlight MatchParen ctermfg=NONE ctermbg=DarkMagenta - endif - if &t_Co==8 - " 8 colour terminal support, this assumes 16 colour is available through - " setting the 'bold' attribute, will get bright foreground colour. - " However, the bright background color is not available for 8-color terms. - " - " You can manually set t_Co=16 in your .vimrc to see if your terminal - " supports 16 colours, - MultiHi cterm=none DiffText Visual Cursor Comment Todo StatusLine Question DiffChange ModeMsg VisualNOS ErrorMsg WildMenu DiffAdd Folded DiffDelete Normal PmenuThumb - MultiHi cterm=bold Search Special Constant Number LineNr PreProc Statement Type Error Identifier SpecialKey NonText MoreMsg Title WarningMsg FoldColumn SignColumn Directory DiffDelete - - else - " Background > 7 is only available with 16 or more colors - - " Only use the s:fontface option when there is 16-colour(or more) - " terminal support - - MultiHi cterm=none WarningMsg Search Visual Cursor Special Comment Constant Number LineNr PreProc Todo Error Identifier Folded SpecialKey Directory ErrorMsg Normal PmenuThumb - MultiHi cterm=none WildMenu FoldColumn SignColumn DiffAdd DiffChange Question StatusLine DiffText - MultiHi cterm=reverse IncSearch StatusLineNC VertSplit - - " Well, well, bold font with color 0-7 is not possible. - " So, the Question, StatusLine, DiffText cannot act as expected. - - call s:multi_hi("cterm=".((s:fontface=="plain") ? "none" : "bold"), "Statement", "Type", "MoreMsg", "ModeMsg", "NonText", "Title", "VisualNOS", "DiffDelete", "TabLineSel") - - endif - - elseif s:cterm_style=='defdark' - highlight Normal ctermfg=LightGrey ctermbg=Black - endif - " }}}1 -endif - - -" Term: -" For console with only 4 colours (term, not cterm), we'll use the default. -" ... -" The default colorscheme is good enough for terms with no more than 4 colours -" - - -" Links: -" -if (s:style=='cool') || (s:style == 'warm') - " COLOR LINKS DEFINE START - - highlight link String Constant - " Character must be different from strings because in many languages - " (especially C, C++) a 'char' variable is scalar while 'string' is pointer, - " mistaken a 'char' for a 'string' will cause disaster! - highlight link Character Number - highlight link SpecialChar LineNr - highlight link Tag Identifier - " The following are not standard hi links, - " these are used by DrChip - highlight link Warning MoreMsg - highlight link Notice Constant - " these are used by Calendar - highlight link CalToday PreProc - " these are used by TagList - highlight link MyTagListTagName IncSearch - highlight link MyTagListTagScope Constant - - " COLOR LINKS DEFINE END -endif - - -" Clean: -" -delcommand InitOpt -delcommand MultiHi - -" vim:et:nosta:sw=2:ts=8: -" vim600:fdm=marker:fdl=1: diff --git a/.vim/colors/zenburn.vim b/.vim/colors/zenburn.vim deleted file mode 100644 index 73a18e4..0000000 --- a/.vim/colors/zenburn.vim +++ /dev/null @@ -1,245 +0,0 @@ -" Vim color file -" Maintainer: Jani Nurminen -" Last Change: $Id: zenburn.vim,v 1.15 2006/09/07 15:57:46 jnurmine Exp $ -" URL: http://slinky.imukuppi.org/zenburn/ -" License: GPL -" -" Nothing too fancy, just some alien fruit salad to keep you in the zone. -" This syntax file was designed to be used with dark environments and -" low light situations. Of course, if it works during a daybright office, go -" ahead :) -" -" Owes heavily to other Vim color files! With special mentions -" to "BlackDust", "Camo" and "Desert". -" -" To install, copy to ~/.vim/colors directory. Then :colorscheme zenburn. -" See also :help syntax -" -" Credits: -" - Jani Nurminen - original Zenburn -" - Steve Hall & Cream posse - higher-contrast Visual selection -" - Kurt Maier - 256 color console coloring, low and high contrast toggle, -" bug fixing -" -" CONFIGURABLE PARAMETERS: -" -" You can use the default (don't set any parameters), or you can -" set some parameters to tweak the Zenburn colours. -" -" * You can now set a darker background for bright environments. To activate, use: -" contrast Zenburn, use: -" -" let g:zenburn_high_Contrast = 1 -" -" * To get more contrast to the Visual selection, use -" -" let g:zenburn_alternate_Visual = 1 -" -" * To use alternate colouring for Error message, use -" -" let g:zenburn_alternate_Error = 1 -" -" * The new default for Include is a duller orange. To use the original -" colouring for Include, use -" -" let g:zenburn_alternate_Include = 1 -" -" * To turn the parameter(s) back to defaults, use UNLET: -" -" unlet g:zenburn_alternate_Include -" -" Setting to 0 won't work! -" -" That's it, enjoy! -" -" TODO -" - Visual alternate color is broken? Try GVim >= 7.0.66 if you have trouble -" - IME colouring (CursorIM) -" - obscure syntax groups: check and colourize -" - add more groups if necessary - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif -let g:colors_name="zenburn" - -hi Boolean guifg=#dca3a3 -hi Character guifg=#dca3a3 gui=bold -hi Comment guifg=#7f9f7f gui=italic -hi Conditional guifg=#f0dfaf gui=bold -hi Constant guifg=#dca3a3 gui=bold -hi Cursor guifg=#000d18 guibg=#8faf9f gui=bold -hi Debug guifg=#bca3a3 gui=bold -hi Define guifg=#ffcfaf gui=bold -hi Delimiter guifg=#8f8f8f -hi DiffAdd guifg=#709080 guibg=#313c36 gui=bold -hi DiffChange guibg=#333333 -hi DiffDelete guifg=#333333 guibg=#464646 -hi DiffText guifg=#ecbcbc guibg=#41363c gui=bold -hi Directory guifg=#dcdccc gui=bold -hi ErrorMsg guifg=#80d4aa guibg=#2f2f2f gui=bold -hi Exception guifg=#c3bf9f gui=bold -hi Float guifg=#c0bed1 -hi FoldColumn guifg=#93b3a3 guibg=#3f4040 -hi Folded guifg=#93b3a3 guibg=#3f4040 -hi Function guifg=#efef8f -hi Identifier guifg=#efdcbc -hi IncSearch guibg=#f8f893 guifg=#385f38 -hi Keyword guifg=#f0dfaf gui=bold -hi Label guifg=#dfcfaf gui=underline -hi LineNr guifg=#9fafaf guibg=#262626 -hi Macro guifg=#ffcfaf gui=bold -hi ModeMsg guifg=#ffcfaf gui=none -hi MoreMsg guifg=#ffffff gui=bold -hi NonText guifg=#404040 -hi Number guifg=#8cd0d3 -hi Operator guifg=#f0efd0 -hi PreCondit guifg=#dfaf8f gui=bold -hi PreProc guifg=#ffcfaf gui=bold -hi Question guifg=#ffffff gui=bold -hi Repeat guifg=#ffd7a7 gui=bold -hi Search guifg=#ffffe0 guibg=#284f28 -hi SpecialChar guifg=#dca3a3 gui=bold -hi SpecialComment guifg=#82a282 gui=bold -hi Special guifg=#cfbfaf -hi SpecialKey guifg=#9ece9e -hi Statement guifg=#e3ceab gui=none -hi StatusLine guifg=#2e4340 guibg=#ccdc90 -hi StatusLineNC guifg=#2e3330 guibg=#88b090 -hi StorageClass guifg=#c3bf9f gui=bold -hi String guifg=#cc9393 -hi Structure guifg=#efefaf gui=bold -hi Tag guifg=#e89393 gui=bold -hi Title guifg=#efefef gui=bold -hi Todo guifg=#dfdfdf guibg=bg gui=bold -hi Typedef guifg=#dfe4cf gui=bold -hi Type guifg=#dfdfbf gui=bold -hi Underlined guifg=#dcdccc gui=underline -hi VertSplit guifg=#303030 guibg=#688060 -hi VisualNOS guifg=#333333 guibg=#f18c96 gui=bold,underline -hi WarningMsg guifg=#ffffff guibg=#333333 gui=bold -hi WildMenu guibg=#2c302d guifg=#cbecd0 gui=underline - -" Entering Kurt zone -if &t_Co > 255 - hi Boolean ctermfg=181 - hi Character ctermfg=181 cterm=bold - hi Comment ctermfg=108 - hi Conditional ctermfg=223 cterm=bold - hi Constant ctermfg=181 cterm=bold - hi Cursor ctermfg=233 ctermbg=109 cterm=bold - hi Debug ctermfg=181 cterm=bold - hi Define ctermfg=223 cterm=bold - hi Delimiter ctermfg=245 - hi DiffAdd ctermfg=66 ctermbg=237 cterm=bold - hi DiffChange ctermbg=236 - hi DiffDelete ctermfg=236 ctermbg=238 - hi DiffText ctermfg=217 ctermbg=237 cterm=bold - hi Directory ctermfg=188 cterm=bold - hi ErrorMsg ctermfg=115 ctermbg=236 cterm=bold - hi Exception ctermfg=249 cterm=bold - hi Float ctermfg=251 - hi FoldColumn ctermfg=109 ctermbg=238 - hi Folded ctermfg=109 ctermbg=238 - hi Function ctermfg=228 - hi Identifier ctermfg=223 - hi IncSearch ctermbg=228 ctermfg=238 - hi Keyword ctermfg=223 cterm=bold - hi Label ctermfg=187 cterm=underline - hi LineNr ctermfg=248 ctermbg=235 - hi Macro ctermfg=223 cterm=bold - hi ModeMsg ctermfg=223 cterm=none - hi MoreMsg ctermfg=15 cterm=bold - hi NonText ctermfg=238 - hi Number ctermfg=116 - hi Operator ctermfg=230 - hi PreCondit ctermfg=180 cterm=bold - hi PreProc ctermfg=223 cterm=bold - hi Question ctermfg=15 cterm=bold - hi Repeat ctermfg=223 cterm=bold - hi Search ctermfg=230 ctermbg=236 - hi SpecialChar ctermfg=181 cterm=bold - hi SpecialComment ctermfg=108 cterm=bold - hi Special ctermfg=181 - hi SpecialKey ctermfg=151 - hi Statement ctermfg=187 ctermbg=234 cterm=none - hi StatusLine ctermfg=237 ctermbg=186 - hi StatusLineNC ctermfg=236 ctermbg=108 - hi StorageClass ctermfg=249 cterm=bold - hi String ctermfg=174 - hi Structure ctermfg=229 cterm=bold - hi Tag ctermfg=181 cterm=bold - hi Title ctermfg=7 ctermbg=234 cterm=bold - hi Todo ctermfg=108 ctermbg=234 cterm=bold - hi Typedef ctermfg=253 cterm=bold - hi Type ctermfg=187 cterm=bold - hi Underlined ctermfg=188 ctermbg=234 cterm=bold - hi VertSplit ctermfg=236 ctermbg=65 - hi VisualNOS ctermfg=236 ctermbg=210 cterm=bold - hi WarningMsg ctermfg=15 ctermbg=236 cterm=bold - hi WildMenu ctermbg=236 ctermfg=194 cterm=bold - if exists("g:zenburn_high_Contrast") - hi Normal ctermfg=188 ctermbg=234 - else - hi Normal ctermfg=188 ctermbg=237 - hi Cursor ctermbg=109 - hi diffadd ctermbg=237 - hi diffdelete ctermbg=238 - hi difftext ctermbg=237 - hi errormsg ctermbg=237 - hi foldcolumn ctermbg=238 - hi folded ctermbg=238 - hi incsearch ctermbg=228 - hi linenr ctermbg=238 - hi search ctermbg=238 - hi statement ctermbg=237 - hi statusline ctermbg=144 - hi statuslinenc ctermbg=108 - hi title ctermbg=237 - hi todo ctermbg=237 - hi underlined ctermbg=237 - hi vertsplit ctermbg=65 - hi visualnos ctermbg=210 - hi warningmsg ctermbg=236 - hi wildmenu ctermbg=236 - endif -endif - - -if exists("g:zenburn_high_Contrast") - " use new darker background - hi Normal guifg=#dcdccc guibg=#1f1f1f -else - " Original, lighter background - hi Normal guifg=#dcdccc guibg=#3f3f3f -endif - -if exists("g:zenburn_alternate_Visual") - " Visual with more contrast, thanks to Steve Hall & Cream posse - " gui=none fixes weird highlight problem in at least GVim 7.0.66, thanks to Kurt Maier - hi Visual guifg=#000000 guibg=#71d3b4 gui=none - hi VisualNOS guifg=#000000 guibg=#71d3b4 gui=none -else - " use default visual - hi Visual guifg=#233323 guibg=#71d3b4 gui=none - hi VisualNOS guifg=#233323 guibg=#71d3b4 gui=none -endif - -if exists("g:zenburn_alternate_Error") - " use a bit different Error - hi Error guifg=#ef9f9f guibg=#201010 gui=bold -else - " default - hi Error guifg=#e37170 guibg=#332323 gui=none -endif - -if exists("g:zenburn_alternate_Include") - " original setting - hi Include guifg=#ffcfaf gui=bold -else - " new, less contrasted one - hi Include guifg=#dfaf8f gui=bold -endif - " TODO check every syntax group that they're ok diff --git a/.vim/doc/NERD_tree.txt b/.vim/doc/NERD_tree.txt deleted file mode 100644 index 95f4c54..0000000 --- a/.vim/doc/NERD_tree.txt +++ /dev/null @@ -1,1077 +0,0 @@ -*NERD_tree.txt* A tree explorer plugin that owns your momma! - - - - omg its ... ~ - - ________ ________ _ ____________ ____ __________ ____________~ - /_ __/ / / / ____/ / | / / ____/ __ \/ __ \ /_ __/ __ \/ ____/ ____/~ - / / / /_/ / __/ / |/ / __/ / /_/ / / / / / / / /_/ / __/ / __/ ~ - / / / __ / /___ / /| / /___/ _, _/ /_/ / / / / _, _/ /___/ /___ ~ - /_/ /_/ /_/_____/ /_/ |_/_____/_/ |_/_____/ /_/ /_/ |_/_____/_____/ ~ - - - Reference Manual~ - - - - -============================================================================== -CONTENTS *NERDTree-contents* - - 1.Intro...................................|NERDTree| - 2.Functionality provided..................|NERDTreeFunctionality| - 2.1.Global commands...................|NERDTreeGlobalCommands| - 2.2.Bookmarks.........................|NERDTreeBookmarks| - 2.2.1.The bookmark table..........|NERDTreeBookmarkTable| - 2.2.2.Bookmark commands...........|NERDTreeBookmarkCommands| - 2.2.3.Invalid bookmarks...........|NERDTreeInvalidBookmarks| - 2.3.NERD tree mappings................|NERDTreeMappings| - 2.4.The filesystem menu...............|NERDTreeFilesysMenu| - 3.Options.................................|NERDTreeOptions| - 3.1.Option summary....................|NERDTreeOptionSummary| - 3.2.Option details....................|NERDTreeOptionDetails| - 4.Hacking the NERD tree...................|NERDTreeHacking| - 5.About...................................|NERDTreeAbout| - 6.Changelog...............................|NERDTreeChangelog| - 7.Credits.................................|NERDTreeCredits| - 8.License.................................|NERDTreeLicense| - -============================================================================== -1. Intro *NERDTree* - -What is this "NERD tree"?? - -The NERD tree allows you to explore your filesystem and to open files and -directories. It presents the filesystem to you in the form of a tree which you -manipulate with the keyboard and/or mouse. It also allows you to perform -simple filesystem operations. - -The following features and functionality are provided by the NERD tree: - * Files and directories are displayed in a hierarchical tree structure - * Different highlighting is provided for the following types of nodes: - * files - * directories - * sym-links - * windows .lnk files - * read-only files - * executable files - * Many (customisable) mappings are provided to manipulate the tree: - * Mappings to open/close/explore directory nodes - * Mappings to open files in new/existing windows/tabs - * Mappings to change the current root of the tree - * Mappings to navigate around the tree - * ... - * Directories and files can be bookmarked. - * Most NERD tree navigation can also be done with the mouse - * Filtering of tree content (can be toggled at runtime) - * custom file filters to prevent e.g. vim backup files being displayed - * optional displaying of hidden files (. files) - * files can be "turned off" so that only directories are displayed - * A textual filesystem menu is provided which allows you to - create/delete/move file and directory nodes as well as copy (for - supported OSs) - * The position and size of the NERD tree window can be customised - * The order in which the nodes in the tree are listed can be customised. - * A model of your filesystem is created/maintained as you explore it. This - has several advantages: - * All filesystem information is cached and is only re-read on demand - * If you revisit a part of the tree that you left earlier in your - session, the directory nodes will be opened/closed as you left them - * The script remembers the cursor position and window position in the NERD - tree so you can toggle it off (or just close the tree window) and then - reopen it (with NERDTreeToggle) the NERD tree window will appear exactly - as you left it - * You can have a separate NERD tree for each tab, share trees across tabs, - or a mix of both. - * By default the script overrides the default file browser (netw), so if - you :edit a directory a (slighly modified) NERD tree will appear in the - current window - -============================================================================== -2. Functionality provided *NERDTreeFunctionality* - ------------------------------------------------------------------------------- -2.1. Global Commands *NERDTreeGlobalCommands* - -:NERDTree [ | ] *:NERDTree* - Opens a fresh NERD tree. The root of the tree depends on the argument - given. There are 3 cases: If no argument is given, the current directory - will be used. If a directory is given, that will be used. If a bookmark - name is given, the corresponding directory will be used. For example: > - :NERDTree /home/marty/vim7/src - :NERDTree foo (foo is the name of a bookmark) -< -:NERDTreeFromBookmark *:NERDTreeFromBookmark* - Opens a fresh NERD tree with the root initialized to the dir for - . This only reason to use this command over :NERDTree is for - the completion (which is for bookmarks rather than directories). - -:NERDTreeToggle [ | ] *:NERDTreeToggle* - If a NERD tree already exists for this tab, it is reopened and rendered - again. If no NERD tree exists for this tab then this command acts the - same as the |:NERDTree| command. - -:NERDTreeMirror *:NERDTreeMirror* - Shares an existing NERD tree, from another tab, in the current tab. - Changes made to one tree are reflected in both as they are actually the - same buffer. - - If only one other NERD tree exists, that tree is automatically mirrored. If - more than one exists, the script will ask which tree to mirror. - -:NERDTreeClose *:NERDTreeClose* - Close the NERD tree in this tab. - ------------------------------------------------------------------------------- -2.2. Bookmarks *NERDTreeBookmarks* - -Bookmarks in the NERD tree are a way to tag files or directories of interest. -For example, you could use bookmarks to tag all of your project directories. - ------------------------------------------------------------------------------- -2.2.1. The Bookmark Table *NERDTreeBookmarkTable* - -If the bookmark table is active (see |NERDTree-B| and -|'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double -click bookmarks or use the |NERDTree-o| mapping to activate them. See also, -|NERDTree-t| and |NERDTree-T| - ------------------------------------------------------------------------------- -2.2.2. Bookmark commands *NERDTreeBookmarkCommands* - -Note that the following commands are only available in the NERD tree buffer. - -:Bookmark - Bookmark the current node as . If there is already a - bookmark, it is overwritten. must not contain spaces. - -:BookmarkToRoot - Make the directory corresponding to the new root. If a treenode - corresponding to is already cached somewhere in the tree then - the current tree will be used, otherwise a fresh tree will be opened. - Note that if points to a file then its parent will be used - instead. - -:RevealBookmark - If the node is cached under the current root then it will be revealed - (i.e. directory nodes above it will be opened) and the cursor will be - placed on it. - -:OpenBookmark - must point to a file. The file is opened as though |NERDTree-o| - was applied. If the node is cached under the current root then it will be - revealed and the cursor will be placed on it. - -:ClearBookmarks [] - Remove all the given bookmarks. If no bookmarks are given then remove all - bookmarks on the current node. - -:ClearAllBookmarks - Remove all bookmarks. - -:ReadBookmarks - Re-read the bookmarks in the |'NERDTreeBookmarksFile'|. - -See also |:NERDTree| and |:NERDTreeFromBookmark|. - ------------------------------------------------------------------------------- -2.2.3. Invalid Bookmarks *NERDTreeInvalidBookmarks* - -If invalid bookmarks are detected, the script will issue an error message and -the invalid bookmarks will become unavailable for use. - -These bookmarks will still be stored in the bookmarks file (see -|'NERDTreeBookmarksFile'|), down the bottom. There will always be a blank line -after the valid bookmarks but before the invalid ones. - -Each line in the bookmarks file represents one bookmark. The proper format is: - - -After you have corrected any invalid bookmarks, either restart vim, or go -:ReadBookmarks from the NERD tree window. - ------------------------------------------------------------------------------- -2.3. NERD tree Mappings *NERDTreeMappings* - -Default Description~ help-tag~ -Key~ - -o.......Open files, directories and bookmarks....................|NERDTree-o| -go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| -t.......Open selected node/bookmark in a new tab.................|NERDTree-t| -T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| -i.......Open selected file in a split window.....................|NERDTree-i| -gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi| -s.......Open selected file in a new vsplit.......................|NERDTree-s| -gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs| -!.......Execute the current file.................................|NERDTree-!| -O.......Recursively open the selected directory..................|NERDTree-O| -x.......Close the current nodes parent...........................|NERDTree-x| -X.......Recursively close all children of the current node.......|NERDTree-X| -e.......Edit the current dif.....................................|NERDTree-e| - -double-click.......same as the |NERDTree-o| map. -middle-click.......same as |NERDTree-i| for files, same as - |NERDTree-e| for dirs. - -D.......Delete the current bookmark .............................|NERDTree-D| - -P.......Jump to the root node....................................|NERDTree-P| -p.......Jump to current nodes parent.............................|NERDTree-p| -K.......Jump up inside directories at the current tree depth.....|NERDTree-K| -J.......Jump down inside directories at the current tree depth...|NERDTree-J| -...Jump down to the next sibling of the current directory...|NERDTree-c-j| -...Jump up to the previous sibling of the current directory.|NERDTree-c-k| - -C.......Change the tree root to the selected dir.................|NERDTree-C| -u.......Move the tree root up one directory......................|NERDTree-u| -U.......Same as 'u' except the old root node is left open........|NERDTree-U| -r.......Recursively refresh the current directory................|NERDTree-r| -R.......Recursively refresh the current root.....................|NERDTree-R| -m.......Display the filesystem menu..............................|NERDTree-m| -cd......Change the CWD to the dir of the selected node...........|NERDTree-cd| - -I.......Toggle whether hidden files displayed....................|NERDTree-I| -f.......Toggle whether the file filters are used.................|NERDTree-f| -F.......Toggle whether files are displayed.......................|NERDTree-F| -B.......Toggle whether the bookmark table is displayed...........|NERDTree-B| - -q.......Close the NERDTree window................................|NERDTree-q| -?.......Toggle the display of the quick help.....................|NERDTree-?| - ------------------------------------------------------------------------------- - *NERDTree-o* -Default key: o -Map option: NERDTreeMapActivateNode -Applies to: files and directories. - -If a file node is selected, it is opened in the previous window. - -If a directory is selected it is opened or closed depending on its current -state. - -If a bookmark that links to a directory is selected then that directory -becomes the new root. - -If a bookmark that links to a file is selected then that file is opened in the -previous window. - ------------------------------------------------------------------------------- - *NERDTree-go* -Default key: go -Map option: None -Applies to: files. - -If a file node is selected, it is opened in the previous window, but the -cursor does not move. - -The key combo for this mapping is always "g" + NERDTreeMapActivateNode (see -|NERDTree-o|). - ------------------------------------------------------------------------------- - *NERDTree-t* -Default key: t -Map option: NERDTreeMapOpenInTab -Applies to: files and directories. - -Opens the selected file in a new tab. If a directory is selected, a fresh -NERD Tree for that directory is opened in a new tab. - -If a bookmark which points to a directory is selected, open a NERD tree for -that directory in a new tab. If the bookmark points to a file, open that file -in a new tab. - ------------------------------------------------------------------------------- - *NERDTree-T* -Default key: T -Map option: NERDTreeMapOpenInTabSilent -Applies to: files and directories. - -The same as |NERDTree-t| except that the focus is kept in the current tab. - ------------------------------------------------------------------------------- - *NERDTree-i* -Default key: i -Map option: NERDTreeMapOpenSplit -Applies to: files. - -Opens the selected file in a new split window and puts the cursor in the new -window. - ------------------------------------------------------------------------------- - *NERDTree-gi* -Default key: gi -Map option: None -Applies to: files. - -The same as |NERDTree-i| except that the cursor is not moved. - -The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see -|NERDTree-i|). - ------------------------------------------------------------------------------- - *NERDTree-s* -Default key: s -Map option: NERDTreeMapOpenVSplit -Applies to: files. - -Opens the selected file in a new vertically split window and puts the cursor in -the new window. - ------------------------------------------------------------------------------- - *NERDTree-gs* -Default key: gs -Map option: None -Applies to: files. - -The same as |NERDTree-s| except that the cursor is not moved. - -The key combo for this mapping is always "g" + NERDTreeMapOpenVSplit (see -|NERDTree-s|). - ------------------------------------------------------------------------------- - *NERDTree-!* -Default key: ! -Map option: NERDTreeMapExecute -Applies to: files. - -Executes the selected file, prompting for arguments first. - ------------------------------------------------------------------------------- - *NERDTree-O* -Default key: O -Map option: NERDTreeMapOpenRecursively -Applies to: directories. - -Recursively opens the selelected directory. - -All files and directories are cached, but if a directory would not be -displayed due to file filters (see |'NERDTreeIgnore'| |NERDTree-f|) or the -hidden file filter (see |'NERDTreeShowHidden'|) then its contents are not -cached. This is handy, especially if you have .svn directories. - ------------------------------------------------------------------------------- - *NERDTree-x* -Default key: x -Map option: NERDTreeMapCloseDir -Applies to: files and directories. - -Closes the parent of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-X* -Default key: X -Map option: NERDTreeMapCloseChildren -Applies to: directories. - -Recursively closes all children of the selected directory. - -Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping. - ------------------------------------------------------------------------------- - *NERDTree-e* -Default key: e -Map option: NERDTreeMapOpenExpl -Applies to: files and directories. - -|:edit|s the selected directory, or the selected file's directory. This could -result in a NERD tree or a netrw being opened, depending on -|'NERDTreeHijackNetrw'|. - ------------------------------------------------------------------------------- - *NERDTree-D* -Default key: D -Map option: NERDTreeMapDeleteBookmark -Applies to: lines in the bookmarks table - -Deletes the currently selected bookmark. - ------------------------------------------------------------------------------- - *NERDTree-P* -Default key: P -Map option: NERDTreeMapJumpRoot -Applies to: no restrictions. - -Jump to the tree root. - ------------------------------------------------------------------------------- - *NERDTree-p* -Default key: p -Map option: NERDTreeMapJumpParent -Applies to: files and directories. - -Jump to the parent node of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-K* -Default key: K -Map option: NERDTreeMapJumpFirstChild -Applies to: files and directories. - -Jump to the first child of the current nodes parent. - -If the cursor is already on the first node then do the following: - * loop back thru the siblings of the current nodes parent until we find an - open dir with children - * go to the first child of that node - ------------------------------------------------------------------------------- - *NERDTree-J* -Default key: J -Map option: NERDTreeMapJumpLastChild -Applies to: files and directories. - -Jump to the last child of the current nodes parent. - -If the cursor is already on the last node then do the following: - * loop forward thru the siblings of the current nodes parent until we find - an open dir with children - * go to the last child of that node - ------------------------------------------------------------------------------- - *NERDTree-c-j* -Default key: -Map option: NERDTreeMapJumpNextSibling -Applies to: files and directories. - -Jump to the next sibling of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-c-k* -Default key: -Map option: NERDTreeMapJumpPrevSibling -Applies to: files and directories. - -Jump to the previous sibling of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-C* -Default key: C -Map option: NERDTreeMapChdir -Applies to: directories. - -Make the selected directory node the new tree root. If a file is selected, its -parent is used. - ------------------------------------------------------------------------------- - *NERDTree-u* -Default key: u -Map option: NERDTreeMapUpdir -Applies to: no restrictions. - -Move the tree root up a dir (like doing a "cd .."). - ------------------------------------------------------------------------------- - *NERDTree-U* -Default key: U -Map option: NERDTreeMapUpdirKeepOpen -Applies to: no restrictions. - -Like |NERDTree-u| except that the old tree root is kept open. - ------------------------------------------------------------------------------- - *NERDTree-r* -Default key: r -Map option: NERDTreeMapRefresh -Applies to: files and directories. - -If a dir is selected, recursively refresh that dir, i.e. scan the filesystem -for changes and represent them in the tree. - -If a file node is selected then the above is done on it's parent. - ------------------------------------------------------------------------------- - *NERDTree-R* -Default key: R -Map option: NERDTreeMapRefreshRoot -Applies to: no restrictions. - -Recursively refresh the tree root. - ------------------------------------------------------------------------------- - *NERDTree-m* -Default key: m -Map option: NERDTreeMapFilesystemMenu -Applies to: files and directories. - -Display the filesystem menu. See |NERDTreeFilesysMenu| for details. - ------------------------------------------------------------------------------- - *NERDTree-I* -Default key: I -Map option: NERDTreeMapToggleHidden -Applies to: no restrictions. - -Toggles whether hidden files (i.e. "dot files") are displayed. - ------------------------------------------------------------------------------- - *NERDTree-f* -Default key: f -Map option: NERDTreeMapToggleFilters -Applies to: no restrictions. - -Toggles whether file filters are used. See |'NERDTreeIgnore'| for details. - ------------------------------------------------------------------------------- - *NERDTree-F* -Default key: F -Map option: NERDTreeMapToggleFiles -Applies to: no restrictions. - -Toggles whether file nodes are displayed. - ------------------------------------------------------------------------------- - *NERDTree-B* -Default key: B -Map option: NERDTreeMapToggleBookmarks -Applies to: no restrictions. - -Toggles whether the bookmarks table is displayed. - ------------------------------------------------------------------------------- - *NERDTree-q* -Default key: q -Map option: NERDTreeMapQuit -Applies to: no restrictions. - -Closes the NERDtree window. - ------------------------------------------------------------------------------- - *NERDTree-?* -Default key: ? -Map option: NERDTreeMapHelp -Applies to: no restrictions. - -Toggles whether the quickhelp is displayed. - ------------------------------------------------------------------------------- -2.3. The filesystem menu *NERDTreeFilesysMenu* - -The purpose of the filesystem menu is to allow you to perform basic filesystem -operations quickly from the NERD tree rather than the console. - -The filesystem menu can be accessed with 'm' mapping and has four supported -operations: > - 1. Adding nodes. - 2. Move nodes. - 3. Deleting nodes. - 3. Copying nodes. -< -1. Adding nodes: -To add a node move the cursor onto (or anywhere inside) the directory you wish -to create the new node inside. Select the 'add node' option from the -filesystem menu and type a filename. If the filename you type ends with a '/' -character then a directory will be created. Once the operation is completed, -the cursor is placed on the new node. - -2. Move nodes: -To move/rename a node, put the cursor on it and select the 'move' option from -the filesystem menu. Enter the new location for the node and it will be -moved. If the old file is open in a buffer, you will be asked if you wish to -delete that buffer. Once the operation is complete the cursor will be placed -on the renamed node. - -3. Deleting nodes: -To delete a node put the cursor on it and select the 'delete' option from the -filesystem menu. After confirmation the node will be deleted. If a file is -deleted but still exists as a buffer you will be given the option to delete -that buffer. - -4. Copying nodes: -To copy a node put the cursor on it and select the 'copy' option from the -filesystem menu. Enter the new location and you're done. Note: copying is -currently only supported for *nix operating systems. If someone knows a -one line copying command for windows that doesnt require user confirmation -then id be grateful if you'd email me. - -============================================================================== -3. Customisation *NERDTreeOptions* - - ------------------------------------------------------------------------------- -3.1. Customisation summary *NERDTreeOptionSummary* - -The script provides the following options that can customise the behaviour the -NERD tree. These options should be set in your vimrc. - -|'loaded_nerd_tree'| Turns off the script. - -|'NERDChristmasTree'| Tells the NERD tree to make itself colourful - and pretty. - -|'NERDTreeAutoCenter'| Controls whether the NERD tree window centers - when the cursor moves within a specified - distance to the top/bottom of the window. -|'NERDTreeAutoCenterThreshold'| Controls the sensitivity of autocentering. - -|'NERDTreeCaseSensitiveSort'| Tells the NERD tree whether to be case - sensitive or not when sorting nodes. - -|'NERDTreeChDirMode'| Tells the NERD tree if/when it should change - vim's current working directory. - -|'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the - current cursor line. - -|'NERDTreeHijackNetrw'| Tell the NERD tree whether to replace the netrw - autocommands for exploring local directories. - -|'NERDTreeIgnore'| Tells the NERD tree which files to ignore. - -|'NERDTreeBookmarksFile'| Where the bookmarks are stored. - -|'NERDTreeMouseMode'| Tells the NERD tree how to handle mouse - clicks. - -|'NERDTreeQuitOnOpen'| Closes the tree window after opening a file. - -|'NERDTreeShowBookmarks'| Tells the NERD tree whether to display the - bookmarks table on startup. - -|'NERDTreeShowFiles'| Tells the NERD tree whether to display files - in the tree on startup. - -|'NERDTreeShowHidden'| Tells the NERD tree whether to display hidden - files on startup. - -|'NERDTreeShowLineNumbers'| Tells the NERD tree whether to display line - numbers in the tree window. - -|'NERDTreeSortOrder'| Tell the NERD tree how to sort the nodes in - the tree. - -|'NERDTreeStatusline'| Set a statusline for NERD tree windows. - -|'NERDTreeWinPos'| Tells the script where to put the NERD tree - window. - -|'NERDTreeWinSize'| Sets the window size when the NERD tree is - opened. - ------------------------------------------------------------------------------- -3.2. Customisation details *NERDTreeOptionDetails* - -To enable any of the below options you should put the given line in your -~/.vimrc - - *'loaded_nerd_tree'* -If this plugin is making you feel homicidal, it may be a good idea to turn it -off with this line in your vimrc: > - let loaded_nerd_tree=1 -< ------------------------------------------------------------------------------- - *'NERDChristmasTree'* -Values: 0 or 1. -Default: 1. - -If this option is set to 1 then some extra syntax highlighting elements are -added to the nerd tree to make it more colourful. - -Set it to 0 for a more vanilla looking tree. - ------------------------------------------------------------------------------- - *'NERDTreeAutoCenter'* -Values: 0 or 1. -Default: 1 - -If set to 1, the NERD tree window will center around the cursor if it moves to -within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window. - -This is ONLY done in response to tree navigation mappings, -i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-c-K| |NERDTree-p| -|NERDTree-P| - -The centering is done with a |zz| operation. - ------------------------------------------------------------------------------- - *'NERDTreeAutoCenterThreshold'* -Values: Any natural number. -Default: 3 - -This option controls the "sensitivity" of the NERD tree auto centering. See -|'NERDTreeAutoCenter'| for details. - ------------------------------------------------------------------------------- - *'NERDTreeCaseSensitiveSort'* -Values: 0 or 1. -Default: 0. - -By default the NERD tree does not sort nodes case sensitively, i.e. nodes -could appear like this: > - bar.c - Baz.c - blarg.c - boner.c - Foo.c -< -But, if you set this option to 1 then the case of the nodes will be taken into -account. The above nodes would then be sorted like this: > - Baz.c - Foo.c - bar.c - blarg.c - boner.c -< ------------------------------------------------------------------------------- - *'NERDTreeChDirMode'* - -Values: 0, 1 or 2. -Default: 0. - -Use this option to tell the script when (if at all) to change the current -working directory (CWD) for vim. - -If it is set to 0 then the CWD is never changed by the NERD tree. - -If set to 1 then the CWD is changed when the NERD tree is first loaded to the -directory it is initialized in. For example, if you start the NERD tree with > - :NERDTree /home/marty/foobar -< -then the CWD will be changed to /home/marty/foobar and will not be changed -again unless you init another NERD tree with a similar command. - -If the option is set to 2 then it behaves the same as if set to 1 except that -the CWD is changed whenever the tree root is changed. For example, if the CWD -is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new -root then the CWD will become /home/marty/foobar/baz. - ------------------------------------------------------------------------------- - *'NERDTreeHighlightCursorline'* -Values: 0 or 1. -Default: 1. - -If set to 1, the current cursor line in the NERD tree buffer will be -highlighted. This is done using the |cursorline| option. - ------------------------------------------------------------------------------- - *'NERDTreeHijackNetrw'* -Values: 0 or 1. -Default: 1. - -If set to 1, doing a > - :edit -< -will open up a "secondary" NERD tree instead of a netrw in the target window. - -Secondary NERD trees behaves slighly different from a regular trees in the -following respects: - 1. 'o' will open the selected file in the same window as the tree, - replacing it. - 2. you can have as many secondary tree as you want in the same tab. - ------------------------------------------------------------------------------- - *'NERDTreeIgnore'* -Values: a list of regular expressions. -Default: ['\~$']. - -This option is used to specify which files the NERD tree should ignore. It -must be a list of regular expressions. When the NERD tree is rendered, any -files/dirs that match any of the regex's in 'NERDTreeIgnore' wont be -displayed. - -For example if you put the following line in your vimrc: > - let NERDTreeIgnore=['\.vim$', '\~$'] -< -then all files ending in .vim or ~ will be ignored. - -Note: to tell the NERD tree not to ignore any files you must use the following -line: > - let NERDTreeIgnore=[] -< - -The file filters can be turned on and off dynamically with the |NERDTree-f| -mapping. - ------------------------------------------------------------------------------- - *'NERDTreeBookmarksFile'* -Values: a path -Default: $HOME/.NERDTreeBookmarks - -This is where bookmarks are saved. See |NERDTreeBookmarkCommands|. - ------------------------------------------------------------------------------- - *'NERDTreeMouseMode'* -Values: 1, 2 or 3. -Default: 1. - -If set to 1 then a double click on a node is required to open it. -If set to 2 then a single click will open directory nodes, while a double -click will still be required for file nodes. -If set to 3 then a single click will open any node. - -Note: a double click anywhere on a line that a tree node is on will -activate it, but all single-click activations must be done on name of the node -itself. For example, if you have the following node: > - | | |-application.rb -< -then (to single click activate it) you must click somewhere in -'application.rb'. - ------------------------------------------------------------------------------- - *'NERDTreeQuitOnOpen'* - -Values: 0 or 1. -Default: 0 - -If set to 1, the NERD tree window will close after opening a file with the -|NERDTree-o| or |NERDTree-i| mappings. - ------------------------------------------------------------------------------- - *'NERDTreeShowBookmarks'* -Values: 0 or 1. -Default: 0. - -If this option is set to 1 then the bookmarks table will be displayed. - -This option can be toggled dynamically, per tree, with the |NERDTree-B| -mapping. - ------------------------------------------------------------------------------- - *'NERDTreeShowFiles'* -Values: 0 or 1. -Default: 1. - -If this option is set to 1 then files are displayed in the NERD tree. If it is -set to 0 then only directories are displayed. - -This option can be toggled dynamically, per tree, with the |NERDTree-F| -mapping and is useful for drastically shrinking the tree when you are -navigating to a different part of the tree. - ------------------------------------------------------------------------------- - *'NERDTreeShowHidden'* -Values: 0 or 1. -Default: 0. - -This option tells vim whether to display hidden files by default. This option -can be dynamically toggled, per tree, with the |NERDTree-I| mapping. Use one -of the follow lines to set this option: > - let NERDTreeShowHidden=0 - let NERDTreeShowHidden=1 -< - ------------------------------------------------------------------------------- - *'NERDTreeShowLineNumbers'* -Values: 0 or 1. -Default: 0. - -This option tells vim whether to display line numbers for the NERD tree -window. Use one of the follow lines to set this option: > - let NERDTreeShowLineNumbers=0 - let NERDTreeShowLineNumbers=1 -< - ------------------------------------------------------------------------------- - *'NERDTreeSortOrder'* -Values: a list of regular expressions. -Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$'] - -This option is set to a list of regular expressions which are used to -specify the order of nodes under their parent. - -For example, if the option is set to: > - ['\.vim$', '\.c$', '\.h$', '*', 'foobar'] -< -then all .vim files will be placed at the top, followed by all .c files then -all .h files. All files containing the string 'foobar' will be placed at the -end. The star is a special flag: it tells the script that every node that -doesnt match any of the other regexps should be placed here. - -If no star is present in 'NERDTreeSortOrder' then one is automatically -appended to the array. - -The regex '\/$' should be used to match directory nodes. - -After this sorting is done, the files in each group are sorted alphabetically. - -Other examples: > - (1) ['*', '\/$'] - (2) [] - (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$', '\.bak$', '\~$'] -< -1. Directories will appear last, everything else will appear above. -2. Everything will simply appear in alphabetical order. -3. Dirs will appear first, then ruby and php. Swap files, bak files and vim - backup files will appear last with everything else preceding them. - ------------------------------------------------------------------------------- - *'NERDTreeStatusline'* -Values: Any valid statusline setting. -Default: %{b:NERDTreeRoot.path.strForOS(0)} - -Tells the script what to use as the |'statusline'| setting for NERD tree -windows. - -Note that the statusline is set using |:let-&| not |:set| so escaping spaces -isn't necessary. - -Setting this option to -1 will will deactivate it so that your global -statusline setting is used instead. - ------------------------------------------------------------------------------- - *'NERDTreeWinPos'* -Values: "left" or "right" -Default: "left". - -This option is used to determine where NERD tree window is placed on the -screen. - -This option makes it possible to use two different explorer plugins -simultaneously. For example, you could have the taglist plugin on the left of -the window and the NERD tree on the right. - ------------------------------------------------------------------------------- - *'NERDTreeWinSize'* -Values: a positive integer. -Default: 31. - -This option is used to change the size of the NERD tree when it is loaded. - -============================================================================== -4. Hacking the NERD tree *NERDTreeHacking* - -Public functions ~ - -The script provides 2 public functions for your hacking pleasure. Their -signatures are: > - function! NERDTreeGetCurrentNode() - function! NERDTreeGetCurrentPath() -< -The first returns the node object that the cursor is currently on, while the -second returns the corresponding path object. - -This is probably a good time to mention that the script implements prototype -style OO. To see the functions that each class provides you can read look at -the code. - -Use the node objects to manipulate the structure of the tree. Use the path -objects to access the files/directories the tree nodes represent. - -The NERD tree filetype ~ - -NERD tree buffers have a filetype of "nerdtree". You can use this to hack the -NERD tree via autocommands (on |FileType|) or via an ftplugin. - -For example, putting this code in ~/.vim/ftplugin/nerdtree.vim would override -the o mapping, making it open the selected node in a new gvim instance. > - - nnoremap o :call openInNewVimInstance() - function! s:openInNewVimInstance() - let p = NERDTreeGetCurrentPath() - if p != {} - silent exec "!gvim " . p.strForOS(1) . "&" - endif - endfunction -< -This way you can add new mappings or :commands or override any existing -mapping. - -============================================================================== -5. About *NERDTreeAbout* - -The author of the NERD tree is a terrible terrible monster called Martyzilla -who gobbles up small children with milk and sugar for breakfast. - -He can be reached at martin_grenfell at msn.com. He would love to hear from -you, so feel free to send him suggestions and/or comments about this plugin. -Don't be shy --- the worst he can do is slaughter you and stuff you in the -fridge for later ;) - -The latest stable versions can be found at - http://www.vim.org/scripts/script.php?script_id=1658 - -The latest dev versions are on github - http://github.com/scrooloose/nerdtree - - -============================================================================== -6. Changelog *NERDTreeChangelog* - -3.1.0 - New features: - - add mappings to open files in a vsplit, see :help NERDTree-s and :help - NERDTree-gs - - make the statusline for the nerd tree window default to something - hopefully more useful. See :help 'NERDTreeStatusline' - Bugfixes: - - make the hijack netrw functionality work when vim is started with "vim - " (thanks to Alf Mikula for the patch). - - fix a bug where the CWD wasnt being changed for some operations even when - NERDTreeChDirMode==2 (thanks to Lucas S. Buchala) - - add -bar to all the nerd tree :commands so they can chain with other - :commands (thanks to tpope) - - fix bugs when ignorecase was set (thanks to nach) - - fix a bug with the relative path code (thanks to nach) - - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach) - - -3.0.1 - Bugfixes: - - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden - was not set - - fix a bug where :NERDTree would fail if was relative and - didnt start with a ./ or ../ Thanks to James Kanze. - - make the q mapping work with secondary (:e style) trees, - thanks to jamessan - - fix a bunch of small bugs with secondary trees - - More insane refactoring. - -3.0.0 - - hijack netrw so that doing an :edit will put a NERD tree in - the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw' - - allow sharing of trees across tabs, see :help :NERDTreeMirror - - remove "top" and "bottom" as valid settings for NERDTreeWinPos - - change the '' mapping to 'i' - - change the 'H' mapping to 'I' - - lots of refactoring - -============================================================================== -7. Credits *NERDTreeCredits* - -Thanks to the following people for testing, bug reports, ideas etc. Without -you I probably would have got bored of the hacking the NERD tree and -just downloaded pr0n instead. - - Tim Carey-Smith (halorgium) - Vigil - Nick Brettell - Thomas Scott Urban - Terrance Cohen - Yegappan Lakshmanan - Jason Mills - Michael Geddes (frogonwheels) - Yu Jun - Michael Madsen - AOYAMA Shotaro - Zhang Weiwu - Niels Aan de Brugh - Olivier Yiptong - Zhang Shuhan - Cory Echols - Piotr Czachur - Yuan Jiang - Matan Nassau - Maxim Kim - Charlton Wang - Matt Wozniski (godlygeek) - knekk - Sean Chou - Ryan Penn - Simon Peter Nicholls - Michael Foobar - Tomasz Chomiuk - Denis Pokataev - Tim Pope (tpope) - James Kanze - James Vega (jamessan) - Frederic Chanal (nach) - Alf Mikula - Lucas S. Buchala - -============================================================================== -8. License *NERDTreeLicense* - -The NERD tree is released under the wtfpl. -See http://sam.zoy.org/wtfpl/COPYING. diff --git a/.vim/doc/bufexplorer.txt b/.vim/doc/bufexplorer.txt deleted file mode 100644 index 9af0682..0000000 --- a/.vim/doc/bufexplorer.txt +++ /dev/null @@ -1,442 +0,0 @@ -*bufexplorer.txt* Buffer Explorer Last Change: 19 Nov 2008 - -Buffer Explorer *buffer-explorer* *bufexplorer* - Version 7.2.2 - -Plugin for easily exploring (or browsing) Vim |:buffers|. - -|bufexplorer-usage| Usage -|bufexplorer-installation| Installation -|bufexplorer-customization| Customization -|bufexplorer-changelog| Change Log -|bufexplorer-todo| Todo -|bufexplorer-credits| Credits - -For Vim version 7.0 and above. -This plugin is only available if 'compatible' is not set. - -{Vi does not have any of this} - -============================================================================== -INSTALLATION *bufexplorer-installation* - -To install: - - Download the bufexplorer.zip. - - Extract the zip archive into your runtime directory. - The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt. - - Start Vim or goto an existing instance of Vim. - - Execute the following command: -> - :helptag - \be OR :BufExplorer -To start exploring in a newly split horizontal window, use: > - \bs or :HSBufExplorer -To start exploring in a newly split vertical window, use: > - \bv or :VSBufExplorer - -If you would like to use something other than '\', you may simply change the -leader (see |mapleader|). - -Note: If the current buffer is modified when bufexplorer started, the current - window is always split and the new bufexplorer is displayed in that new - window. - -Commands to use once exploring: - - Opens the buffer that is under the cursor into the current - window. - Toggle help information. - Opens the buffer that is under the cursor into the current - window. - Opens the buffer that is under the cursor in another tab. - d |:wipeout| the buffer under the cursor from the list. - When a buffers is wiped, it will not be shown when unlisted - buffer are displayed. - D |:delete| the buffer under the cursor from the list. - The buffer's 'buflisted' is cleared. This allows for the buffer - to be displayed again using the 'show unlisted' command. - f Toggles whether you are taken to the active window when - selecting a buffer or not. - p Toggles the showing of a split filename/pathname. - q Quit exploring. - r Reverses the order the buffers are listed in. - R Toggles relative path/absolute path. - s Selects the order the buffers are listed in. Either by buffer - number, file name, file extension, most recently used (MRU), or - full path. - t Opens the buffer that is under the cursor in another tab. - u Toggles the showing of "unlisted" buffers. - -Once invoked, Buffer Explorer displays a sorted list (MRU is the default -sort method) of all the buffers that are currently opened. You are then -able to move the cursor to the line containing the buffer's name you are -wanting to act upon. Once you have selected the buffer you would like, -you can then either open it, close it(delete), resort the list, reverse -the sort, quit exploring and so on... - -=============================================================================== -CUSTOMIZATION *bufexplorer-customization* - - *g:bufExplorerDefaultHelp* -To control whether the default help is displayed or not, use: > - let g:bufExplorerDefaultHelp=0 " Do not show default help. - let g:bufExplorerDefaultHelp=1 " Show default help. -The default is to show the default help. - - *g:bufExplorerDetailedHelp* -To control whether detailed help is display by, use: > - let g:bufExplorerDetailedHelp=0 " Do not show detailed help. - let g:bufExplorerDetailedHelp=1 " Show detailed help. -The default is NOT to show detailed help. - - *g:bufExplorerFindActive* -To control whether you are taken to the active window when selecting a buffer, -use: > - let g:bufExplorerFindActive=0 " Do not go to active window. - let g:bufExplorerFindActive=1 " Go to active window. -The default is to be taken to the active window. - - *g:bufExplorerReverseSort* -To control whether to sort the buffer in reverse order or not, use: > - let g:bufExplorerReverseSort=0 " Do not sort in reverse order. - let g:bufExplorerReverseSort=1 " Sort in reverse order. -The default is NOT to sort in reverse order. - - *g:bufExplorerShowDirectories* -Directories usually show up in the list from using a command like ":e .". -To control whether to show directories in the buffer list or not, use: > - let g:bufExplorerShowDirectories=1 " Show directories. - let g:bufExplorerShowDirectories=0 " Don't show directories. -The default is to show directories. - - *g:bufExplorerShowRelativePath* -To control whether to show absolute paths or relative to the current -directory, use: > - let g:bufExplorerShowRelativePath=0 " Show absolute paths. - let g:bufExplorerShowRelativePath=1 " Show relative paths. -The default is to show absolute paths. - - *g:bufExplorerShowUnlisted* -To control whether to show unlisted buffer or not, use: > - let g:bufExplorerShowUnlisted=0 " Do not show unlisted buffers. - let g:bufExplorerShowUnlisted=1 " Show unlisted buffers. -The default is to NOT show unlisted buffers. - - *g:bufExplorerSortBy* -To control what field the buffers are sorted by, use: > - let g:bufExplorerSortBy='extension' " Sort by file extension. - let g:bufExplorerSortBy='fullpath' " Sort by full file path name. - let g:bufExplorerSortBy='mru' " Sort by most recently used. - let g:bufExplorerSortBy='name' " Sort by the buffer's name. - let g:bufExplorerSortBy='number' " Sort by the buffer's number. -The default is to sort by mru. - - *g:bufExplorerSplitBelow* -To control where the new split window will be placed above or below the -current window, use: > - let g:bufExplorerSplitBelow=1 " Split new window below current. - let g:bufExplorerSplitBelow=0 " Split new window above current. -The default is to use what ever is set by the global &splitbelow -variable. - - *g:bufExplorerSplitOutPathName* -To control whether to split out the path and file name or not, use: > - let g:bufExplorerSplitOutPathName=1 " Split the path and file name. - let g:bufExplorerSplitOutPathName=0 " Don't split the path and file - " name. -The default is to split the path and file name. - - *g:bufExplorerSplitRight* -To control where the new vsplit window will be placed to the left or right of -current window, use: > - let g:bufExplorerSplitRight=0 " Split left. - let g:bufExplorerSplitRight=1 " Split right. -The default is to use the global &splitright. - -=============================================================================== -CHANGE LOG *bufexplorer-changelog* - -7.2.2 - Fix: - * Thanks to David L. Dight for spotting and fixing an issue when - using ctrl^. bufexplorer would incorrectly handle the previous - buffer so that when ctrl^ was pressed the incorrect file was opened. -7.2.1 - Fix: - * Thanks to Dimitar for spotting and fixing a feature that was - inadvertently left out of the previous version. The feature was - when bufexplorer was used together with WinManager, you could use - the tab key to open a buffer in a split window. -7.2.0 - Enhancements: - * For all those missing the \bs and \bv commands, these have now - returned. Thanks to Phil O'Connell for asking for the return of - these missing features and helping test out this version. - Fixes: - * Fixed problem with the bufExplorerFindActive code not working - correctly. - * Fixed an incompatibility between bufexplorer and netrw that caused - buffers to be incorrectly removed from the MRU list. -7.1.7 - Fixes: - * TaCahiroy fixed several issues related to opening a buffer in a - tab. -7.1.6 - Fixes: - * Removed ff=unix from modeline in bufexplorer.txt. Found by Bill - McCarthy. -7.1.5 - Fixes: - * Could not open unnamed buffers. Fixed by TaCahiroy. -7.1.4 - Fixes: - * Sometimes when a file's path has 'white space' in it, extra buffers - would be created containing each piece of the path. i.e: - opening c:\document and settings\test.txt would create a buffer - named "and" and a buffer named "Documents". This was reported and - fixed by TaCa Yoss. -7.1.3 - Fixes: - * Added code to allow only one instance of the plugin to run at a - time. Thanks Dennis Hostetler. -7.1.2 - Fixes: - * Fixed a jumplist issue spotted by JiangJun. I overlooked the - 'jumplist' and with a couple calls to 'keepjumps', everything is - fine again. - * Went back to just having a plugin file, no autoload file. By having - the autoload, WinManager was no longer working and without really - digging into the cause, it was easier to go back to using just a - plugin file. -7.1.1 - Fixes: - * A problem spotted by Thomas Arendsen Hein. - When running Vim (7.1.94), error E493 was being thrown. - Enhancements: - * Added 'D' for 'delete' buffer as the 'd' command was a 'wipe' - buffer. -7.1.0 - Another 'major' update, some by Dave Larson, some by me. - * Making use of 'autoload' now to make the plugin load quicker. - * Removed '\bs' and '\bv'. These are now controlled by the user. The - user can issue a ':sp' or ':vs' to create a horizontal or vertical - split window and then issue a '\be' - * Added handling of tabs. -7.0.17 - Fixed issue with 'drop' command. - Various enhancements and improvements. -7.0.16 - Fixed issue reported by Liu Jiaping on non Windows systems, which was - ... - Open file1, open file2, modify file1, open bufexplorer, you get the - following error: - - --------8<-------- - Error detected while processing function - 14_StartBufExplorer..14_SplitOpen: - line 4: - E37: No write since last change (add ! to override) - - But the worse thing is, when I want to save the current buffer and - type ':w', I get another error message: - E382: Cannot write, 'buftype' option is set - --------8<-------- - -7.0.15 - Thanks to Mark Smithfield for suggesting bufexplorer needed to handle - the ':args' command. -7.0.14 - Thanks to Randall Hansen for removing the requirement of terminal - versions to be recompiled with 'gui' support so the 'drop' command - would work. The 'drop' command is really not needed in terminal - versions. -7.0.13 - Fixed integration with WinManager. - Thanks to Dave Eggum for another update. - - Fix: The detailed help didn't display the mapping for toggling - the split type, even though the split type is displayed. - - Fixed incorrect description in the detailed help for toggling - relative or full paths. - - Deprecated s:ExtractBufferNbr(). Vim's str2nr() does the same - thing. - - Created a s:Set() function that sets a variable only if it hasn't - already been defined. It's useful for initializing all those - default settings. - - Removed checks for repetitive command definitions. They were - unnecessary. - - Made the help highlighting a little more fancy. - - Minor reverse compatibility issue: Changed ambiguous setting - names to be more descriptive of what they do (also makes the code - easier to follow): - Changed bufExplorerSortDirection to bufExplorerReverseSort - Changed bufExplorerSplitType to bufExplorerSplitVertical - Changed bufExplorerOpenMode to bufExplorerUseCurrentWindow - - When the BufExplorer window closes, all the file-local marks are - now deleted. This may have the benefit of cleaning up some of the - jumplist. - - Changed the name of the parameter for StartBufExplorer from - "split" to "open". The parameter is a string which specifies how - the buffer will be open, not if it is split or not. - - Deprecated DoAnyMoreBuffersExist() - it is a one line function - only used in one spot. - - Created four functions (SplitOpen(), RebuildBufferList(), - UpdateHelpStatus() and ReSortListing()) all with one purpose - to - reduce repeated code. - - Changed the name of AddHeader() to CreateHelp() to be more - descriptive of what it does. It now returns an array instead of - updating the window directly. This has the benefit of making the - code more efficient since the text the function returns is used a - little differently in the two places the function is called. - - Other minor simplifications. -7.0.12 - MAJOR Update. - This version will ONLY run with Vim version 7.0 or greater. - Dave Eggum has made some 'significant' updates to this latest - version: - - Added BufExplorerGetAltBuf() global function to be used in the - user’s rulerformat. - - Added g:bufExplorerSplitRight option. - - Added g:bufExplorerShowRelativePath option with mapping. - - Added current line highlighting. - - The split type can now be changed whether bufexplorer is opened - in split mode or not. - - Various major and minor bug fixes and speed improvements. - - Sort by extension. - Other improvements/changes: - - Changed the help key from '?' to to be more 'standard'. - - Fixed splitting of vertical bufexplorer window. - Hopefully I have not forgot something :) -7.0.11 - Fixed a couple of highlighting bugs, reported by David Eggum. He also - changed passive voice to active on a couple of warning messages. -7.0.10 - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set, - the slash character used when displaying the path was incorrect. -7.0.9 - Martin Grenfell found and eliminated an annoying bug in the - bufexplorer/winmanager integration. The bug was were an - annoying message would be displayed when a window was split or - a new file was opened in a new window. Thanks Martin! -7.0.8 - Thanks to Mike Li for catching a bug in the WinManager integration. - The bug was related to the incorrect displaying of the buffer - explorer's window title. -7.0.7 - Thanks to Jeremy Cowgar for adding a new enhancement. This - enhancement allows the user to press 'S', that is capital S, which - will open the buffer under the cursor in a newly created split - window. -7.0.6 - Thanks to Larry Zhang for finding a bug in the "split" buffer code. - If you force set g:bufExplorerSplitType='v' in your vimrc, and if you - tried to do a \bs to split the bufexplorer window, it would always - split horizontal, not vertical. He also found that I had a typeo in - that the variable g:bufExplorerSplitVertSize was all lower case in - the documentation which was incorrect. -7.0.5 - Thanks to Mun Johl for pointing out a bug that if a buffer was - modified, the '+' was not showing up correctly. -7.0.4 - Fixed a problem discovered first by Xiangjiang Ma. Well since I've - been using vim 7.0 and not 6.3, I started using a function (getftype) - that is not in 6.3. So for backward compatibility, I conditionaly use - this function now. Thus, the g:bufExplorerShowDirectories feature is - only available when using vim 7.0 and above. -7.0.3 - Thanks to Erwin Waterlander for finding a problem when the last - buffer was deleted. This issue got me to rewrite the buffer display - logic (which I've wanted to do for sometime now). - Also great thanks to Dave Eggum for coming up with idea for - g:bufExplorerShowDirectories. Read the above information about this - feature. -7.0.2 - Thanks to Thomas Arendsen Hein for finding a problem when a user - has the default help turned off and then brought up the explorer. An - E493 would be displayed. -7.0.1 - Thanks to Erwin Waterlander for finding a couple problems. - The first problem allowed a modified buffer to be deleted. Opps! The - second problem occurred when several files were opened, BufExplorer - was started, the current buffer was deleted using the 'd' option, and - then BufExplorer was exited. The deleted buffer was still visible - while it is not in the buffers list. Opps again! -7.0.0 - Thanks to Shankar R. for suggesting to add the ability to set - the fixed width (g:bufExplorerSplitVertSize) of a new window - when opening bufexplorer vertically and fixed height - (g:bufExplorerSplitHorzSize) of a new window when opening - bufexplorer horizontally. By default, the windows are normally - split to use half the existing width or height. -6.3.0 - Added keepjumps so that the jumps list would not get cluttered with - bufexplorer related stuff. -6.2.3 - Thanks to Jay Logan for finding a bug in the vertical split position - of the code. When selecting that the window was to be split - vertically by doing a '\bv', from then on, all splits, i.e. '\bs', - were split vertically, even though g:bufExplorerSplitType was not set - to 'v'. -6.2.2 - Thanks to Patrik Modesto for adding a small improvement. For some - reason his bufexplorer window was always showing up folded. He added - 'setlocal nofoldenable' and it was fixed. -6.2.1 - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting - logic and option. -6.2.0 - Thanks goes out to Simon Johann-Ganter for spotting and fixing a - problem in that the last search pattern is overridden by the search - pattern for blank lines. -6.1.6 - Thanks to Artem Chuprina for finding a pesky bug that has been around - for sometime now. The key mapping was causing the buffer - explored to close prematurely when vim was run in an xterm. The - key mapping is now removed. -6.1.5 - Thanks to Khorev Sergey. Added option to show default help or not. -6.1.4 - Thanks goes out to Valery Kondakoff for suggesting the addition of - setlocal nonumber and foldcolumn=0. This allows for line numbering - and folding to be turned off temporarily while in the explorer. -6.1.3 - Added folding. Did some code cleanup. Added the ability to force the - newly split window to be temporarily vertical, which was suggested by - Thomas Glanzmann. -6.1.2 - Now pressing the key will quit, just like 'q'. - Added folds to hide winmanager configuration. - If anyone had the 'C' option in their cpoptions they would receive - a E10 error on startup of BufExplorer. cpo is now saved, updated and - restored. Thanks to Charles E Campbell, Jr. - Attempted to make sure there can only be one BufExplorer window open - at a time. -6.1.1 - Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This - way buffers sorted by name will be in the correct order regardless of - case. -6.0.16 - Thanks to Andre Pang for the original patch/idea to get bufexplorer - to work in insertmode/modeless mode (evim). Added Initialize - and Cleanup autocommands to handle commands that need to be - performed when starting or leaving bufexplorer. -6.0.15 - Srinath Avadhanulax added a patch for winmanager.vim. -6.0.14 - Fix a few more bug that I thought I already had fixed. Thanks - to Eric Bloodworth for adding 'Open Mode/Edit in Place'. Added - vertical splitting. -6.0.13 - Thanks to Charles E Campbell, Jr. for pointing out some embarrassing - typos that I had in the documentation. I guess I need to run - the spell checker more :o) -6.0.12 - Thanks to Madoka Machitani, for the tip on adding the augroup command - around the MRUList autocommands. -6.0.11 - Fixed bug report by Xiangjiang Ma. '"=' was being added to the - search history which messed up hlsearch. -6.0.10 - Added the necessary hooks so that the Srinath Avadhanula's - winmanager.vim script could more easily integrate with this script. - Tried to improve performance. -6.0.9 - Added MRU (Most Recently Used) sort ordering. -6.0.8 - Was not resetting the showcmd command correctly. - Added nifty help file. -6.0.7 - Thanks to Brett Carlane for some great enhancements. Some are added, - some are not, yet. Added highlighting of current and alternate - filenames. Added splitting of path/filename toggle. Reworked - ShowBuffers(). - Changed my email address. -6.0.6 - Copyright notice added. Needed this so that it could be distributed - with Debian Linux. Fixed problem with the SortListing() function - failing when there was only one buffer to display. -6.0.5 - Fixed problems reported by David Pascoe, in that you where unable to - hit 'd' on a buffer that belonged to a files that no longer existed - and that the 'yank' buffer was being overridden by the help text when - the bufexplorer was opened. -6.0.4 - Thanks to Charles Campbell, Jr. for making this plugin more plugin - *compliant*, adding default keymappings of be and bs - as well as fixing the 'w:sortDirLabel not being defined' bug. -6.0.3 - Added sorting capabilities. Sort taken from explorer.vim. -6.0.2 - Can't remember. -6.0.1 - Initial release. - -=============================================================================== -TODO *bufexplorer-todo* - -- The issuing of a ':bd' command does not always remove the buffer number from - the MRU list. - -=============================================================================== -CREDITS *bufexplorer-credits* - -Author: Jeff Lanzarotta - -Credit must go out to Bram Moolenaar and all the Vim developers for -making the world's best editor (IMHO). I also want to thank everyone who -helped and gave me suggestions. I wouldn't want to leave anyone out so I -won't list names. - -=============================================================================== -vim:tw=78:noet:wrap:ts=8:ft=help:norl: diff --git a/.vim/doc/cocoa.txt b/.vim/doc/cocoa.txt deleted file mode 100644 index 93cd2af..0000000 --- a/.vim/doc/cocoa.txt +++ /dev/null @@ -1,151 +0,0 @@ -*cocoa.txt* Plugin for Cocoa/Objective-C development. - -cocoa.vim *cocoa* -Last Change: September 08, 2009 -Author: Michael Sanders - -|cocoa-introduction| Introduction -|cocoa-installation| Installation -|cocoa-overview| Overview of features -|cocoa-mappings| Mappings -|cocoa-commands| Commands -|cocoa-license| License -|cocoa-contact| Contact - -For Vim version 7.0 or later. -This plugin only works if 'compatible' is not set. -{Vi does not have any of these features.} - -============================================================================== -INTRODUCTION *cocoa-intro* - -Cocoa.vim is a collection of scripts designed to make it easier to develop -Cocoa/Objective-C applications. It includes enhanced syntax highlighting, code -completion, documentation lookup, as well as a number of other features that -can be used to integrate Vim with Xcode, allowing you to essentially replace -Xcode's editor with Vim. - -============================================================================== -INSTALLATION *cocoa-installation* - -Documentation lookup and code completion for Cocoa.vim are currently -Leopard-only (although the other parts should work on any platform). To -install, simply unzip cocoa.zip to your home vim directory (typically ~/.vim). - - *cocoa-suggested-plugins* -The code completion in cocoa.vim uses snipMate, if you have it installed, to -allow you to conveniently over the parameters in functions and -methods. If you like cocoa.vim, you may also find objc_matchbracket.vim -useful. - - *leopard-security-alert* -Documentation works by showing the page in your default browser, which -apparently causes Leopard to warn you of opening an html file for every word -you look up. To fix this, see this page: http://tinyurl.com/remove-annoying-alert - -============================================================================== -FEATURE OVERVIEW *cocoa-features* - - 1. Enhanced syntax highlighting; Vim's syntax highlighting for - Objective-C seemed a bit incomplete to me, so I have added a few - niceties, such as highlighting Cocoa keywords and differentiating - the method name and passed objects in method calls and definitions. - 2. Xcode-like mappings; mappings such as (where "d" is "command") - to build & run and to switch to the project window help to - integrate Xcode and Vim. For a complete list of the mappings in - cocoa.vim, see |cocoa-mappings|. - 3. Methods for the current file can be listed and navigated to with - the |:ListMethods| command. - 4. A template of methods declared in a header file (.h) can be built - in an implementation file (.m) with |:BuildMethods|. - 5. Cocoa/C Documentation can be looked up with the |:CocoaDoc| command, - or simply with Vim's |K|. - 6. Code completion for classes, methods, functions, constants, types, - and notifications can be invoked with . Parameters for - methods and functions are automatically converted to snippets to - over if you have snipMate installed. - -============================================================================== -MAPPINGS *cocoa-mappings* *g:objc_man_key* - -Cocoa.vim maps the following keys, some for convenience and others to -integrate with Xcode: -(Disclaimer: Sorry, I could not use the swirly symbols because vim/git was -having encoding issues. Just pretend that e.g. means cmd-r.) - - ||A - Alternate between header (.h) and implementation (.m) file - K - Look up documentation for word under cursor[1] - - A - - Build & Run (Go) - - CMD-R - - Build - - Clean - - Go to Project - - :ListMethods - (in insert mode) - Show omnicompletion menu - - ([1] This can be customized by the variable g:objc_man_key.) - -============================================================================== -COMMANDS *cocoa-commands* - - *:ListMethods* -:ListMethods Open a split window containing the methods, functions, - and #pragma marks of the current file. - *:BuildMethods* -:BuildMethods [headerfile] - Build a template of methods in an implementation (.m) - from a list declared in a header file (.h). If no - argument is given, the corresponding header file is - used (e.g. "foo.m" -> "foo.h"). - -============================================================================== -CODE COMPLETION *cocoa-completion* - -When cocoa.vim is installed the 'omnifunc' is automatically set to -'cocoacomplete#Complete'. This allows you to complete classes, functions, -methods, etc. with . These keywords are saved from header files in -~/.vim/lib/cocoa_indexes; they have been built for you, although you can build -them again by running ~/.vim/lib/extras/cocoa_definitions.py. - -Completions with parameters (i.e., functions and methods) are automatically -converted to |snipMate| if it is installed. To invoke the snippet, simply -press a whitespace character (space, tab, or return), and then navigate the -snippet as you would in snipMate. - -============================================================================== -LICENSE *cocoa-license* - -Cocoa.vim is released under the MIT license: - -Copyright © 2009 Michael Sanders. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The software is provided "as is", without warranty of any kind, express or -implied, including but not limited to the warranties of merchantability, -fitness for a particular purpose and noninfringement. In no event shall the -authors or copyright holders be liable for any claim, damages or other -liability, whether in an action of contract, tort or otherwise, arising from, -out of or in connection with the software or the use or other dealings in the -software. - -============================================================================== -CONTACT *cocoa-contact* *cocoa-author* - -To contact the author (Michael Sanders), you may email: - - msanders42+cocoa.vim gmail com - -Thanks for your interest in the script! - -============================================================================== -vim:tw=78:ts=8:ft=help:norl:enc=utf-8: diff --git a/.vim/doc/matchit.txt b/.vim/doc/matchit.txt deleted file mode 100644 index 8a3a96e..0000000 --- a/.vim/doc/matchit.txt +++ /dev/null @@ -1,406 +0,0 @@ -*matchit.txt* Extended "%" matching - -For instructions on installing this file, type - :help matchit-install -inside Vim. - -For Vim version 6.3. Last change: 2007 Aug 29 - - - VIM REFERENCE MANUAL by Benji Fisher - -*matchit* *matchit.vim* - -1. Extended matching with "%" |matchit-intro| -2. Activation |matchit-activate| -3. Configuration |matchit-configure| -4. Supporting a New Language |matchit-newlang| -5. Known Bugs and Limitations |matchit-bugs| - -The functionality mentioned here is a plugin, see |add-plugin|. -This plugin is only available if 'compatible' is not set. -You can avoid loading this plugin by setting the "loaded_matchit" variable -in your |vimrc| file: > - :let loaded_matchit = 1 - -{Vi does not have any of this} - -============================================================================== -1. Extended matching with "%" *matchit-intro* - - *matchit-%* -% Cycle forward through matching groups, such as "if", "else", "endif", - as specified by |b:match_words|. - - *g%* *v_g%* *o_g%* -g% Cycle backwards through matching groups, as specified by - |b:match_words|. For example, go from "if" to "endif" to "else". - - *[%* *v_[%* *o_[%* -[% Go to [count] previous unmatched group, as specified by - |b:match_words|. Similar to |[{|. - - *]%* *v_]%* *o_]%* -]% Go to [count] next unmatched group, as specified by - |b:match_words|. Similar to |]}|. - - *v_a%* -a% In Visual mode, select the matching group, as specified by - |b:match_words|, containing the cursor. Similar to |v_a[|. - A [count] is ignored, and only the first character of the closing - pattern is selected. - -In Vim, as in plain vi, the percent key, |%|, jumps the cursor from a brace, -bracket, or paren to its match. This can be configured with the 'matchpairs' -option. The matchit plugin extends this in several ways: - - You can match whole words, such as "if" and "endif", not just - single characters. You can also specify a |regular-expression|. - You can define groups with more than two words, such as "if", - "else", "endif". Banging on the "%" key will cycle from the "if" to - the first "else", the next "else", ..., the closing "endif", and back - to the opening "if". Nested structures are skipped. Using |g%| goes - in the reverse direction. - By default, words inside comments and strings are ignored, unless - the cursor is inside a comment or string when you type "%". If the - only thing you want to do is modify the behavior of "%" so that it - behaves this way, you do not have to define |b:match_words|, since the - script uses the 'matchpairs' option as well as this variable. - -See |matchit-details| for details on what the script does, and |b:match_words| -for how to specify matching patterns. - -MODES: *matchit-modes* *matchit-v_%* *matchit-o_%* - -Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in -|motion| commands in |Operator-pending| and |Visual| modes. However, you -cannot make these motions |linewise| or |characterwise|, since the |:omap|s -that define them start with "v" in order to make the default behavior -inclusive. (See |o_v|.) In other words, "dV%" will not work. The -work-around is to go through Visual mode: "V%d" will work. - -LANGUAGES: *matchit-languages* - -Currently, the following languages are supported: Ada, ASP with VBS, Csh, -DTD, Entity, Essbase, Fortran, HTML, JSP (same as HTML), LaTeX, Lua, Pascal, -SGML, Shell, Tcsh, Vim, XML. Other languages may already have support via -the default |filetype-plugin|s in the standard vim distribution. - -To support a new language, see |matchit-newlang| below. - -DETAILS: *matchit-details* *matchit-parse* - -Here is an outline of what matchit.vim does each time you hit the "%" key. If -there are |backref|s in |b:match_words| then the first step is to produce a -version in which these back references have been eliminated; if there are no -|backref|s then this step is skipped. This step is called parsing. For -example, "\(foo\|bar\):end\1" is parsed to yield -"\(foo\|bar\):end\(foo\|bar\)". This can get tricky, especially if there are -nested groups. If debugging is turned on, the parsed version is saved as -|b:match_pat|. - - *matchit-choose* -Next, the script looks for a word on the current line that matches the pattern -just constructed. It includes the patterns from the 'matchpairs' option. -The goal is to do what you expect, which turns out to be a little complicated. -The script follows these rules: - - Insist on a match that ends on or after the cursor. - Prefer a match that includes the cursor position (that is, one that - starts on or before the cursor). - Prefer a match that starts as close to the cursor as possible. - If more than one pattern in |b:match_words| matches, choose the one - that is listed first. - -Examples: - - Suppose you > - :let b:match_words = '<:>,:' -< and hit "%" with the cursor on or before the "<" in "a is born". - The pattern '<' comes first, so it is preferred over '', which - also matches. If the cursor is on the "t", however, then '' is - preferred, because this matches a bit of text containing the cursor. - If the two groups of patterns were reversed then '<' would never be - preferred. - - Suppose you > - :let b:match_words = 'if:end if' -< (Note the space!) and hit "%" with the cursor at the end of "end if". - Then "if" matches, which is probably not what you want, but if the - cursor starts on the "end " then "end if" is chosen. (You can avoid - this problem by using a more complicated pattern.) - -If there is no match, the cursor does not move. (Before version 1.13 of the -script, it would fall back on the usual behavior of |%|). If debugging is -turned on, the matched bit of text is saved as |b:match_match| and the cursor -column of the start of the match is saved as |b:match_col|. - -Next, the script looks through |b:match_words| (original and parsed versions) -for the group and pattern that match. If debugging is turned on, the group is -saved as |b:match_ini| (the first pattern) and |b:match_tail| (the rest). If -there are |backref|s then, in addition, the matching pattern is saved as -|b:match_word| and a table of translations is saved as |b:match_table|. If -there are |backref|s, these are determined from the matching pattern and -|b:match_match| and substituted into each pattern in the matching group. - -The script decides whether to search forwards or backwards and chooses -arguments for the |searchpair()| function. Then, the cursor is moved to the -start of the match, and |searchpair()| is called. By default, matching -structures inside strings and comments are ignored. This can be changed by -setting |b:match_skip|. - -============================================================================== -2. Activation *matchit-activate* - -You can use this script as a plugin, by copying it to your plugin directory. -See |add-global-plugin| for instructions. You can also add a line to your -|vimrc| file, such as > - :source $VIMRUNTIME/macros/matchit.vim -or > - :runtime macros/matchit.vim -Either way, the script should start working the next time you start up Vim. - -(Earlier versions of the script did nothing unless a |buffer-variable| named -|b:match_words| was defined. Even earlier versions contained autocommands -that set this variable for various file types. Now, |b:match_words| is -defined in many of the default |filetype-plugin|s instead.) - -For a new language, you can add autocommands to the script or to your vimrc -file, but the recommended method is to add a line such as > - let b:match_words = '\:\' -to the |filetype-plugin| for your language. See |b:match_words| below for how -this variable is interpreted. - -TROUBLESHOOTING *matchit-troubleshoot* - -The script should work in most installations of Vim. It may not work if Vim -was compiled with a minimal feature set, for example if the |+syntax| option -was not enabled. If your Vim has support for syntax compiled in, but you do -not have |syntax| highlighting turned on, matchit.vim should work, but it may -fail to skip matching groups in comments and strings. If the |filetype| -mechanism is turned off, the |b:match_words| variable will probably not be -defined automatically. - -============================================================================== -3. Configuration *matchit-configure* - -There are several variables that govern the behavior of matchit.vim. Note -that these are variables local to the buffer, not options, so use |:let| to -define them, not |:set|. Some of these variables have values that matter; for -others, it only matters whether the variable has been defined. All of these -can be defined in the |filetype-plugin| or autocommand that defines -|b:match_words| or "on the fly." - -The main variable is |b:match_words|. It is described in the section below on -supporting a new language. - - *MatchError* *matchit-hl* *matchit-highlight* -MatchError is the highlight group for error messages from the script. By -default, it is linked to WarningMsg. If you do not want to be bothered by -error messages, you can define this to be something invisible. For example, -if you use the GUI version of Vim and your command line is normally white, you -can do > - :hi MatchError guifg=white guibg=white -< - *b:match_ignorecase* -If you > - :let b:match_ignorecase = 1 -then matchit.vim acts as if 'ignorecase' is set: for example, "end" and "END" -are equivalent. If you > - :let b:match_ignorecase = 0 -then matchit.vim treats "end" and "END" differently. (There will be no -b:match_infercase option unless someone requests it.) - - *b:match_debug* -Define b:match_debug if you want debugging information to be saved. See -|matchit-debug|, below. - - *b:match_skip* -If b:match_skip is defined, it is passed as the skip argument to -|searchpair()|. This controls when matching structures are skipped, or -ignored. By default, they are ignored inside comments and strings, as -determined by the |syntax| mechanism. (If syntax highlighting is turned off, -nothing is skipped.) You can set b:match_skip to a string, which evaluates to -a non-zero, numerical value if the match is to be skipped or zero if the match -should not be skipped. In addition, the following special values are -supported by matchit.vim: - s:foo becomes (current syntax item) =~ foo - S:foo becomes (current syntax item) !~ foo - r:foo becomes (line before cursor) =~ foo - R:foo becomes (line before cursor) !~ foo -(The "s" is meant to suggest "syntax", and the "r" is meant to suggest -"regular expression".) - -Examples: - - You can get the default behavior with > - :let b:match_skip = 's:comment\|string' -< - If you want to skip matching structures unless they are at the start - of the line (ignoring whitespace) then you can > - :let b:match_skip = 'R:^\s*' -< Do not do this if strings or comments can span several lines, since - the normal syntax checking will not be done if you set b:match_skip. - - In LaTeX, since "%" is used as the comment character, you can > - :let b:match_skip = 'r:%' -< Unfortunately, this will skip anything after "\%", an escaped "%". To - allow for this, and also "\\%" (an excaped backslash followed by the - comment character) you can > - :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%' -< - See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both - syntax and a regular expression. - -============================================================================== -4. Supporting a New Language *matchit-newlang* - *b:match_words* -In order for matchit.vim to support a new language, you must define a suitable -pattern for |b:match_words|. You may also want to set some of the -|matchit-configure| variables, as described above. If your language has a -complicated syntax, or many keywords, you will need to know something about -Vim's |regular-expression|s. - -The format for |b:match_words| is similar to that of the 'matchpairs' option: -it is a comma (,)-separated list of groups; each group is a colon(:)-separated -list of patterns (regular expressions). Commas and backslashes that are part -of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to -have only one group; the effect is undefined if a group has only one pattern. -A simple example is > - :let b:match_words = '\:\,' - \ . '\:\:\:\' -(In Vim regular expressions, |\<| and |\>| denote word boundaries. Thus "if" -matches the end of "endif" but "\" does not.) Then banging on the "%" -key will bounce the cursor between "if" and the matching "endif"; and from -"while" to any matching "continue" or "break", then to the matching "endwhile" -and back to the "while". It is almost always easier to use |literal-string|s -(single quotes) as above: '\' rather than "\\" and so on. - -Exception: If the ":" character does not appear in b:match_words, then it is -treated as an expression to be evaluated. For example, > - :let b:match_words = 'GetMatchWords()' -allows you to define a function. This can return a different string depending -on the current syntax, for example. - -Once you have defined the appropriate value of |b:match_words|, you will -probably want to have this set automatically each time you edit the -appropriate file type. The recommended way to do this is by adding the -definition to a |filetype-plugin| file. - -Tips: Be careful that your initial pattern does not match your final pattern. -See the example above for the use of word-boundary expressions. It is usually -better to use ".\{-}" (as many as necessary) instead of ".*" (as many as -possible). See |\{-|. For example, in the string "label", "<.*>" -matches the whole string whereas "<.\{-}>" and "<[^>]*>" match "" and -"". - - *matchit-spaces* *matchit-s:notend* -If "if" is to be paired with "end if" (Note the space!) then word boundaries -are not enough. Instead, define a regular expression s:notend that will match -anything but "end" and use it as follows: > - :let s:notend = '\%(\:\' -< *matchit-s:sol* -This is a simplified version of what is done for Ada. The s:notend is a -|script-variable|. Similarly, you may want to define a start-of-line regular -expression > - :let s:sol = '\%(^\|;\)\s*' -if keywords are only recognized after the start of a line or after a -semicolon (;), with optional white space. - - *matchit-backref* *matchit-\1* -In any group, the expressions |\1|, |\2|, ..., |\9| refer to parts of the -INITIAL pattern enclosed in |\(|escaped parentheses|\)|. These are referred -to as back references, or backrefs. For example, > - :let b:match_words = '\:\(h\)\1\>' -means that "bo" pairs with "ho" and "boo" pairs with "hoo" and so on. Note -that "\1" does not refer to the "\(h\)" in this example. If you have -"\(nested \(parentheses\)\) then "\d" refers to the d-th "\(" and everything -up to and including the matching "\)": in "\(nested\(parentheses\)\)", "\1" -refers to everything and "\2" refers to "\(parentheses\)". If you use a -variable such as |s:notend| or |s:sol| in the previous paragraph then remember -to count any "\(" patterns in this variable. You do not have to count groups -defined by |\%(\)|. - -It should be possible to resolve back references from any pattern in the -group. For example, > - :let b:match_words = '\(foo\)\(bar\):more\1:and\2:end\1\2' -would not work because "\2" cannot be determined from "morefoo" and "\1" -cannot be determined from "andbar". On the other hand, > - :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1' -should work (and have the same effect as "foobar:barfoo:endfoobar"), although -this has not been thoroughly tested. - -You can use |zero-width| patterns such as |\@<=| and |\zs|. (The latter has -not been thouroughly tested in matchit.vim.) For example, if the keyword "if" -must occur at the start of the line, with optional white space, you might use -the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of -at the start of the line. For another example, if HTML had only one tag then -one could > - :let b:match_words = '<:>,<\@<=tag>:<\@<=/tag>' -so that "%" can bounce between matching "<" and ">" pairs or (starting on -"tag" or "/tag") between matching tags. Without the |\@<=|, the script would -bounce from "tag" to the "<" in "", and another "%" would not take you -back to where you started. - -DEBUGGING *matchit-debug* *:MatchDebug* - -If you are having trouble figuring out the appropriate definition of -|b:match_words| then you can take advantage of the same information I use when -debugging the script. This is especially true if you are not sure whether -your patterns or my script are at fault! To make this more convenient, I have -made the command :MatchDebug, which defines the variable |b:match_debug| and -creates a Matchit menu. This menu makes it convenient to check the values of -the variables described below. You will probably also want to read -|matchit-details| above. - -Defining the variable |b:match_debug| causes the script to set the following -variables, each time you hit the "%" key. Several of these are only defined -if |b:match_words| includes |backref|s. - - *b:match_pat* -The b:match_pat variable is set to |b:match_words| with |backref|s parsed. - *b:match_match* -The b:match_match variable is set to the bit of text that is recognized as a -match. - *b:match_col* -The b:match_col variable is set to the cursor column of the start of the -matching text. - *b:match_wholeBR* -The b:match_wholeBR variable is set to the comma-separated group of patterns -that matches, with |backref|s unparsed. - *b:match_iniBR* -The b:match_iniBR variable is set to the first pattern in |b:match_wholeBR|. - *b:match_ini* -The b:match_ini variable is set to the first pattern in |b:match_wholeBR|, -with |backref|s resolved from |b:match_match|. - *b:match_tail* -The b:match_tail variable is set to the remaining patterns in -|b:match_wholeBR|, with |backref|s resolved from |b:match_match|. - *b:match_word* -The b:match_word variable is set to the pattern from |b:match_wholeBR| that -matches |b:match_match|. - *b:match_table* -The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in -|b:match_word|. - -============================================================================== -5. Known Bugs and Limitations *matchit-bugs* - -Just because I know about a bug does not mean that it is on my todo list. I -try to respond to reports of bugs that cause real problems. If it does not -cause serious problems, or if there is a work-around, a bug may sit there for -a while. Moral: if a bug (known or not) bothers you, let me know. - -The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may -have undesired effects in Select mode |Select-mode-mapping|. At least, if you -want to replace the selection with any character in "ag%[]" there will be a -pause of |'updatetime'| first. - -It would be nice if "\0" were recognized as the entire pattern. That is, it -would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1". I may -try to implement this in a future version. (This is not so easy to arrange as -you might think!) - -============================================================================== -vim:tw=78:fo=tcq2: diff --git a/.vim/doc/project.txt b/.vim/doc/project.txt deleted file mode 100644 index 8f85c23..0000000 --- a/.vim/doc/project.txt +++ /dev/null @@ -1,710 +0,0 @@ -*project.txt* Plugin for managing multiple projects with multiple sources - For Vim version 6.x and Vim version 7.x. - Last Change: Fri 13 Oct 2006 10:20:13 AM EDT - - - By Aric Blumer - aricvim email-at-sign charter.net - - *project* *project-plugin* - Contents: - - Commands...................|project-invoking| - Inheritance.............|project-inheritance| - Mappings...................|project-mappings| - Adding Mappings.....|project-adding-mappings| - Settings...................|project-settings| - Example File................|project-example| - Tips...........................|project-tips| - - -You can use this plugin's basic functionality to set up a list of -frequently-accessed files for easy navigation. The list of files will be -displayed in a window on the left side of the Vim window, and you can press - or double-click on filenames in the list to open the files. I find -this easier to use than having to navigate a directory hierarchy with the -|file-explorer|. - -You can also instruct the Plugin to change to a directory and to run Vim -scripts when you select a file. These scripts can, for example, modify the -environment to include compilers in $PATH. This makes it very easy to use -quickfix with multiple projects that use different environments. - -Other features include: - o Loading/Unloading all the files in a Project (\l, \L, \w, and \W) - o Grepping all the files in a Project (\g and \G) - o Running a user-specified script on a file (can be used to launch an - external program on the file) (\1 through \9) - o Running a user-specified script on all the files in a Project - (\f1-\f9 and \F1-\F9) - o High degree of user-configurability - o Also works with |netrw| using the XXXX://... notation where XXXX is - ftp, rcp, scp, or http. - -All of this is specified within a simple text file and a few global variables -in your vimrc file. - -You must set 'nocompatible' in your |vimrc| file to use this plugin. You can -stop the plugin from being loaded by setting the "loaded_project" variable: > - :let loaded_project = 1 - - -============================================================================== -COMMANDS *project-invoking* - -You can use the plugin by placing it in your plugin directory (e.g., -~/.vim/plugin). See |add-global-plugin|. When you start vim the next time, you -then enter the command > - :Project -or > - :Project {file} - -If you do not specify the filename, $HOME/.vimprojects is used. - -To have Vim come up with the Project Window enabled automatically (say, from a -GUI launcher), run Vim like this: [g]vim +Project - -Note that you can invoke :Project on only one file at a time. If you wish to -change the Project File, do a :bwipe in the Project Buffer, then re-invoke the -Plugin as described above. - -Several Projects can be kept and displayed in the same file, each in a fold -delimited by { and } (see |fold.txt|). There can be any number of nested -folds to provide you with a Project hierarchy. Any line without a { or a } in -the file is considered to be a filename. Blank lines are ignored, and any -text after a # is ignored. - -Because the plugin uses standard Vim folds, you can use any of the -|fold-commands|. You can double-click on the first line of a fold to open and -close it. You can select a file to open by putting the cursor on its name and -pressing or by double-clicking on it. The plugin will create a new -window to the right or use the |CTRL-W_p| equivalent if it exists. - - *project-syntax* -Each Project Entry has this form: - -project_entry ::= - ={projpath} [{options}] { - [ filename ] - [ project_entry ] - } - -{options} is one or more of the following (on the same line): - CD={path} - in={filename} - out={filename} - filter="{pat}" - flags={flag} - -Note that a project_entry can reside within a project_entry. This allows you -to set up a hierarchy within your Project. - -The will be displayed in the foldtext and cannot contain "=". -There can be no space character directly on either side of the =. - -The {projpath} is the path in which the files listed in the Project's fold -will be found, and it may contain environment variables. If the path is a -relative path, then the plugin constructs the whole path from the Project's -parent, grandparent, etc., all the way up the hierarchy. An outermost -project_entry must have an absolute path. See the |project-inheritance| -example below. {projpath} may contain spaces, but they must be escaped like -normal Vim escapes. Here are two examples of the same directory: -> - Example=/my/directory/with\ spaces { - } - Example="/my/directory/with spaces" { - } - -I recommend this for Windows®: > - - Example="c:\My Documents" { - } - -But Vim is smart enough to do this, too: > - - Example=c:\My\ Documents { - } - -CD= provides the directory that Vim will change to when you select a file in -that fold (using |:cd|). This allows you, for example, to enter |:make| to use -the local Makefile. A CD=. means that Vim will make {projpath} or its -inherited equivalent the current working directory. When CD is omitted, the -directory is not changed. There can be no space on either side of the =. The -value of CD can also be a relative path from a parent's CD. See the -|project-inheritance| example below. This directive is ignored for |netrw| -projects. Spaces are allowed in the path as for {projpath}. - -in= and out= provide the means to run arbitrary Vim scripts whenever you enter -or leave a file's buffer (see the |BufEnter| and |BufLeave| autocommand -events). The idea is to have a Vim script that sets up or tears down the -environment for the Project like this: - -in.vim: > - let $PROJECT_HOME='~/my_project' - " Put the compiler in $PATH - if $PATH !~ '/path/to/my/compiler' - let $PATH=$PATH.':/path/to/my/compiler' - endif - -out.vim: > - " Remove compiler from $PATH - if $PATH =~ '/path/to/my/compiler' - let $PATH=substitute($PATH, ':/path/to/my/compiler', '', 'g') - endif - -Then you can use :make with the proper environment depending on what file you -are currently editing. If the path to the script is relative, then it is -relative from {projpath}. These directives are inherited by Subprojects -unless the Subproject specifies its own. For use with |netrw| projects, the -paths specified for in= and out= must be absolute and local. - -filter= specifies a |glob()| file pattern. It is used to regenerate the list -of files in a Project fold when using the \r (r) map in the -Project Window. The filter value must be in quotes because it can contain -multiple file patterns. If filter is omitted, then the * pattern is used. -There can be no space on either side of the =. A Subproject will inherit the -filter of its parent unless it specifies its own filter. - -flags= provides the means to enable/disable features for a particular fold. -The general mnemonic scheme is for lower case to turn something off and upper -case to turn something on. {flag} can contain any of the following -characters: - - flag Description ~ - - l Turn off recursion for this fold for \L. Subfolds are also - blocked from the recursion. - - r Turn off refresh. When present, do not refresh this fold when - \r or \R is used. This does not affect subfold recursion. - - S Turn on sorting for refresh and create. - - s Turn off sorting for refresh and create. - - T Turn on top gravity. Forces folds to the top of the current - fold when refreshing. It has the same affect as the 'T' flag - in g:proj_flags, but controls the feature on a per-fold basis. - - t Turn off top gravity. Forces folds to the bottom of the - current fold when refreshing. - - w Turn off recursion for this fold for \W. Subfolds are also - blocked from the recursion. - - -Flags are not inherited by Subprojects. - -Any text outside a fold is ignored. - - -============================================================================== -INHERITANCE *project-inheritance* - -It's best to show inheritance by comparing these two Project Files: -> - Parent=~/my_project CD=. filter="Make* *.mk" flags=r { - Child1=c_code { - } - Child2=include CD=. filter="*.h" { - } - } - -Child1's path is "~/my_project/c_code" because ~/my_project is inherited. It -also inherits the CD from Parent. Since Parent has CD=., the Parent's cwd is -"~/my_project". Child1 therefore inherits a CD of "~/my_project". Finally, -Child1 inherits the filter from Parent. The flags are not inherited. - -Child2 only inherits the "~/my_project" from Parent. - -Thus, the example above is exactly equivalent to this: -> - Parent=~/my_project CD=. filter="Make* *.mk" flags=r { - Child1=~/my_project/c_code CD=~/my_project filter="Make* *.mk" { - } - Child2=~/my_project/include CD=~/my_project/include filter="*.h" { - } - } - -(For a real Project, Child1 would not want to inherit its parent's filter, but -this example shows the concept.) You can always enter \i to display what the -cursor's project inherits. - - -============================================================================== -MAPPINGS *project-mappings* - -Map Action ~ - -\r Refreshes the Project fold that the cursor is in by placing in the - fold all the files that match the filter. The Project is refreshed - using an indent of one space for every foldlevel in the hierarchy. - - You may place a "# pragma keep" (without the quotes) at the end of a - line, and the file entry on that line will not be removed when you - refresh. This is useful, for example, when you have . as an entry so - you can easily browse the directory. - - Note that this mapping is actually r, and the default of - || is \. - - This does not work for Projects using |netrw|. - -\R Executes \r recursively in the current fold and all folds below. - This does not work for Projects using |netrw|. - -\c Creates a Project fold entry. It asks for the description, the path - to the files, the CD parameter, and the filename |glob()| pattern. - From this information, it will create the Project Entry below the - cursor. - - This does not work for Projects using |netrw|. - -\C Creates a Project fold entry like \c, but recursively includes all the - subdirectories. - - - Select a file to open in the |CTRL-W_p| window or in a new window. If - the cursor is on a fold, open or close it. - - -\s - Same as but horizontally split the target window. - s is provided for those terminals that don't recognize - . - -\S - Load all files in a project by doing horizontal splits. - - -\o - Same as but ensure that the opened file is the only other - window. o is provided for those terminals that don't - recognize . - - -\v - Same as but only display the file--the cursor stays in the - Project Window. - -<2-LeftMouse> - (Double-click) If on a closed fold, open it. If on an open fold - boundary, close it. If on a filename, open the file in the |CTRL-W_p| - window or in a new window. - - - Same as . - - - Same as . - - - Increase the width of the Project Window by g:proj_window_increment or - toggle between a width of - g:proj_window_width + g:proj_window_increment - and - g:proj_window_width. - - Whether you toggle or monotonically increase the width is determined - by the 't' flag of the g:proj_flags variable (see |project-flags|). - - Note that a Right Mouse click will not automatically place the cursor - in the Project Window if it is in a different window. The window will - go back to the g:proj_window_width width when you leave the window. - - Same as - - -\ - Move the text or fold under the cursor up one row. This may not work - in a terminal because the terminal is unaware of this key combination. - is provided for those terminals that don't recognize - . - - - -\ - Move the text or fold under the cursor down one row. This may not work - in a terminal because the terminal is unaware of this key combination. - is provided for those terminals that don't - recognize . - -\i Show in the status line the completely resolved and inherited - parameters for the fold the cursor is in. This is intended for - debugging your relative path and inherited parameters for manually - entered Projects. - -\I Show in the status line the completely resolved filename. Uses the - Project_GetFname(line('.')) function. - -\1 - \9 - Run the command specified in g:proj_run{x} where {x} is the number - of the key. See the documentation of g:proj_run1 below. - -\f1-\f9 - Run the command specified in g:proj_run_fold{x} where {x} is the - number of the key. The command is run on the files at the current - Project level. See the |project-settings| below. - -\F1-\F9 - Run the command specified in g:proj_run_fold{x} where {x} is the - number of the key. The command is run on the files at the current - Project level and all Subprojects. See the |project-settings| below. - -\0 Display the commands that are defined for \1 through \9. - -\f0 Display the commands that are defined for \f1 through \f9 and \F1 - through \F0. Same as \F0. - -\l Load all the files in the current Project level into Vim. While files - are being loaded, you may press any key to stop. - -\L Load all the files in the current Project and all Subprojects into - Vim. Use this mapping with caution--I wouldn't suggest using \L to - load a Project with thousands of files. (BTW, my Project file has more - than 5,300 files in it!) While files are being loaded, you may press - any key to stop. - -\w Wipe all the files in the current Project level from Vim. (If files - are modified, they will be saved first.) While files are being wiped, - you may press any key to stop. - -\W Wipe all the files in the current Project and all Subprojects from - Vim. (If files are modified, they will be saved first.) While files - are being wiped, you may press any key to stop. - -\g Grep all the files in the current Project level. - -\G Grep all the files in the current Project level and all Subprojects. - -\e Set up the Environment for the Project File as though you had selected - it with . This allows you to do a \e and a :make without - having to open any files in the project. - -\E Explore (using |file-explorer|) the directory of the project the - cursor is in. Does not work with netrw. - - When the 'g' flag is present in g:proj_flags (see |project-flags|) - this key toggles the Project Window open and closed. You may remap - this toggle function by putting the following in your vimrc and - replacing P with whatever key combination you wish: - - nmap P ToggleProject - -Note that the Project Plugin remaps :help because the Help Window and the -Project Window get into a fight over placement. The mapping avoids the -problem. - -============================================================================== -ADDING MAPPINGS *project-adding-mappings* - -You can add your own mappings or change the mappings of the plugin by placing -them in the file $HOME/.vimproject_mappings. This file, if it exists, will be -sourced when the plugin in loaded. Here is an example that will count the -number of entries in a project when you press \K (Kount, C is taken :-): > - - function! s:Wc() - let b:loadcount=0 - function! SpawnExec(infoline, fname, lineno, data) - let b:loadcount = b:loadcount + 1 - if getchar(0) != 0 | let b:stop_everything=1 | endif - endfunction - call Project_ForEach(1, line('.'), "*SpawnExec", 0, '') - delfunction SpawnExec - echon b:loadcount." Files\r" - unlet b:loadcount - if exists("b:stop_everything") - unlet b:stop_everything - echon "Aborted.\r" - endif - endfunction - - nnoremap K :call Wc() - -Here's another example of how I integrated the use of perforce with the plugin -in my $HOME/.vimproject_mappings: -> - function! s:DoP4(cmd) - let name=Project_GetFname(line('.')) - let dir=substitute(name, '\(.*\)/.*', '\1', 'g') - exec 'cd '.dir - exec "!".a:cmd.' '.Project_GetFname(line('.')) - cd - - endfunction - - nmap \pa :call DoP4("p4add") - nmap \pe :call DoP4("p4edit") -< -(Note that I CD to the directory the file is in so I can pick of the $P4CONFIG -file. See the perforce documentation.) - -This creates the mappings \pe to check out the file for edit and \pa to add -the file to the depot. - -Here is another example where I remap the mapping to use an external -program to launch a special kind of file (in this case, it launches ee to view -a jpg file). It is a bit contrived, but it works. -> - let s:sid = substitute(maparg('', 'n'), '.*\(.\{-}\)_.*', '\1', '') - function! s:LaunchOrWhat() - let fname=Project_GetFname(line('.')) - if fname =~ '\.jpg$' - exec 'silent! !ee "'.fname.'"&' - else - call {s:sid}_DoFoldOrOpenEntry('', 'e') - endif - endfunction - nnoremap \|:call LaunchOrWhat() -< -If the file ends in .jpg, the external program is launched, otherwise the -original mapping of is run. - -============================================================================== -SETTINGS *project-settings* - -You can set these variables in your vimrc file before the plugin is loaded to -change its default behavior - -g:proj_window_width - The width of the Project Window that the plugin attempts to maintain. - Default: 24 - - The Project Plugin is not always successful in keeping the window - where I want it with the size specified here, but it does a decent - job. - -g:proj_window_increment - The increment by which to increase the width of the Project Window - when pressing or clicking the . Default: 100 - (See |project-mappings|.) - - *project-flags* -g:proj_flags - Default: "imst" - Various flags to control the behavior of the Project Plugin. This - variable can contain any of the following character flags. - - flag Description ~ - - b When present, use the |browse()| when selecting directories - for \c and \C. This is off by default for Windows, because - the windows browser does not allow you to select directories. - - c When present, the Project Window will automatically close when - you select a file. - - F Float the Project Window. That is, turn off automatic - resizing and placement. This allows placement between other - windows that wish to share similar placement at the side of - the screen. It is also particularly helpful for external - window managers. - - g When present, the mapping for will be created to toggle - the Project Window open and closed. - - i When present, display the filename and the current working - directory in the command line when a file is selected for - opening. - - l When present, the Project Plugin will use the |:lcd| command - rather than |:cd| to change directories when you select a file - to open. This flag is really obsolete and not of much use - because of L below. - - L Similar to l, but install a BufEnter/Leave |:autocommand| to - ensure that the current working directory is changed to the - one specified in the fold CD specification whenever that - buffer is active. (|:lcd| only changes the CWD for a window, - not a buffer.) - - m Turn on mapping of the |CTRL-W_o| and |CTRL-W_CTRL_O| normal - mode commands to make the current buffer the only visible - buffer, but keep the Project Window visible, too. - - n When present, numbers will be turned on for the project - window. - - s When present, the Project Plugin will use syntax highlighting - in the Project Window. - - S Turn on sorting for refresh and create. - - t When present, toggle the size of the window rather than just - increase the size when pressing or right-clicking. - See the entry for in |project-mappings|. - - T When present, put Subproject folds at the top of the fold when - refreshing. - - v When present, use :vimgrep rather than :grep when using \G. - -g:proj_run1 ... g:proj_run9 - Contains a Vim command to execute on the file. See the - mappings of \1 to \9 above. - - %f is replaced with the full path and filename - %F is replaced with the full path and filename with spaces - quoted - %n is replaced with the filename alone - %N is replaced with the filename alone with spaces quoted - %h is replaced with the home directory - %H is replaced with the home directory with spaces quoted - %r is replaced with the directory relative to the CD path - %R is replaced with the directory relative to the CD path - with spaces quoted - %d is replaced with the CD directory. - %D is replaced with the CD directory.with spaces quoted - %% is replaced with a single % that is not used in - expansion. - - (Deprecated: %s is also replaced with the full path and - filename for backward compatibility.) - - For example, gvim will be launched on the file under the - cursor when you enter \3 if the following is in your vimrc - file: > - let g:proj_run3='silent !gvim %f' -< Here are a few other examples: > - let g:proj_run1='!p4 edit %f' - let g:proj_run2='!p4 add %f' - let g:proj_run4="echo 'Viewing %f'|sil !xterm -e less %f &" -< - On Windows systems you will want to put the %f, %h, and %d in - single quotes to avoid \ escaping. - -g:proj_run_fold1 ... g:proj_run_fold9 - Contains a Vim command to execute on the files in a fold. See - the mappings of \f1 to \f9 and \F1 to \F9 above. - - %f is the filename, %h is replaced with the project home - directory, and %d is replaced with the CD directory. Multiple - filenames can be handled in two ways: - - The first (default) way is to have %f replaced with all the - absolute filenames, and the command is run once. The second - is to have the command run for each of the non-absolute - filenames (%f is replaced with one filename at a time). To - select the second behavior, put an '*' character at the - beginning of the g:proj_run_fold{x} variable. (The '*' is - stripped before the command is run.) - - For example, note the difference between the following: > - let g:proj_run_fold3="*echo '%h/%f'" - let g:proj_run_fold4="echo '%f'" -< - Note that on Windows systems, you will want the %f, %h, and %c - within single quotes, or the \ in the paths will cause - problems. The alternative is to put them in |escape()|. - - -============================================================================== -PROJECT EXAMPLE FILE *project-example* - -Here is an example ~/.vimprojects file: > - - 1 My Project=~/c/project CD=. in=in.vim out=out.vim flags=r { - 2 Makefile - 3 in.vim - 4 out.vim - 5 GUI Files=. filter="gui*.c gui*.h" { - 6 gui_window.c - 7 gui_dialog.c - 8 gui_list.c - 9 gui.h # Header file - 10 } - 11 Database Files=. filter="data*.c data*.h" { - 12 data_read.c - 13 data_write.c - 14 data.h - 15 } - 16 OS-Specific Files { - 17 Win32=. filter="os_win32*.c os_win32*.h" { - 18 os_win32_gui.c - 19 os_win32_io.c - 20 } - 21 Unix=. filter="os_unix*.c os_unix*.h" { - 22 os_unix_gui.c - 23 os_unix_io.c - 24 } - 25 } - 26 } - -(Don't type in the line numbers, of course.) - - -============================================================================== -TIPS ON USING PROJECT PLUGIN *project-tips* - -1. You can create a Project Entry by entering this: > - - Label=~/wherever CD=. filter="*.c *.h" { - } -< - Then you can put the cursor in the fold and press \r. The script will fill - in the files (C files in this case) from this directory for you. This is - equivalent to \c without any dialogs. - -2. You can edit the Project File at any time to add, remove, or reorder files - in the Project list. - -3. If the Project Window ever gets closed, you can just enter > - :Project -< to bring it back again. (You don't need to give it the filename; the - plugin remembers.) - - If you have the 'm' flag set in g:proj_flags, then you get the Project - Window to show up again by pressing |CTRL-W_o|. This, of course, will - close any other windows that may be open that the cursor is not in. - -4. Adding files to a Project is very easy. To add, for example, the 'more.c' - file to the Project, just insert the filename in the Project Entry then - hit on it. - -5. When |quickfix| loads files, it is not equivalent to pressing on - a filename, so the directory will not be changed and the scripts will not - be run. (If I could make this otherwise, I would.) The solution is to use - the \L key to load all of the files in the Project before running - quickfix. - -6. If the Project window gets a bit cluttered with folds partially - open/closed, you can press |zM| to close everything and tidy it up. - -7. For advanced users, I am exporting the function Project_GetAllFnames() - which returns all the filenames within a fold and optionally all its - Subprojects. Also, I export Project_ForEach() for running a function for - each filename in the project. See the code for examples on how to use - these. Finally, I export Project_GetFname(line_number) so that you can - write your own mappings and get the filename for it. - -8. Some people have asked how to do a global mapping to take the cursor to - the Project window. One of my goals for the plugin is for it to be as - self-contained as possible, so I'm not going to add it by default. But you - can put this in your vimrc: -> - nmap P :Project - -< -9. You can put the . entry in a project, and it will launch the - |file-explorer| plugin on the directory. To avoid removal when you - refresh, make the entry look like this: -> - . # pragma keep -< -============================================================================== -THANKS - - The following people have sent me patches to help with the Project - Plugin development: - - Tomas Zellerin - Lawrence Kesteloot - Dave Eggum - A Harrison - Thomas Link - Richard Bair - Eric Arnold - Peter Jones - Eric Van Dewoestine - - - vim:ts=8 sw=8 noexpandtab tw=78 ft=help: diff --git a/.vim/doc/ps_color.txt b/.vim/doc/ps_color.txt deleted file mode 100644 index 158dd57..0000000 --- a/.vim/doc/ps_color.txt +++ /dev/null @@ -1,603 +0,0 @@ -*ps_color.txt* PSC For Vim version 7.0 Last change: 18 July 2006 - - -PERSONAL COLOUR SWITCHER *ps_colour* *pscolor* - - -Author: Pan, Shi Zhu. - -============================================================================== -CONTENTS *psc* *psc-contents* - - 1. Contents.....................|psc-contents| - 2. PSC Overview.................|psc-overview| - 3. PSC Installation.............|psc-usage| - 4. PSC Options..................|psc-options| - 5. PSC under color term ........|psc-cterm| - 6. PSC FAQ and Tips ............|psc-faq| - 7. PSC Release notes............|psc-release-notes| - 8. PSC Todo List................|psc-todo| - -For release notes, please see the header of ps_color.vim - -============================================================================== -PSC FEATURES OVERVIEW *psc-features* *psc-overview* - - Features ~ - - . PSC is firstly a color scheme which have both dark and light - background styles. - . It can have the same appearance in [cterm] as in [gui]. - . It is designed with gentle color to minimize fatigue of eye. - . It also works with other color schemes. - . Default foreground and background can easily be changed, it is more - configurable than most other color schemes - . Works with the optional tool reloaded.vim, can change the whole - color scheme in Hue,Saturation,Luminance color space. - - Design Concern ~ - - At the first glance this color scheme may look pretty 'dull', don't be - afraid, this is quite normal. Bear in mind that a text editor is not - a photo album, if a text editor looks exciting you may not be able to - stare at it for a long time. - - Predefined Vim Syntax highlighting can be too colorful or contrasty so - that many programmers prefer to switch off the syntax highlighting at - work. That is not a good idea because you will lost the advantages of - syntax high-lighting. It is often the case that we have to work for - 300+ minutes, then I decide to do-it-myself. - - Many user-defined color schemes in vim.sf.net tend to achieve low - contrast by having a strong color-cast, i.e. looks blueish or - yellowish or reddish. This does look comfortable at first, however, - any type of color-cast will cause the eyes less sensitive for - particular color after a long-time work session, and that's no good to - health. - - Efforts had been made to ensure no color-cast for this scheme, all - elementary colors like RGB and CYMK are evenly used. Like TeX, - 'consistency' is the principle this color scheme based on. Default - values which hurt consistency are amended according to the vim script - syntax/hitest.vim - - There are 3 parameters to describe a color: Hue, Saturation and - Brightness. In this color scheme, the saturation is low and the - brightness are designed to be very close to each other in order not to - fatigue our eyes after a whole day's programming work. - - Portability ~ - - Different monitor settings led to different look. In this color - scheme, it is assumed that the monitor adjust at 6500k color - temperature with a good gamma curve. If you have a 9300k monitor or - if the gamma curve is not optimal, the appearance may be less - comfortable, use adobe gamma loader or similar tools to adjust - your monitor if your monitor do not have the option to change color - temperature and/or gamma curve. - - Needless to say, VI is an editor originally designed to do edit tasks - in a text terminal, and VIM is an improved version of VI. Its a shame - that a color scheme cannot have a satisfactory appearance in cterm. - The cterm compatibility should be considered high priority when - designing ViM color scheme. - - I had made much attempt to make support for 8-color terminals, - however, 8 colors is not enough to represent a color scheme. Finally - I end up making the cterm support for 16-color terminal. Have to say - sorry if the color scheme sucks in your 8-color terminal, I had tried - my best. More details about cterm please see |psc-cterm|. - - *psc-about-background* - About the Background ~ - - We have talked about off-white backgrounds, any background which is - not black, grey or white should be changed constantly in order not to - make the eyes less sensitive to particular color. i.e. you can use - blue background on Monday, red background on Tuesday, green background - on Wednesday, but if you use blue background everyday, that's no good - to your health. - - Now we talk about the brightness of the background. Why dark - background is preferred over others? There are many reasons, such as, - the monitor emits lower radiation for black background. You may have - lots of similar reasons... - - But I'll talk about something you may not know: -> - It is easier to distinguish foreground colors on a dark background - than on a light background. - - At the same time, it is easier to distinguish background colors on - a light background than on a dark background. - - We will mainly change foreground colors for syntax highlighting. -< - Hence, we can reduce the contrast and saturation of the color in - a dark-background scheme, while retain the readability. Schemes with - white background usually comes with higher contrast and saturation. - This is probably the most important reason that the color scheme is - designed to be dark-background instead of light one. - - Now we came to know, that change the foreground color is enough to - emphasis text in a dark background, while for a white background, we - need to change the font shape (bold or italic, etc.), or change the - background color to effectively emphasis the text. This is probably - the reason Vim default scheme has bold properties for highlighting - groups, because the default scheme is a light background one. - - No one knows what color scheme is best for you, except yourself. Try! - -============================================================================== -PSC INSTALLATION *psc-usage* - - Step 1, Enable the color scheme ~ - - To use PSC is simple, just put ps_color.vim into your - [runtimepath]/colors and append the line > - - colorscheme ps_color -< - to your |.vimrc|. The [runtimepath] can be any directory listed in - |vimfiles|, normally your $HOME/.vim in Unix or $HOME/vimfiles in - Windows. - - Step 2, Install the help document ~ - - The help document will be automatically installed when the colorscheme - be sourced the first time. If it is not, type :colo ps_color now. - - After successfully installed the help document, you can use > - - :help psc-options -< - to go to the following section. - -============================================================================== -PSC OPTIONS *psc-options* - - You can let these options in your ~/.vimrc, most options works for - both GUI and cterm, only some of them do not work for both. - - Options set using the 'let' command must present [BEFORE] the color - scheme been sourced. - - *psc_style* - Style ~ -> - let psc_style='cool' - let psc_style='warm' - let psc_style='default' - let psc_style='defdark' -< - This selects between styles of colors, - The 'cool' is the default, dark background. - The 'warm' is the alternative, light background scheme. - - See |psc-about-background| for more knowledge about the background, - and the differences of two style. - - The 'default' and 'defdark' refers to Vim system default color scheme. - Which are provided only for reference. - - Let psc_style to any string other than the above 4 will switch to the - specified color scheme. For example, let psc_style='desert' and then - activate the ps_color, the color scheme will be chosen according to - desert.vim color scheme. - - *psc_cterm_style* - Color Term Style ~ -> - let psc_cterm_style='cool' -< - This is exactly the same to psc_style, except that it only affects the - console version of vim in a color terminal, the 'warm' is not - available for cterm. - By default, it will be set to the same value as 'psc_style'. You can - change it if you want different style in cterm from gui. - - - *psc_fontface* - Font face ~ -> - let psc_fontface='plain' - let psc_fontface='mixed' -< - The Vim default behavior is the 'mixed', however, the mixed font style - in a dark colorscheme is not optimal. This color uses 'plain' for - 'cool' style, i.e. No texts are bolded font. For 'warm', the default - is still 'mixed', If you want the mixed style in which the highlighted - statements are bolded font, choose this. If you want all texts be - bolded, choose 'plain' and specify a bolded guifont or terminal font. - - In GUI, this option also works for other color schemes. You can - disable the bold font and use your favorite color scheme. See - |psc-faq-ffothers| for detail. - - *psc_inversed_todo* - Inversed Todo ~ -> - let psc_inversed_todo=1 -< - When set to 1, the TODO group will be dark background with light font, - Otherwise, the TODO group have light background with dark foreground. - Default is 0. - - *psc_use_default_for_cterm* - Use default for cterm (obsoleted)~ - - This option is Obsoleted, retained only for backward compatibility, - see |psc_cterm_style| for alternative. - - *psc_statement_different_from_type* - Statement different from type ~ -> - let psc_statement_different_from_type=1 -< - The Statement-group and Type-group are easy to distinguish, different - color for them are not necessary, I use similar color for S-group - & T-group in order not to make the screen too 'colorful', also this - saves a color name for cterm. But if you do want the Statement & Type - to be different color, try 'let statement_different_from_type=1' in - your .vimrc file, which is available only for GUI. Since the color - names in cterm is limited to 16 we cannot have too many different - colors in cterm. - Default is 0, i.e. they have very similar color. - - *psc-change-background* - Changing the Background color ~ - - You may prefer a black background over the dark one, and it is - possible to customize it, this may make life more interesting. To do - this is quite straight forward for GUI, just define the Normal - highlight in your .gvimrc, [AFTER] the color scheme has been sourced. - - For example: -> - highlight Normal guibg=#000000 -< - The #103040 will give a taste similar to oceandeep, #152535 for - hhazure, #303030 for desert, #404040 for zenburn... Replace #103040 - with any color you like. You can do the same to guifg foreground if - you are careful enough, remember this is only possible for GUI. - - You can do this to the NonText group also, for example. -> - highlight NonText guibg=#202020 -< - will give you a taste similar to most color schemes on vim.sf.net, in - which the NonText has a different background than Normal text. - However, this is only useful in GUI, in cterm, there are only - 8 background colors, so it is wise not to have a different color. - - If you want more variations, please try the optional utility - reloaded.vim, this optional utility provides an amazing level of - customization. - - Quick switching between warm and cold styles ~ - - Here is an example to define hot key of different style switching, - note that I had only given this example without actually define it. - You can choose to define it in .vimrc or anyway you prefer. -> - nnoremap pc :let psc_style='cool':colo ps_color - nnoremap pw :let psc_style='warm':colo ps_color -< - Alternatively, you can use the capitalized :Colo command, like - :Colo cool or :Colo warm - -============================================================================== -PSC WITH CTERM *psc-cterm* - - Colour Term ~ - - The cterm color is designed mainly in these terminals: -> - 1. Cygwin bash shell in NT command prompt box - 2. XTERM and RXVT - 3. Other color terminals which have at least 16 colors -< - *psc-cterm-nt* - In Windows NT Prompt console you can change the exact value of each - color, so you can have the same color with your GUI version of Vim, - for 'cool' color style you just change the color according to the - |psc-cterm-color-table|, for how to redefine the color of Windows NT - prompt console please see Windows Help. - - NT Cygwin bash shell console supports 16 foreground colors by add bold - attribute to 8 color, the cterm=bold specifies which should be bright - color, so totally the 16 color foreground is available, but color - name DarkXXX and LightXXX are the same. - - The pre-configured Cygwin.lnk is available for download on my web page - for Vim, but the site seems down, and the my site would not be on - recently, you may need to change colors in the Properties menu... - - Cygwin is highly recommended for Vim user if you are using Windows NT - based systems (e.g. NT 4.0, Win2k, WinXP, Win2003, etc). But Cygwin is - not that versatile under Windows 95/98/ME. I'm not sure whether this - works for DOS DJGPP or Windows 95 console version of Vim because - I don't have the system, in case you encountered problem please - contact me, if you like. - - *psc-cterm-xterm* - XTERM is a much more feature-rich terminal than Windows Console so the - support is much better, add the following recommend line into your - .Xdefaults and you can achieve the same color as in GUI version. - - Add the following into your .Xdefaults: - This works for XTERM and RXVT. -> - XTerm*color0: #000000 - XTerm*color1: #800000 - XTerm*color2: #008000 - XTerm*color3: #d0d090 - XTerm*color4: #000080 - XTerm*color5: #800080 - XTerm*color6: #a6caf0 - XTerm*color7: #d0d0d0 - XTerm*color8: #b0b0b0 - XTerm*color9: #f08060 - XTerm*color10: #60f080 - XTerm*color11: #e0c060 - XTerm*color12: #80c0e0 - XTerm*color13: #f0c0f0 - XTerm*color14: #c0d8f8 - XTerm*color15: #e0e0e0 - XTerm*cursorColor: #00f000 - - ! The following are recommended but optional - XTerm*reverseVideo: False - XTerm*background: #000000 - XTerm*foreground: #d0d0d0 - XTerm*boldMode: False -< - There is an assumption that your RXVT or XTERM supports 16 colors, - most RXVTs and XTERMs support this, if yours do not, get a source of - RXVT and recompile it. - - Sometimes the color mode are not recognized well, or you do not want - bright foreground be bolded. If this is the case, add the following in - your .vimrc (before the color scheme been sourced) -> - if &term=='xterm' " Change 'xterm' to your term name if necessary - set t_Co=16 - endif -< - If the t_Co=16 have problem, set t_Co=8 and :colo ps_color again. - vice versa. - - My rxvt works well with t_Co=16: > - Rxvt v2.7.10 - released: 26 MARCH 2003 - Options: - XPM,transparent,utmp,menubar,frills,linespace,multichar_languages, - scrollbars=rxvt+NeXT+xterm,.Xdefaults -< But I've know that my rxvt v2.6.4 in another machine has problem with - t_Co=16, if that is the case, set t_Co=8 instead. - - *psc-cterm-others* - For other terminals, you can manually set the color according to the - following table - - Hints for Manually set the color (for 'cool' style only): - *psc-cterm-color-table* - Color name Hex value Decimal value ~ - 0 Black = #000000 0,0,0 - 4 DarkBlue = #000080 0,0,128 - 2 DarkGreen = #008000 0,128,0 - 6 DarkCyan = #a6caf0 166,202,240 - 1 DarkRed = #800000 128,0,0 - 5 DarkMagenta = #800080 128,0,128 - 3 DarkYellow = #d0d090 208,208,144 - 7 Grey = #d0d0d0 208,208,208 - 8 DarkGrey = #b0b0b0 176,176,176 - 12 Blue = #80c0e0 128,192,224 - 10 Green = #60f080 96,240,128 - 14 Cyan = #c0d8f8 192,216,248 - 9 Red = #f08060 240,128,96 - 13 LMag. = #f0c0f0 240,192,240 - 11 Yellow = #e0c060 224,192,96 - 15 White = #e0e0e0 224,224,224 - - *psc-cterm-incompatible* - If your color terminal does only have 8 colors and cannot achieve 16 - colors with cterm=bold, you may want to switch to other color schemes - to gain more readability. Anyway, you can specify in your .vimrc to - use different color scheme under different consoles and GUI. - For example: -> - let psc_cterm_style = 'foobarcolor' - let psc_style = 'cool' - colo ps_color -< - The 'foobarcolor' means the color scheme you want to choose, such as - 'desert', I recommend to try vim default schemes 'default' and - 'defdark' before experience others. - -============================================================================== -PSC FAQ AND TIPS *psc-faq* *psc-tips* -> - Q: What is meant by `PS' ? -< - A: PS means: PostScript, PhotoShop, PerSonal, ... or anything you can - imagine and anything you want it do be. -> - Q: How to obtain the same appreance as gui in color term? -< - A: This need some work around, see |psc-cterm| for details. - Generally speaking, you should ensure your color term has support - for 16 foreground colors, and each color is customizable. - - *psc-faq-ffothers* > - Q: How to use psc_fontface with other colorschemes? -< - A: Make sure you had sourced :colo ps_color in your .vimrc, then you - can use the Capitalized :Colo instead of :colo - e.g. you want to use 'murphy', just type :Colo murphy after you - sourced the ps_color, the 'defdark', 'cool', 'warm' can also be - used here. -> - Q: I updated from v2.0 to v2.3 or above, why the cterm color scheme - for Comment is different? -< - A: The color map of DarkYellow and Yellow have been exchanged, - You need to reconfigure your terminal to meet the change, - see |psc-cterm-color-table| for guide, or if you are using xterm - compatible terminal, just update the .XDefaults according to - |psc-cterm-xterm|. -> - Q: What do you mean by 'Vanilla Windows'? -< - A: People often argue that Windows is not a REAL operating system. - Well, I agree this, but only for vanilla windows. i.e. with no - plug-ins installed. Vanilla windows is a very limited platform, - since it is not POSIX compliant. - - There are currently many working around to make Windows POSIX - Compliant, do you still mind which OS to use when it is POSIX - Compliant? I don't. If you installed Cygwin kernel in your - NT-based Windows, the Windows will be more or less POSIX compliant - and you can use it in the same way as you use any Unix, BSD, - Solaris, Linux, XWindow, etc... What is more, Cygwin is not the - only kernel which makes Windows POSIX Compliant, make a google - search and you will find many alternatives. -> - Q: How to change the Normal background color? Why don't you use - different background for NonText group? -< - A: This is for compatibility, since we have to use only 8 colors as - background in a color terminal. For GUI you can change this, see - |psc-change-background| for details. -> - Q: I updated from 2.81- to 2.82+, why the default background changed? -< - A: This is for Bram's guideline, that dark schemes with black - background has too much contrast. - - However, you can change it back. see |psc-change-background| for - details. - -============================================================================== -PSC RELEASE NOTES *psc-release-notes* - - 2.90 Release Note: ~ - - Upon the release of Vim 7, many new highlight groups have been added. - - A style has been tuned a little to increase contrast. - - - 2.83 Release Note: ~ - - This is an identical version, but my e-mail address changed. - - - 2.82 Release Note: ~ - - Fixed bug with the reversed group for the Vim default, or other - schemes. - - Fixed bug with the Diff mode fg mistaken as fg. - - Shrink the script a lot to improve load performance, moved the release - notes into document. - - Change the default gui background color to #202020 (Dark Grey) - - - 2.81 Release Note: ~ - - Provided a separate utility reloaded.vim to fine tune the GUI color - scheme based on Hue, Saturation and Brightness(Luminance). - - Added some groups to meet the need of reloaded.vim, no essential - change. - - 2.8 Release Note: ~ - - Bugfix : when psc_style=='mixed', the visual got reversed wrong. - - 'mixed' is now the default for 'warm' style. - - changed the function name to lower case. - - removed pre-2.0 compatibility, (the non-psc version of s-d-f-t). - - Added variable psc_cterm_style, see |psc_cterm_style| - - Added group Underline - - Tuned the function call. - - 2.7 Release Note: ~ - - Now it is possible to change the Background, - see :h psc-change-background for details. - - Linked the Tag group to Identifier. - - NonText as Notice is not good for 'warm', changed to Constant. - - Added links for the most popular plugins: taglist, calendar - - Tuned the 'Statement' color when different from Type (gui only). - - Re-adjusted cterm scheme according to syntax/hitest.vim - - The 'defdark' style for cterm is not functioning, fixed. - - Many 'cosmetic' changes, makes no difference for functionality. - - Use of DrChip's help extractor to auto-install help document. - - Added command define, :Colo - - 2.6 Release Note: ~ - - As stated in the v2.3, the only 'todo' thing seems to be the 'warm' - style, now in this version I had been working on it. - - There also are some minor fixes for the document, to be more friendly - for new readers. - - The 'StatusLine' of 'cold' style is modified by mistake in the v2.3, - this time the bug is fixed. - - The 'Directory' in GUI 'cold' style is different from 'cterm' one, - now fixed. - - 2.3 Release Note: ~ - - This is an incompatible update, main changes are in 'cterm'. - A new group 'SignColumn' had been added, new links added for engspchk - v52, hundreds of typos fixed in the document, thanks to the engspchk. - - The support for 8-color cterm is slightly better now, but the mappings - of the DarkYellow and Yellow are exchanged, you need to update the - .Xdefaults or your terminal configuration before apply this update if - you are using v2.0. Guide for redefinition the color value is - available in the document, make sure you had updated the ps_color.txt, - then see |psc-cterm-color-table| - - 2.0 Release Note: ~ - - There've been great enhancement since this version, so I'd choose to - bump the version number to 2. This version comes with Vim online help, - if you had installed ps_color.txt, you can see for details in - |pscolor| - - n/a Release: ~ - - Initial upload, can be called as v1.8 - - -============================================================================== -PSC TODO LIST *psc-todo* - - . Fix the remain bugs. - . Follow the new Vim versions for new added highlighting group - . This cannot work in Vim Tiny mode, and will never work! - -============================================================================== - -vim:tw=78:ts=8:noet:ft=help:fo+=t:norl:noet: diff --git a/.vim/doc/snipMate.txt b/.vim/doc/snipMate.txt deleted file mode 100644 index 704d44a..0000000 --- a/.vim/doc/snipMate.txt +++ /dev/null @@ -1,286 +0,0 @@ -*snipMate.txt* Plugin for using TextMate-style snippets in Vim. - -snipMate *snippet* *snippets* *snipMate* -Last Change: July 13, 2009 - -|snipMate-description| Description -|snipMate-syntax| Snippet syntax -|snipMate-usage| Usage -|snipMate-settings| Settings -|snipMate-features| Features -|snipMate-disadvantages| Disadvantages to TextMate -|snipMate-contact| Contact - -For Vim version 7.0 or later. -This plugin only works if 'compatible' is not set. -{Vi does not have any of these features.} - -============================================================================== -DESCRIPTION *snipMate-description* - -snipMate.vim implements some of TextMate's snippets features in Vim. A -snippet is a piece of often-typed text that you can insert into your -document using a trigger word followed by a . - -For instance, in a C file using the default installation of snipMate.vim, if -you type "for" in insert mode, it will expand a typical for loop in C: > - - for (i = 0; i < count; i++) { - - } - - -To go to the next item in the loop, simply over to it; if there is -repeated code, such as the "i" variable in this example, you can simply -start typing once it's highlighted and all the matches specified in the -snippet will be updated. To go in reverse, use . - -============================================================================== -SYNTAX *snippet-syntax* - -Snippets can be defined in two ways. They can be in their own file, named -after their trigger in 'snippets//.snippet', or they can be -defined together in a 'snippets/.snippets' file. Note that dotted -'filetype' syntax is supported -- e.g., you can use > - - :set ft=html.eruby - -to activate snippets for both HTML and eRuby for the current file. - -The syntax for snippets in *.snippets files is the following: > - - snippet trigger - expanded text - more expanded text - -Note that the first hard tab after the snippet trigger is required, and not -expanded in the actual snippet. The syntax for *.snippet files is the same, -only without the trigger declaration and starting indentation. - -Also note that snippets must be defined using hard tabs. They can be expanded -to spaces later if desired (see |snipMate-indenting|). - -"#" is used as a line-comment character in *.snippets files; however, they can -only be used outside of a snippet declaration. E.g.: > - - # this is a correct comment - snippet trigger - expanded text - snippet another_trigger - # this isn't a comment! - expanded text -< -This should hopefully be obvious with the included syntax highlighting. - - *snipMate-${#}* -Tab stops ~ - -By default, the cursor is placed at the end of a snippet. To specify where the -cursor is to be placed next, use "${#}", where the # is the number of the tab -stop. E.g., to place the cursor first on the id of a
tag, and then allow -the user to press to go to the middle of it: - > - snippet div -
- ${2} -
-< - *snipMate-placeholders* *snipMate-${#:}* *snipMate-$#* -Placeholders ~ - -Placeholder text can be supplied using "${#:text}", where # is the number of -the tab stop. This text then can be copied throughout the snippet using "$#", -given # is the same number as used before. So, to make a C for loop: > - - snippet for - for (${2:i}; $2 < ${1:count}; $1++) { - ${4} - } - -This will cause "count" to first be selected and change if the user starts -typing. When is pressed, the "i" in ${2}'s position will be selected; -all $2 variables will default to "i" and automatically be updated if the user -starts typing. -NOTE: "$#" syntax is used only for variables, not for tab stops as in TextMate. - -Variables within variables are also possible. For instance: > - - snippet opt - - -Will, as usual, cause "option" to first be selected and update all the $1 -variables if the user starts typing. Since one of these variables is inside of -${2}, this text will then be used as a placeholder for the next tab stop, -allowing the user to change it if he wishes. - -To copy a value throughout a snippet without supplying default text, simply -use the "${#:}" construct without the text; e.g.: > - - snippet foo - ${1:}bar$1 -< *snipMate-commands* -Interpolated Vim Script ~ - -Snippets can also contain Vim script commands that are executed (via |eval()|) -when the snippet is inserted. Commands are given inside backticks (`...`); for -TextMates's functionality, use the |system()| function. E.g.: > - - snippet date - `system("date +%Y-%m-%d")` - -will insert the current date, assuming you are on a Unix system. Note that you -can also (and should) use |strftime()| for this example. - -Filename([{expr}] [, {defaultText}]) *snipMate-filename* *Filename()* - -Since the current filename is used often in snippets, a default function -has been defined for it in snipMate.vim, appropriately called Filename(). - -With no arguments, the default filename without an extension is returned; -the first argument specifies what to place before or after the filename, -and the second argument supplies the default text to be used if the file -has not been named. "$1" in the first argument is replaced with the filename; -if you only want the filename to be returned, the first argument can be left -blank. Examples: > - - snippet filename - `Filename()` - snippet filename_with_default - `Filename('', 'name')` - snippet filename_foo - `filename('$1_foo')` - -The first example returns the filename if it the file has been named, and an -empty string if it hasn't. The second returns the filename if it's been named, -and "name" if it hasn't. The third returns the filename followed by "_foo" if -it has been named, and an empty string if it hasn't. - - *multi_snip* -To specify that a snippet can have multiple matches in a *.snippets file, use -this syntax: > - - snippet trigger A description of snippet #1 - expand this text - snippet trigger A description of snippet #2 - expand THIS text! - -In this example, when "trigger" is typed, a numbered menu containing all -of the descriptions of the "trigger" will be shown; when the user presses the -corresponding number, that snippet will then be expanded. - -To create a snippet with multiple matches using *.snippet files, -simply place all the snippets in a subdirectory with the trigger name: -'snippets///.snippet'. - -============================================================================== -USAGE *snipMate-usage* - - *'snippets'* *g:snippets_dir* -Snippets are by default looked for any 'snippets' directory in your -'runtimepath'. Typically, it is located at '~/.vim/snippets/' on *nix or -'$HOME\vimfiles\snippets\' on Windows. To change that location or add another -one, change the g:snippets_dir variable in your |.vimrc| to your preferred -directory, or use the |ExtractSnips()|function. This will be used by the -|globpath()| function, and so accepts the same syntax as it (e.g., -comma-separated paths). - -ExtractSnipsFile({directory}, {filetype}) *ExtractSnipsFile()* *.snippets* - -ExtractSnipsFile() extracts the specified *.snippets file for the given -filetype. A .snippets file contains multiple snippet declarations for the -filetype. It is further explained above, in |snippet-syntax|. - -ExtractSnips({directory}, {filetype}) *ExtractSnips()* *.snippet* - -ExtractSnips() extracts *.snippet files from the specified directory and -defines them as snippets for the given filetype. The directory tree should -look like this: 'snippets//.snippet'. If the snippet has -multiple matches, it should look like this: -'snippets///.snippet' (see |multi_snip|). - - *ResetSnippets()* -The ResetSnippets() function removes all snippets from memory. This is useful -to put at the top of a snippet setup file for if you would like to |:source| -it multiple times. - - *list-snippets* *i_CTRL-R_* -If you would like to see what snippets are available, simply type -in the current buffer to show a list via |popupmenu-completion|. - -============================================================================== -SETTINGS *snipMate-settings* *g:snips_author* - -The g:snips_author string (similar to $TM_FULLNAME in TextMate) should be set -to your name; it can then be used in snippets to automatically add it. E.g.: > - - let g:snips_author = 'Hubert Farnsworth' - snippet name - `g:snips_author` -< - *snipMate-expandtab* *snipMate-indenting* -If you would like your snippets to be expanded using spaces instead of tabs, -just enable 'expandtab' and set 'softtabstop' to your preferred amount of -spaces. If 'softtabstop' is not set, 'shiftwidth' is used instead. - - *snipMate-remap* -snipMate does not come with a setting to customize the trigger key, but you -can remap it easily in the two lines it's defined in the 'after' directory -under 'plugin/snipMate.vim'. For instance, to change the trigger key -to CTRL-J, just change this: > - - ino =TriggerSnippet() - snor i=TriggerSnippet() - -to this: > - ino =TriggerSnippet() - snor i=TriggerSnippet() - -============================================================================== -FEATURES *snipMate-features* - -snipMate.vim has the following features among others: - - The syntax of snippets is very similar to TextMate's, allowing - easy conversion. - - The position of the snippet is kept transparently (i.e. it does not use - markers/placeholders written to the buffer), which allows you to escape - out of an incomplete snippet, something particularly useful in Vim. - - Variables in snippets are updated as-you-type. - - Snippets can have multiple matches. - - Snippets can be out of order. For instance, in a do...while loop, the - condition can be added before the code. - - [New] File-based snippets are supported. - - [New] Triggers after non-word delimiters are expanded, e.g. "foo" - in "bar.foo". - - [New] can now be used to jump tab stops in reverse order. - -============================================================================== -DISADVANTAGES *snipMate-disadvantages* - -snipMate.vim currently has the following disadvantages to TextMate's snippets: - - There is no $0; the order of tab stops must be explicitly stated. - - Placeholders within placeholders are not possible. E.g.: > - - '${3}
' -< - In TextMate this would first highlight ' id="some_id"', and if - you hit delete it would automatically skip ${2} and go to ${3} - on the next , but if you didn't delete it it would highlight - "some_id" first. You cannot do this in snipMate.vim. - - Regex cannot be performed on variables, such as "${1/.*/\U&}" - - Placeholders cannot span multiple lines. - - Activating snippets in different scopes of the same file is - not possible. - -Perhaps some of these features will be added in a later release. - -============================================================================== -CONTACT *snipMate-contact* *snipMate-author* - -To contact the author (Michael Sanders), please email: - msanders42+snipmate gmail com - -I greatly appreciate any suggestions or improvements offered for the script. - -============================================================================== - -vim:tw=78:ts=8:ft=help:norl: diff --git a/.vim/doc/tags b/.vim/doc/tags deleted file mode 100644 index 5ee54bc..0000000 --- a/.vim/doc/tags +++ /dev/null @@ -1,354 +0,0 @@ -'NERDChristmasTree' NERD_tree.txt /*'NERDChristmasTree'* -'NERDTreeAutoCenter' NERD_tree.txt /*'NERDTreeAutoCenter'* -'NERDTreeAutoCenterThreshold' NERD_tree.txt /*'NERDTreeAutoCenterThreshold'* -'NERDTreeBookmarksFile' NERD_tree.txt /*'NERDTreeBookmarksFile'* -'NERDTreeCaseSensitiveSort' NERD_tree.txt /*'NERDTreeCaseSensitiveSort'* -'NERDTreeChDirMode' NERD_tree.txt /*'NERDTreeChDirMode'* -'NERDTreeHighlightCursorline' NERD_tree.txt /*'NERDTreeHighlightCursorline'* -'NERDTreeHijackNetrw' NERD_tree.txt /*'NERDTreeHijackNetrw'* -'NERDTreeIgnore' NERD_tree.txt /*'NERDTreeIgnore'* -'NERDTreeMouseMode' NERD_tree.txt /*'NERDTreeMouseMode'* -'NERDTreeQuitOnOpen' NERD_tree.txt /*'NERDTreeQuitOnOpen'* -'NERDTreeShowBookmarks' NERD_tree.txt /*'NERDTreeShowBookmarks'* -'NERDTreeShowFiles' NERD_tree.txt /*'NERDTreeShowFiles'* -'NERDTreeShowHidden' NERD_tree.txt /*'NERDTreeShowHidden'* -'NERDTreeShowLineNumbers' NERD_tree.txt /*'NERDTreeShowLineNumbers'* -'NERDTreeSortOrder' NERD_tree.txt /*'NERDTreeSortOrder'* -'NERDTreeStatusline' NERD_tree.txt /*'NERDTreeStatusline'* -'NERDTreeWinPos' NERD_tree.txt /*'NERDTreeWinPos'* -'NERDTreeWinSize' NERD_tree.txt /*'NERDTreeWinSize'* -'loaded_nerd_tree' NERD_tree.txt /*'loaded_nerd_tree'* -'snippets' snipMate.txt /*'snippets'* -.snippet snipMate.txt /*.snippet* -.snippets snipMate.txt /*.snippets* -:BuildMethods cocoa.txt /*:BuildMethods* -:CVSEdit vcscommand.txt /*:CVSEdit* -:CVSEditors vcscommand.txt /*:CVSEditors* -:CVSUnedit vcscommand.txt /*:CVSUnedit* -:CVSWatch vcscommand.txt /*:CVSWatch* -:CVSWatchAdd vcscommand.txt /*:CVSWatchAdd* -:CVSWatchOff vcscommand.txt /*:CVSWatchOff* -:CVSWatchOn vcscommand.txt /*:CVSWatchOn* -:CVSWatchRemove vcscommand.txt /*:CVSWatchRemove* -:CVSWatchers vcscommand.txt /*:CVSWatchers* -:ListMethods cocoa.txt /*:ListMethods* -:MatchDebug matchit.txt /*:MatchDebug* -:NERDTree NERD_tree.txt /*:NERDTree* -:NERDTreeClose NERD_tree.txt /*:NERDTreeClose* -:NERDTreeFromBookmark NERD_tree.txt /*:NERDTreeFromBookmark* -:NERDTreeMirror NERD_tree.txt /*:NERDTreeMirror* -:NERDTreeToggle NERD_tree.txt /*:NERDTreeToggle* -:VCSAdd vcscommand.txt /*:VCSAdd* -:VCSAnnotate vcscommand.txt /*:VCSAnnotate* -:VCSBlame vcscommand.txt /*:VCSBlame* -:VCSCommit vcscommand.txt /*:VCSCommit* -:VCSDelete vcscommand.txt /*:VCSDelete* -:VCSDiff vcscommand.txt /*:VCSDiff* -:VCSGotoOriginal vcscommand.txt /*:VCSGotoOriginal* -:VCSInfo vcscommand.txt /*:VCSInfo* -:VCSLock vcscommand.txt /*:VCSLock* -:VCSLog vcscommand.txt /*:VCSLog* -:VCSRemove vcscommand.txt /*:VCSRemove* -:VCSRevert vcscommand.txt /*:VCSRevert* -:VCSReview vcscommand.txt /*:VCSReview* -:VCSStatus vcscommand.txt /*:VCSStatus* -:VCSUnlock vcscommand.txt /*:VCSUnlock* -:VCSUpdate vcscommand.txt /*:VCSUpdate* -:VCSVimDiff vcscommand.txt /*:VCSVimDiff* -ExtractSnips() snipMate.txt /*ExtractSnips()* -ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()* -Filename() snipMate.txt /*Filename()* -MatchError matchit.txt /*MatchError* -NERDTree NERD_tree.txt /*NERDTree* -NERDTree-! NERD_tree.txt /*NERDTree-!* -NERDTree-? NERD_tree.txt /*NERDTree-?* -NERDTree-B NERD_tree.txt /*NERDTree-B* -NERDTree-C NERD_tree.txt /*NERDTree-C* -NERDTree-D NERD_tree.txt /*NERDTree-D* -NERDTree-F NERD_tree.txt /*NERDTree-F* -NERDTree-I NERD_tree.txt /*NERDTree-I* -NERDTree-J NERD_tree.txt /*NERDTree-J* -NERDTree-K NERD_tree.txt /*NERDTree-K* -NERDTree-O NERD_tree.txt /*NERDTree-O* -NERDTree-P NERD_tree.txt /*NERDTree-P* -NERDTree-R NERD_tree.txt /*NERDTree-R* -NERDTree-T NERD_tree.txt /*NERDTree-T* -NERDTree-U NERD_tree.txt /*NERDTree-U* -NERDTree-X NERD_tree.txt /*NERDTree-X* -NERDTree-c-j NERD_tree.txt /*NERDTree-c-j* -NERDTree-c-k NERD_tree.txt /*NERDTree-c-k* -NERDTree-contents NERD_tree.txt /*NERDTree-contents* -NERDTree-e NERD_tree.txt /*NERDTree-e* -NERDTree-f NERD_tree.txt /*NERDTree-f* -NERDTree-gi NERD_tree.txt /*NERDTree-gi* -NERDTree-go NERD_tree.txt /*NERDTree-go* -NERDTree-gs NERD_tree.txt /*NERDTree-gs* -NERDTree-i NERD_tree.txt /*NERDTree-i* -NERDTree-m NERD_tree.txt /*NERDTree-m* -NERDTree-o NERD_tree.txt /*NERDTree-o* -NERDTree-p NERD_tree.txt /*NERDTree-p* -NERDTree-q NERD_tree.txt /*NERDTree-q* -NERDTree-r NERD_tree.txt /*NERDTree-r* -NERDTree-s NERD_tree.txt /*NERDTree-s* -NERDTree-t NERD_tree.txt /*NERDTree-t* -NERDTree-u NERD_tree.txt /*NERDTree-u* -NERDTree-x NERD_tree.txt /*NERDTree-x* -NERDTreeAbout NERD_tree.txt /*NERDTreeAbout* -NERDTreeBookmarkCommands NERD_tree.txt /*NERDTreeBookmarkCommands* -NERDTreeBookmarkTable NERD_tree.txt /*NERDTreeBookmarkTable* -NERDTreeBookmarks NERD_tree.txt /*NERDTreeBookmarks* -NERDTreeChangelog NERD_tree.txt /*NERDTreeChangelog* -NERDTreeCredits NERD_tree.txt /*NERDTreeCredits* -NERDTreeFilesysMenu NERD_tree.txt /*NERDTreeFilesysMenu* -NERDTreeFunctionality NERD_tree.txt /*NERDTreeFunctionality* -NERDTreeGlobalCommands NERD_tree.txt /*NERDTreeGlobalCommands* -NERDTreeHacking NERD_tree.txt /*NERDTreeHacking* -NERDTreeInvalidBookmarks NERD_tree.txt /*NERDTreeInvalidBookmarks* -NERDTreeLicense NERD_tree.txt /*NERDTreeLicense* -NERDTreeMappings NERD_tree.txt /*NERDTreeMappings* -NERDTreeOptionDetails NERD_tree.txt /*NERDTreeOptionDetails* -NERDTreeOptionSummary NERD_tree.txt /*NERDTreeOptionSummary* -NERDTreeOptions NERD_tree.txt /*NERDTreeOptions* -NERD_tree.txt NERD_tree.txt /*NERD_tree.txt* -ResetSnippets() snipMate.txt /*ResetSnippets()* -VCSCommandCVSDiffOpt vcscommand.txt /*VCSCommandCVSDiffOpt* -VCSCommandCVSExec vcscommand.txt /*VCSCommandCVSExec* -VCSCommandCommitOnWrite vcscommand.txt /*VCSCommandCommitOnWrite* -VCSCommandDeleteOnHide vcscommand.txt /*VCSCommandDeleteOnHide* -VCSCommandDiffSplit vcscommand.txt /*VCSCommandDiffSplit* -VCSCommandDisableAll vcscommand.txt /*VCSCommandDisableAll* -VCSCommandDisableExtensionMappings vcscommand.txt /*VCSCommandDisableExtensionMappings* -VCSCommandDisableMappings vcscommand.txt /*VCSCommandDisableMappings* -VCSCommandEdit vcscommand.txt /*VCSCommandEdit* -VCSCommandEnableBufferSetup vcscommand.txt /*VCSCommandEnableBufferSetup* -VCSCommandMapPrefix vcscommand.txt /*VCSCommandMapPrefix* -VCSCommandMappings vcscommand.txt /*VCSCommandMappings* -VCSCommandResultBufferNameExtension vcscommand.txt /*VCSCommandResultBufferNameExtension* -VCSCommandResultBufferNameFunction vcscommand.txt /*VCSCommandResultBufferNameFunction* -VCSCommandSVKExec vcscommand.txt /*VCSCommandSVKExec* -VCSCommandSVNDiffExt vcscommand.txt /*VCSCommandSVNDiffExt* -VCSCommandSVNDiffOpt vcscommand.txt /*VCSCommandSVNDiffOpt* -VCSCommandSVNExec vcscommand.txt /*VCSCommandSVNExec* -VCSCommandSplit vcscommand.txt /*VCSCommandSplit* -VCSCommandVCSTypeOverride vcscommand.txt /*VCSCommandVCSTypeOverride* -[% matchit.txt /*[%* -]% matchit.txt /*]%* -b:VCSCommandCommand vcscommand.txt /*b:VCSCommandCommand* -b:VCSCommandOriginalBuffer vcscommand.txt /*b:VCSCommandOriginalBuffer* -b:VCSCommandSourceFile vcscommand.txt /*b:VCSCommandSourceFile* -b:VCSCommandVCSType vcscommand.txt /*b:VCSCommandVCSType* -b:match_col matchit.txt /*b:match_col* -b:match_debug matchit.txt /*b:match_debug* -b:match_ignorecase matchit.txt /*b:match_ignorecase* -b:match_ini matchit.txt /*b:match_ini* -b:match_iniBR matchit.txt /*b:match_iniBR* -b:match_match matchit.txt /*b:match_match* -b:match_pat matchit.txt /*b:match_pat* -b:match_skip matchit.txt /*b:match_skip* -b:match_table matchit.txt /*b:match_table* -b:match_tail matchit.txt /*b:match_tail* -b:match_wholeBR matchit.txt /*b:match_wholeBR* -b:match_word matchit.txt /*b:match_word* -b:match_words matchit.txt /*b:match_words* -bufexplorer bufexplorer.txt /*bufexplorer* -bufexplorer-changelog bufexplorer.txt /*bufexplorer-changelog* -bufexplorer-credits bufexplorer.txt /*bufexplorer-credits* -bufexplorer-customization bufexplorer.txt /*bufexplorer-customization* -bufexplorer-installation bufexplorer.txt /*bufexplorer-installation* -bufexplorer-todo bufexplorer.txt /*bufexplorer-todo* -bufexplorer-usage bufexplorer.txt /*bufexplorer-usage* -bufexplorer.txt bufexplorer.txt /*bufexplorer.txt* -buffer-explorer bufexplorer.txt /*buffer-explorer* -cocoa cocoa.txt /*cocoa* -cocoa-author cocoa.txt /*cocoa-author* -cocoa-commands cocoa.txt /*cocoa-commands* -cocoa-completion cocoa.txt /*cocoa-completion* -cocoa-contact cocoa.txt /*cocoa-contact* -cocoa-features cocoa.txt /*cocoa-features* -cocoa-installation cocoa.txt /*cocoa-installation* -cocoa-intro cocoa.txt /*cocoa-intro* -cocoa-license cocoa.txt /*cocoa-license* -cocoa-mappings cocoa.txt /*cocoa-mappings* -cocoa-suggested-plugins cocoa.txt /*cocoa-suggested-plugins* -cocoa.txt cocoa.txt /*cocoa.txt* -cs surround.txt /*cs* -cvscommand-changes vcscommand.txt /*cvscommand-changes* -drawit DrawIt.txt /*drawit* -drawit-a DrawIt.txt /*drawit-a* -drawit-b DrawIt.txt /*drawit-b* -drawit-brush DrawIt.txt /*drawit-brush* -drawit-c DrawIt.txt /*drawit-c* -drawit-contents DrawIt.txt /*drawit-contents* -drawit-drawing DrawIt.txt /*drawit-drawing* -drawit-e DrawIt.txt /*drawit-e* -drawit-erase DrawIt.txt /*drawit-erase* -drawit-example DrawIt.txt /*drawit-example* -drawit-f DrawIt.txt /*drawit-f* -drawit-history DrawIt.txt /*drawit-history* -drawit-l DrawIt.txt /*drawit-l* -drawit-manual DrawIt.txt /*drawit-manual* -drawit-modes DrawIt.txt /*drawit-modes* -drawit-move DrawIt.txt /*drawit-move* -drawit-moving DrawIt.txt /*drawit-moving* -drawit-options DrawIt.txt /*drawit-options* -drawit-protect DrawIt.txt /*drawit-protect* -drawit-s DrawIt.txt /*drawit-s* -drawit-setbrush DrawIt.txt /*drawit-setbrush* -drawit-setdrawit DrawIt.txt /*drawit-setdrawit* -drawit-start DrawIt.txt /*drawit-start* -drawit-stop DrawIt.txt /*drawit-stop* -drawit-usage DrawIt.txt /*drawit-usage* -drawit-visblock DrawIt.txt /*drawit-visblock* -drawit.txt DrawIt.txt /*drawit.txt* -ds surround.txt /*ds* -g% matchit.txt /*g%* -g:bufExplorerDefaultHelp bufexplorer.txt /*g:bufExplorerDefaultHelp* -g:bufExplorerDetailedHelp bufexplorer.txt /*g:bufExplorerDetailedHelp* -g:bufExplorerFindActive bufexplorer.txt /*g:bufExplorerFindActive* -g:bufExplorerReverseSort bufexplorer.txt /*g:bufExplorerReverseSort* -g:bufExplorerShowDirectories bufexplorer.txt /*g:bufExplorerShowDirectories* -g:bufExplorerShowRelativePath bufexplorer.txt /*g:bufExplorerShowRelativePath* -g:bufExplorerShowUnlisted bufexplorer.txt /*g:bufExplorerShowUnlisted* -g:bufExplorerSortBy bufexplorer.txt /*g:bufExplorerSortBy* -g:bufExplorerSplitBelow bufexplorer.txt /*g:bufExplorerSplitBelow* -g:bufExplorerSplitOutPathName bufexplorer.txt /*g:bufExplorerSplitOutPathName* -g:bufExplorerSplitRight bufexplorer.txt /*g:bufExplorerSplitRight* -g:drawit_insertmode DrawIt.txt /*g:drawit_insertmode* -g:objc_man_key cocoa.txt /*g:objc_man_key* -g:snippets_dir snipMate.txt /*g:snippets_dir* -g:snips_author snipMate.txt /*g:snips_author* -i_CTRL-G_S surround.txt /*i_CTRL-G_S* -i_CTRL-G_s surround.txt /*i_CTRL-G_s* -i_CTRL-R_ snipMate.txt /*i_CTRL-R_* -leopard-security-alert cocoa.txt /*leopard-security-alert* -list-snippets snipMate.txt /*list-snippets* -matchit matchit.txt /*matchit* -matchit-% matchit.txt /*matchit-%* -matchit-\1 matchit.txt /*matchit-\\1* -matchit-activate matchit.txt /*matchit-activate* -matchit-backref matchit.txt /*matchit-backref* -matchit-bugs matchit.txt /*matchit-bugs* -matchit-choose matchit.txt /*matchit-choose* -matchit-configure matchit.txt /*matchit-configure* -matchit-debug matchit.txt /*matchit-debug* -matchit-details matchit.txt /*matchit-details* -matchit-highlight matchit.txt /*matchit-highlight* -matchit-hl matchit.txt /*matchit-hl* -matchit-intro matchit.txt /*matchit-intro* -matchit-languages matchit.txt /*matchit-languages* -matchit-modes matchit.txt /*matchit-modes* -matchit-newlang matchit.txt /*matchit-newlang* -matchit-o_% matchit.txt /*matchit-o_%* -matchit-parse matchit.txt /*matchit-parse* -matchit-s:notend matchit.txt /*matchit-s:notend* -matchit-s:sol matchit.txt /*matchit-s:sol* -matchit-spaces matchit.txt /*matchit-spaces* -matchit-troubleshoot matchit.txt /*matchit-troubleshoot* -matchit-v_% matchit.txt /*matchit-v_%* -matchit.txt matchit.txt /*matchit.txt* -matchit.vim matchit.txt /*matchit.vim* -multi_snip snipMate.txt /*multi_snip* -o_[% matchit.txt /*o_[%* -o_]% matchit.txt /*o_]%* -o_g% matchit.txt /*o_g%* -project project.txt /*project* -project-adding-mappings project.txt /*project-adding-mappings* -project-example project.txt /*project-example* -project-flags project.txt /*project-flags* -project-inheritance project.txt /*project-inheritance* -project-invoking project.txt /*project-invoking* -project-mappings project.txt /*project-mappings* -project-plugin project.txt /*project-plugin* -project-settings project.txt /*project-settings* -project-syntax project.txt /*project-syntax* -project-tips project.txt /*project-tips* -project.txt project.txt /*project.txt* -ps_color.txt ps_color.txt /*ps_color.txt* -ps_colour ps_color.txt /*ps_colour* -psc ps_color.txt /*psc* -psc-about-background ps_color.txt /*psc-about-background* -psc-change-background ps_color.txt /*psc-change-background* -psc-contents ps_color.txt /*psc-contents* -psc-cterm ps_color.txt /*psc-cterm* -psc-cterm-color-table ps_color.txt /*psc-cterm-color-table* -psc-cterm-incompatible ps_color.txt /*psc-cterm-incompatible* -psc-cterm-nt ps_color.txt /*psc-cterm-nt* -psc-cterm-others ps_color.txt /*psc-cterm-others* -psc-cterm-xterm ps_color.txt /*psc-cterm-xterm* -psc-faq ps_color.txt /*psc-faq* -psc-faq-ffothers ps_color.txt /*psc-faq-ffothers* -psc-features ps_color.txt /*psc-features* -psc-options ps_color.txt /*psc-options* -psc-overview ps_color.txt /*psc-overview* -psc-release-notes ps_color.txt /*psc-release-notes* -psc-tips ps_color.txt /*psc-tips* -psc-todo ps_color.txt /*psc-todo* -psc-usage ps_color.txt /*psc-usage* -psc_cterm_style ps_color.txt /*psc_cterm_style* -psc_fontface ps_color.txt /*psc_fontface* -psc_inversed_todo ps_color.txt /*psc_inversed_todo* -psc_statement_different_from_type ps_color.txt /*psc_statement_different_from_type* -psc_style ps_color.txt /*psc_style* -psc_use_default_for_cterm ps_color.txt /*psc_use_default_for_cterm* -pscolor ps_color.txt /*pscolor* -snipMate snipMate.txt /*snipMate* -snipMate-$# snipMate.txt /*snipMate-$#* -snipMate-${#:} snipMate.txt /*snipMate-${#:}* -snipMate-${#} snipMate.txt /*snipMate-${#}* -snipMate-author snipMate.txt /*snipMate-author* -snipMate-commands snipMate.txt /*snipMate-commands* -snipMate-contact snipMate.txt /*snipMate-contact* -snipMate-description snipMate.txt /*snipMate-description* -snipMate-disadvantages snipMate.txt /*snipMate-disadvantages* -snipMate-expandtab snipMate.txt /*snipMate-expandtab* -snipMate-features snipMate.txt /*snipMate-features* -snipMate-filename snipMate.txt /*snipMate-filename* -snipMate-indenting snipMate.txt /*snipMate-indenting* -snipMate-placeholders snipMate.txt /*snipMate-placeholders* -snipMate-remap snipMate.txt /*snipMate-remap* -snipMate-settings snipMate.txt /*snipMate-settings* -snipMate-usage snipMate.txt /*snipMate-usage* -snipMate.txt snipMate.txt /*snipMate.txt* -snippet snipMate.txt /*snippet* -snippet-syntax snipMate.txt /*snippet-syntax* -snippets snipMate.txt /*snippets* -surround surround.txt /*surround* -surround-author surround.txt /*surround-author* -surround-customizing surround.txt /*surround-customizing* -surround-issues surround.txt /*surround-issues* -surround-mappings surround.txt /*surround-mappings* -surround-replacements surround.txt /*surround-replacements* -surround-targets surround.txt /*surround-targets* -surround.txt surround.txt /*surround.txt* -v_[% matchit.txt /*v_[%* -v_]% matchit.txt /*v_]%* -v_a% matchit.txt /*v_a%* -v_g% matchit.txt /*v_g%* -vcscommand vcscommand.txt /*vcscommand* -vcscommand-buffer-management vcscommand.txt /*vcscommand-buffer-management* -vcscommand-buffer-variables vcscommand.txt /*vcscommand-buffer-variables* -vcscommand-bugs vcscommand.txt /*vcscommand-bugs* -vcscommand-commands vcscommand.txt /*vcscommand-commands* -vcscommand-config vcscommand.txt /*vcscommand-config* -vcscommand-contents vcscommand.txt /*vcscommand-contents* -vcscommand-customize vcscommand.txt /*vcscommand-customize* -vcscommand-events vcscommand.txt /*vcscommand-events* -vcscommand-install vcscommand.txt /*vcscommand-install* -vcscommand-intro vcscommand.txt /*vcscommand-intro* -vcscommand-manual vcscommand.txt /*vcscommand-manual* -vcscommand-mappings vcscommand.txt /*vcscommand-mappings* -vcscommand-mappings-override vcscommand.txt /*vcscommand-mappings-override* -vcscommand-naming vcscommand.txt /*vcscommand-naming* -vcscommand-options vcscommand.txt /*vcscommand-options* -vcscommand-ssh vcscommand.txt /*vcscommand-ssh* -vcscommand-ssh-config vcscommand.txt /*vcscommand-ssh-config* -vcscommand-ssh-env vcscommand.txt /*vcscommand-ssh-env* -vcscommand-ssh-other vcscommand.txt /*vcscommand-ssh-other* -vcscommand-ssh-wrapper vcscommand.txt /*vcscommand-ssh-wrapper* -vcscommand-statusline vcscommand.txt /*vcscommand-statusline* -vcscommand.txt vcscommand.txt /*vcscommand.txt* -vs surround.txt /*vs* -yS surround.txt /*yS* -ySS surround.txt /*ySS* -ys surround.txt /*ys* -yss surround.txt /*yss* diff --git a/.vim/doc/vcscommand.txt b/.vim/doc/vcscommand.txt deleted file mode 100644 index 28d4e63..0000000 --- a/.vim/doc/vcscommand.txt +++ /dev/null @@ -1,819 +0,0 @@ -*vcscommand.txt* vcscommand -Copyright (c) 2007 Bob Hiestand - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - -For instructions on installing this file, type - :help add-local-help -inside Vim. - -Author: Bob Hiestand -Credits: Benji Fisher's excellent MatchIt documentation - -============================================================================== -1. Contents *vcscommand-contents* - - Installation : |vcscommand-install| - vcscommand Intro : |vcscommand| - vcscommand Manual : |vcscommand-manual| - Customization : |vcscommand-customize| - SSH "integration" : |vcscommand-ssh| - Changes from cvscommand : |cvscommand-changes| - Bugs : |vcscommand-bugs| - -============================================================================== - -2. vcscommand Installation *vcscommand-install* - -The vcscommand plugin comprises five files: vcscommand.vim, vcssvn.vim, -vcscvs.vim, vcssvk.vim and vcscommand.txt (this file). In order to install -the plugin, place the vcscommand.vim, vcssvn.vim, vcssvk.vim, and vcscvs.vim -files into a plugin directory in your runtime path (please see -|add-global-plugin| and |'runtimepath'|. - -This help file can be included in the VIM help system by copying it into a -'doc' directory in your runtime path and then executing the |:helptags| -command, specifying the full path of the 'doc' directory. Please see -|add-local-help| for more details. - -vcscommand may be customized by setting variables, creating maps, and -specifying event handlers. Please see |vcscommand-customize| for more -details. - -============================================================================== - -3. vcscommand Intro *vcscommand* - *vcscommand-intro* - -The vcscommand plugin provides global ex commands for manipulating -version-controlled source files, currently those controlled either by CVS or -Subversion. In general, each command operates on the current buffer and -accomplishes a separate source control function, such as update, commit, log, -and others (please see |vcscommand-commands| for a list of all available -commands). The results of each operation are displayed in a scratch buffer. -Several buffer variables are defined for those scratch buffers (please see -|vcscommand-buffer-variables|). - -The notion of "current file" means either the current buffer, or, in the case -of a directory buffer (such as Explorer or netrw buffers), the directory (and -all subdirectories) represented by the the buffer. - -For convenience, any vcscommand invoked on a vcscommand scratch buffer acts as -though it was invoked on the original file and splits the screen so that the -output appears in a new window. - -Many of the commands accept revisions as arguments. By default, most operate -on the most recent revision on the current branch if no revision is specified. - -Each vcscommand is mapped to a key sequence starting with the || -keystroke. The default mappings may be overridden by supplying different -mappings before the plugin is loaded, such as in the vimrc, in the standard -fashion for plugin mappings. For examples, please see -|vcscommand-mappings-override|. - -The vcscommand plugin may be configured in several ways. For more details, -please see |vcscommand-customize|. - -============================================================================== - -4. vcscommand Manual *vcscommand-manual* - -4.1 vcscommand commands *vcscommand-commands* - -vcscommand defines the following commands: - -|:VCSAdd| -|:VCSAnnotate| -|:VCSBlame| -|:VCSCommit| -|:VCSDelete| -|:VCSDiff| -|:VCSGotoOriginal| -|:VCSLog| -|:VCSRemove| -|:VCSRevert| -|:VCSReview| -|:VCSStatus| -|:VCSUpdate| -|:VCSVimDiff| - -The following commands are specific to CVS files: - -|:CVSEdit| -|:CVSEditors| -|:CVSUnedit| -|:CVSWatch| -|:CVSWatchAdd| -|:CVSWatchOn| -|:CVSWatchOff| -|:CVSWatchRemove| -|:CVSWatchers| - -:VCSAdd *:VCSAdd* - -This command adds the current file to source control. Please note, this does -not commit the newly-added file. All parameters to the command are passed to -the underlying VCS. - -:VCSAnnotate[!] *:VCSAnnotate* - -This command displays the current file with each line annotated with the -version in which it was most recently changed. If an argument is given, the -argument is used as a revision number to display. If not given an argument, -it uses the most recent version of the file (on the current branch, if under -CVS control). Additionally, if the current buffer is a VCSAnnotate buffer -already, the version number on the current line is used. - -If '!' is used, the view of the annotated buffer is split so that the -annotation is in a separate window from the content, and each is highlighted -separately. - -For CVS buffers, the 'VCSCommandCVSAnnotateParent' option, if set to non-zero, -will cause the above behavior to change. Instead of annotating the version on -the current line, the parent revision is used instead, crossing branches if -necessary. - -With no arguments the cursor will jump to the line in the annotated buffer -corresponding to the current line in the source buffer. - -:VCSBlame[!] *:VCSBlame* - -Alias for |:VCSAnnotate|. - -:VCSCommit[!] *:VCSCommit* - -This command commits changes to the current file to source control. - -If called with arguments, the arguments are the log message. - -If '!' is used, an empty log message is committed. - -If called with no arguments, this is a two-step command. The first step opens -a buffer to accept a log message. When that buffer is written, it is -automatically closed and the file is committed using the information from that -log message. The commit can be abandoned if the log message buffer is deleted -or wiped before being written. - -Alternatively, the mapping that is used to invoke :VCSCommit (by default -||cc, please see |vcscommand-mappings|) can be used in the log message -buffer in Normal mode to immediately commit. This is useful if the -|VCSCommandCommitOnWrite| variable is set to 0 to disable the normal -commit-on-write behavior. - -:VCSDelete *:VCSDelete* - -Deletes the current file and removes it from source control. All parameters -to the command are passed to the underlying VCS. - -:VCSDiff *:VCSDiff* - -With no arguments, this displays the differences between the current file and -its parent version under source control in a new scratch buffer. - -With one argument, the diff is performed on the current file against the -specified revision. - -With two arguments, the diff is performed between the specified revisions of -the current file. - -For CVS, this command uses the |VCSCommandCVSDiffOpt| variable to specify diff -options. If that variable does not exist, a plugin-specific default is used. -If you wish to have no options, then set it to the empty string. - -For SVN, this command uses the |VCSCommandSVNDiffOpt| variable to specify diff -options. If that variable does not exist, the SVN default is used. -Additionally, |VCSCommandSVNDiffExt| can be used to select an external diff -application. - -:VCSGotoOriginal *:VCSGotoOriginal* - -This command jumps to the source buffer if the current buffer is a VCS scratch -buffer. - -:VCSGotoOriginal! - -Like ":VCSGotoOriginal" but also executes :bufwipeout on all VCS scrach -buffers associated with the original file. - -:VCSInfo *:VCSInfo* - -This command displays extended information about the current file in a new -scratch buffer. - -:VCSLock *:VCSLock* - -This command locks the current file in order to prevent other users from -concurrently modifying it. The exact semantics of this command depend on the -underlying VCS. This does nothing in CVS. All parameters are passed to the -underlying VCS. - -:VCSLog *:VCSLog* - -Displays the version history of the current file in a new scratch buffer. If -there is one parameter supplied, it is taken as as a revision parameters to be -passed through to the underlying VCS. Otherwise, all parameters are passed to -the underlying VCS. - -:VCSRemove *:VCSRemove* - -Alias for |:VCSDelete|. - -:VCSRevert *:VCSRevert* - -This command replaces the current file with the most recent version from the -repository in order to wipe out any undesired changes. - -:VCSReview *:VCSReview* - -Displays a particular version of the current file in a new scratch buffer. If -no argument is given, the most recent version of the file on the current -branch is retrieved. - -:VCSStatus *:VCSStatus* - -Displays versioning information about the current file in a new scratch -buffer. All parameters are passed to the underlying VCS. - - -:VCSUnlock *:VCSUnlock* - -Unlocks the current file in order to allow other users from concurrently -modifying it. The exact semantics of this command depend on the underlying -VCS. All parameters are passed to the underlying VCS. - -:VCSUpdate *:VCSUpdate* - -Updates the current file with any relevant changes from the repository. This -intentionally does not automatically reload the current buffer, though vim -should prompt the user to do so if the underlying file is altered by this -command. - -:VCSVimDiff *:VCSVimDiff* - -Uses vimdiff to display differences between versions of the current file. - -If no revision is specified, the most recent version of the file on the -current branch is used. With one argument, that argument is used as the -revision as above. With two arguments, the differences between the two -revisions is displayed using vimdiff. - -With either zero or one argument, the original buffer is used to perform the -vimdiff. When the scratch buffer is closed, the original buffer will be -returned to normal mode. - -Once vimdiff mode is started using the above methods, additional vimdiff -buffers may be added by passing a single version argument to the command. -There may be up to 4 vimdiff buffers total. - -Using the 2-argument form of the command resets the vimdiff to only those 2 -versions. Additionally, invoking the command on a different file will close -the previous vimdiff buffers. - -:CVSEdit *:CVSEdit* - -This command performs "cvs edit" on the current file. Yes, the output buffer -in this case is almost completely useless. - -:CVSEditors *:CVSEditors* - -This command performs "cvs edit" on the current file. - -:CVSUnedit *:CVSUnedit* - -Performs "cvs unedit" on the current file. Again, yes, the output buffer here -is basically useless. - -:CVSWatch *:CVSWatch* - -This command takes an argument which must be one of [on|off|add|remove]. The -command performs "cvs watch" with the given argument on the current file. - -:CVSWatchAdd *:CVSWatchAdd* - -This command is an alias for ":CVSWatch add" - -:CVSWatchOn *:CVSWatchOn* - -This command is an alias for ":CVSWatch on" - -:CVSWatchOff *:CVSWatchOff* - -This command is an alias for ":CVSWatch off" - -:CVSWatchRemove *:CVSWatchRemove* - -This command is an alias for ":CVSWatch remove" - -:CVSWatchers *:CVSWatchers* - -This command performs "cvs watchers" on the current file. - -4.2 Mappings *vcscommand-mappings* - -By default, a mapping is defined for each command. These mappings execute the -default (no-argument) form of each command. - -||ca VCSAdd -||cn VCSAnnotate -||cN VCSAnnotate! -||cc VCSCommit -||cD VCSDelete -||cd VCSDiff -||cg VCSGotoOriginal -||cG VCSGotoOriginal! -||ci VCSInfo -||cl VCSLog -||cL VCSLock -||cr VCSReview -||cs VCSStatus -||cu VCSUpdate -||cU VCSUnlock -||cv VCSVimDiff - -Only for CVS buffers: - -||ce CVSEdit -||cE CVSEditors -||ct CVSUnedit -||cwv CVSWatchers -||cwa CVSWatchAdd -||cwn CVSWatchOn -||cwf CVSWatchOff -||cwf CVSWatchRemove - - *vcscommand-mappings-override* - -The default mappings can be overridden by user-provided instead by mapping to -CommandName. This is especially useful when these mappings collide with -other existing mappings (vim will warn of this during plugin initialization, -but will not clobber the existing mappings). - -There are three methods for controlling mapping: - -First, maps can be overriden for individual commands. For instance, to -override the default mapping for :VCSAdd to set it to '\add', add the -following to the vimrc: - -nmap \add VCSAdd - -Second, the default map prefix ('c') can be overridden by defining the -|VCSCommandMapPrefix| variable. - -Third, the entire set of default maps can be overridden by defining the -|VCSCommandMappings| variable. - - -4.3 Automatic buffer variables *vcscommand-buffer-variables* - -Several buffer variables are defined in each vcscommand result buffer. These -may be useful for additional customization in callbacks defined in the event -handlers (please see |vcscommand-events|). - -The following variables are automatically defined: - -b:VCSCommandOriginalBuffer *b:VCSCommandOriginalBuffer* - -This variable is set to the buffer number of the source file. - -b:VCSCommandCommand *b:VCSCommandCommand* - -This variable is set to the name of the vcscommand that created the result -buffer. - -b:VCSCommandSourceFile *b:VCSCommandSourceFile* - -This variable is set to the name of the original file under source control. - -b:VCSCommandVCSType *b:VCSCommandVCSType* - -This variable is set to the type of the source control. This variable is also -set on the original file itself. -============================================================================== - -5. Configuration and customization *vcscommand-customize* - *vcscommand-config* - -The vcscommand plugin can be configured in several ways: by setting -configuration variables (see |vcscommand-options|) or by defining vcscommand -event handlers (see |vcscommand-events|). Additionally, the vcscommand plugin -supports a customized status line (see |vcscommand-statusline| and -|vcscommand-buffer-management|). - -5.1 vcscommand configuration variables *vcscommand-options* - -Several variables affect the plugin's behavior. These variables are checked -at time of execution, and may be defined at the window, buffer, or global -level and are checked in that order of precedence. - - -The following variables are available: - -|VCSCommandCommitOnWrite| -|VCSCommandCVSDiffOpt| -|VCSCommandCVSExec| -|VCSCommandDeleteOnHide| -|VCSCommandDiffSplit| -|VCSCommandDisableAll| -|VCSCommandDisableMappings| -|VCSCommandDisableExtensionMappings| -|VCSCommandEdit| -|VCSCommandEnableBufferSetup| -|VCSCommandMappings| -|VCSCommandMapPrefix| -|VCSCommandResultBufferNameExtension| -|VCSCommandResultBufferNameFunction| -|VCSCommandSplit| -|VCSCommandSVKExec| -|VCSCommandSVNDiffExt| -|VCSCommandSVNDiffOpt| -|VCSCommandSVNExec| -|VCSCommandVCSTypeOverride| - -VCSCommandCommitOnWrite *VCSCommandCommitOnWrite* - -This variable, if set to a non-zero value, causes the pending commit -to take place immediately as soon as the log message buffer is written. -If set to zero, only the VCSCommit mapping will cause the pending commit to -occur. If not set, it defaults to 1. - -VCSCommandCVSExec *VCSCommandCVSExec* - -This variable controls the executable used for all CVS commands If not set, -it defaults to "cvs". - -VCSCommandDeleteOnHide *VCSCommandDeleteOnHide* - -This variable, if set to a non-zero value, causes the temporary result buffers -to automatically delete themselves when hidden. - -VCSCommandCVSDiffOpt *VCSCommandCVSDiffOpt* - -This variable, if set, determines the options passed to the diff command of -CVS. If not set, it defaults to 'u'. - -VCSCommandDiffSplit *VCSCommandDiffSplit* - -This variable overrides the |VCSCommandSplit| variable, but only for buffers -created with |:VCSVimDiff|. - -VCSCommandDisableAll *VCSCommandDisableAll* - -This variable, if set, prevents the plugin or any extensions from loading at -all. This is useful when a single runtime distribution is used on multiple -systems with varying versions. - -VCSCommandDisableMappings *VCSCommandDisableMappings* - -This variable, if set to a non-zero value, prevents the default command -mappings from being set. This supercedes -|VCSCommandDisableExtensionMappings|. - -VCSCommandDisableExtensionMappings *VCSCommandDisableExtensionMappings* - -This variable, if set to a non-zero value, prevents the default command -mappings from being set for commands specific to an individual VCS. - -VCSCommandEdit *VCSCommandEdit* - -This variable controls whether the original buffer is replaced ('edit') or -split ('split'). If not set, it defaults to 'split'. - -VCSCommandEnableBufferSetup *VCSCommandEnableBufferSetup* - -This variable, if set to a non-zero value, activates VCS buffer management -mode see (|vcscommand-buffer-management|). This mode means that the -'VCSCommandBufferInfo' variable is filled with version information if the file -is VCS-controlled. This is useful for displaying version information in the -status bar. - -VCSCommandMappings *VCSCommandMappings* - -This variable, if set, overrides the default mappings used for shortcuts. It -should be a List of 2-element Lists, each containing a shortcut and function -name pair. The value of the '|VCSCommandMapPrefix|' variable will be added to -each shortcut. - -VCSCommandMapPrefix *VCSCommandMapPrefix* - -This variable, if set, overrides the default mapping prefix ('c'). -This allows customization of the mapping space used by the vcscommand -shortcuts. - -VCSCommandResultBufferNameExtension *VCSCommandResultBufferNameExtension* - -This variable, if set to a non-blank value, is appended to the name of the VCS -command output buffers. For example, '.vcs'. Using this option may help -avoid problems caused by autocommands dependent on file extension. - -VCSCommandResultBufferNameFunction *VCSCommandResultBufferNameFunction* - -This variable, if set, specifies a custom function for naming VCS command -output buffers. This function is expected to return the new buffer name, and -will be passed the following arguments: - - command - name of the VCS command being executed (such as 'Log' or - 'Diff'). - - originalBuffer - buffer number of the source file. - - vcsType - type of VCS controlling this file (such as 'CVS' or 'SVN'). - - statusText - extra text associated with the VCS action (such as version - numbers). - -VCSCommandSplit *VCSCommandSplit* - -This variable controls the orientation of the various window splits that -may occur. - -If set to 'horizontal', the resulting windows will be on stacked on top of -one another. If set to 'vertical', the resulting windows will be -side-by-side. If not set, it defaults to 'horizontal' for all but -VCSVimDiff windows. VCSVimDiff windows default to the user's 'diffopt' -setting, if set, otherwise 'vertical'. - -VCSCommandSVKExec *VCSCommandSVKExec* - -This variable controls the executable used for all SVK commands If not set, -it defaults to "svk". - -VCSCommandSVNDiffExt *VCSCommandSVNDiffExt* - -This variable, if set, is passed to SVN via the --diff-cmd command to select -an external application for performing the diff. - -VCSCommandSVNDiffOpt *VCSCommandSVNDiffOpt* - -This variable, if set, determines the options passed with the '-x' parameter -to the SVN diff command. If not set, no options are passed. - -VCSCommandSVNExec *VCSCommandSVNExec* - -This variable controls the executable used for all SVN commands If not set, -it defaults to "svn". - -VCSCommandVCSTypeOverride *VCSCommandVCSTypeOverride* - -This variable allows the VCS type detection to be overridden on a path-by-path -basis. The value of this variable is expected to be a List of Lists. Each -item in the high-level List is a List containing two elements. The first -element is a regular expression that will be matched against the full file -name of a given buffer. If it matches, the second element will be used as the -VCS type. - -5.2 VCSCommand events *vcscommand-events* - -For additional customization, vcscommand can trigger user-defined events. -Event handlers are provided by defining User event autocommands (see -|autocommand|, |User|) in the vcscommand group with patterns matching the -event name. - -For instance, the following could be added to the vimrc to provide a 'q' -mapping to quit a vcscommand scratch buffer: - -augroup VCSCommand - au User VCSBufferCreated silent! nmap q :bwipeout -augroup END - -The following hooks are available: - -VCSBufferCreated This event is fired just after a vcscommand - result buffer is created and populated. It is - executed within the context of the vcscommand - buffer. The vcscommand buffer variables may - be useful for handlers of this event (please - see |vcscommand-buffer-variables|). - -VCSBufferSetup This event is fired just after vcscommand buffer - setup occurs, if enabled. - -VCSPluginInit This event is fired when the vcscommand plugin - first loads. - -VCSPluginFinish This event is fired just after the vcscommand - plugin loads. - -VCSVimDiffFinish This event is fired just after the VCSVimDiff - command executes to allow customization of, - for instance, window placement and focus. - -Additionally, there is another hook which is used internally to handle loading -the multiple scripts in order. This hook should probably not be used by an -end user without a good idea of how it works. Among other things, any events -associated with this hook are cleared after they are executed (during -vcscommand.vim script initialization). - -VCSLoadExtensions This event is fired just before the - VCSPluginFinish. It is used internally to - execute any commands from the VCS - implementation plugins that needs to be - deferred until the primary plugin is - initialized. - -5.3 vcscommand buffer naming *vcscommand-naming* - -vcscommand result buffers use the following naming convention: -[{VCS type} {VCS command} {Source file name}] - -If additional buffers are created that would otherwise conflict, a -distinguishing number is added: - -[{VCS type} {VCS command} {Source file name}] (1,2, etc) - -5.4 vcscommand status line support *vcscommand-statusline* - -It is intended that the user will customize the |'statusline'| option to -include vcscommand result buffer attributes. A sample function that may be -used in the |'statusline'| option is provided by the plugin, -VCSCommandGetStatusLine(). In order to use that function in the status line, do -something like the following: - -set statusline=%<%f\ %{VCSCommandGetStatusLine()}\ %h%m%r%=%l,%c%V\ %P - -of which %{VCSCommandGetStatusLine()} is the relevant portion. - -The sample VCSCommandGetStatusLine() function handles both vcscommand result -buffers and VCS-managed files if vcscommand buffer management is enabled -(please see |vcscommand-buffer-management|). - -5.5 vcscommand buffer management *vcscommand-buffer-management* - -The vcscommand plugin can operate in buffer management mode, which means that -it attempts to set a buffer variable ('VCSCommandBufferInfo') upon entry into -a buffer. This is rather slow because it means that the VCS will be invoked -at each entry into a buffer (during the |BufEnter| autocommand). - -This mode is disabled by default. In order to enable it, set the -|VCSCommandEnableBufferSetup| variable to a true (non-zero) value. Enabling -this mode simply provides the buffer variable mentioned above. The user must -explicitly include information from the variable in the |'statusline'| option -if they are to appear in the status line (but see |vcscommand-statusline| for -a simple way to do that). - -The 'VCSCommandBufferInfo' variable is a list which contains, in order, the -revision of the current file, the latest revision of the file in the -repository, and (for CVS) the name of the branch. If those values cannot be -determined, the list is a single element: 'Unknown'. - -============================================================================== - -6. SSH "integration" *vcscommand-ssh* - -The following instructions are intended for use in integrating the -vcscommand.vim plugin with an SSH-based CVS environment. - -Familiarity with SSH and CVS are assumed. - -These instructions assume that the intent is to have a message box pop up in -order to allow the user to enter a passphrase. If, instead, the user is -comfortable using certificate-based authentication, then only instructions -6.1.1 and 6.1.2 (and optionally 6.1.4) need to be followed; ssh should then -work transparently. - -6.1 Environment settings *vcscommand-ssh-env* - -6.1.1 CVSROOT should be set to something like: - - :ext:user@host:/path_to_repository - -6.1.2 CVS_RSH should be set to: - - ssh - - Together, those settings tell CVS to use ssh as the transport when - performing CVS calls. - -6.1.3 SSH_ASKPASS should be set to the password-dialog program. In my case, - running gnome, it's set to: - - /usr/libexec/openssh/gnome-ssh-askpass - - This tells SSH how to get passwords if no input is available. - -6.1.4 OPTIONAL. You may need to set SSH_SERVER to the location of the cvs - executable on the remote (server) machine. - -6.2 CVS wrapper program *vcscommand-ssh-wrapper* - -Now you need to convince SSH to use the password-dialog program. This means -you need to execute SSH (and therefore CVS) without standard input. The -following script is a simple perl wrapper that dissasociates the CVS command -from the current terminal. Specific steps to do this may vary from system to -system; the following example works for me on linux. - -#!/usr/bin/perl -w -use strict; -use POSIX qw(setsid); -open STDIN, '/dev/null'; -fork and do {wait; exit;}; -setsid; -exec('cvs', @ARGV); - -6.3 Configuring vcscommand.vim *vcscommand-ssh-config* - -At this point, you should be able to use your wrapper script to invoke CVS with -various commands, and get the password dialog. All that's left is to make CVS -use your newly-created wrapper script. - -6.3.1 Tell vcscommand.vim what CVS executable to use. The easiest way to do this - is globally, by putting the following in your .vimrc: - - let VCSCommandCVSExec=/path/to/cvs/wrapper/script - -6.4 Where to go from here *vcscommand-ssh-other* - -The script given above works even when non-SSH CVS connections are used, -except possibly when interactively entering the message for CVS commit log -(depending on the editor you use... VIM works fine). Since the vcscommand.vim -plugin handles that message without a terminal, the wrapper script can be used -all the time. - -This allows mixed-mode operation, where some work is done with SSH-based CVS -repositories, and others with pserver or local access. - -It is possible, though beyond the scope of the plugin, to dynamically set the -CVS executable based on the CVSROOT for the file being edited. The user -events provided (such as VCSBufferCreated and VCSBufferSetup) can be used to -set a buffer-local value (b:VCSCommandCVSExec) to override the CVS executable -on a file-by-file basis. Alternatively, much the same can be done (less -automatically) by the various project-oriented plugins out there. - -It is highly recommended for ease-of-use that certificates with no passphrase -or ssh-agent are employed so that the user is not given the password prompt -too often. - -============================================================================== - -7. Changes from cvscommand *cvscommand-changes* - -1. Require Vim 7 in order to leverage several convenient features; also -because I wanted to play with Vim 7. - -2. Renamed commands to start with 'VCS' instead of 'CVS'. The exceptions are -the 'CVSEdit' and 'CVSWatch' family of commands, which are specific to CVS. - -3. Renamed options, events to start with 'VCSCommand'. - -4. Removed option to jump to the parent version of the current line in an -annotated buffer, as opposed to the version on the current line. This made -little sense in the branching scheme used by subversion, where jumping to a -parent branch required finding a different location in the repository. It -didn't work consistently in CVS anyway. - -5. Removed option to have nameless scratch buffers. - -6. Changed default behavior of scratch buffers to split the window instead of -displaying in the current window. This may still be overridden using the -'VCSCommandEdit' option. - -7. Split plugin into multiple plugins. - -8. Added 'VCSLock' and 'VCSUnlock' commands. These are implemented for -subversion but not for CVS. These were not kept specific to subversion as they -seemed more general in nature and more likely to be supported by any future VCS -supported by this plugin. - -9. Changed name of buffer variables set by commands. - -'b:cvsOrigBuffNR' became 'b:VCSCommandOriginalBuffer' -'b:cvscmd' became 'b:VCSCommandCommand' - -10. Added new automatic variables to command result buffers. - -'b:VCSCommandSourceFile' -'b:VCSCommandVCSType' - -============================================================================== - -8. Known bugs *vcscommand-bugs* - -Please let me know if you run across any. - -CVSUnedit may, if a file is changed from the repository, provide prompt text -to determine whether the changes should be thrown away. Currently, that text -shows up in the CVS result buffer as information; there is no way for the user -to actually respond to the prompt and the CVS unedit command does nothing. If -this really bothers anyone, please let me know. - -VCSVimDiff, when using the original (real) source buffer as one of the diff -buffers, uses some hacks to try to restore the state of the original buffer -when the scratch buffer containing the other version is destroyed. There may -still be bugs in here, depending on many configuration details. - -vim:tw=78:ts=8:ft=help diff --git a/.vim/filetype.vim b/.vim/filetype.vim deleted file mode 100644 index 48fb035..0000000 --- a/.vim/filetype.vim +++ /dev/null @@ -1,147 +0,0 @@ -" general per-language filetype file -if exists("g:did_load_personal_filetypes") - finish -endif - -let g:did_load_personal_filetypes = 1 - -" Filetype mappingss -augroup markdown - au! BufRead,BufNewFile *.mkd setfiletype markdown - au! BufRead,BufNewFile *.md setfiletype markdown -augroup END -augroup mako - au! BufRead,BufNewFile *.mak,*.mako setfiletype mako -augroup END -augroup csv - au! BufNewFile,BufRead *.csv setf csv -augroup END -augroup lilypond - au! BufNewFile,BufRead *.ly,*.ily setf lilypond -augroup END -augroup java - autocmd BufRead *.java set efm=%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%# - autocmd BufRead *.java set makeprg=ant\ -find\ build.xml - autocmd FileType java let b:auto_trim_whitespace=1 -augroup END -augroup less - autocmd BufNewFile,BufRead *.less set filetype=less -augroup END - -augroup pcal - au BufNewFile,BufRead *.pcal setf tla -augroup END - -augroup ragel - au BufNewFile,BufRead *.rl setf ragel -augroup END - - -au! BufNewFile,BufRead *.pde setf arduino - -"augroup org - "" leave these as is: - "au! BufRead,BufWrite,BufWritePost,BufNewFile *.org - ""au BufRead,BufNewFile *.org call org#SetOrgFileType() - ""au BufRead,BufNewFile *.org :GitGutterDisable - "au BufRead *.org :PreLoadTags - "au BufWrite *.org :PreWriteTags - "au BufWritePost *.org :PostWriteTags -"augroup END - -au BufNewFile,BufRead motd.public,/tmp/motd.public.r.* setf motd - -au Filetype html,xml,xsl source ~/.vim/closetag.vim - -au BufRead,BufNewFile *.go set filetype=go - -au FileType cpp let b:delimitMate_matchpairs = "(:),[:],{:}" - -autocmd FileType vue syntax sync fromstart -au Filetype vue let b:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`', '<':'>'} -au Filetype html let b:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '`':'`', '<':'>'} - -"Settings per filetype -augroup python - ""autocmd FileType python set omnifunc=pythoncomplete#Complete - ""autocmd FileType python call SuperTabSetCompletionType("") - ""autocmd FileType python set completeopt-=preview - autocmd FileType python set ts=4 - autocmd FileType python set softtabstop=4 - autocmd FileType python set shiftwidth=4 - autocmd FileType python set expandtab - autocmd FileType python set nosmartindent - "autocmd FileType python let b:auto_trim_whitespace=1 -augroup END -"augroup javascript - "autocmd FileType javascript set ts=4 - "autocmd FileType javascript set softtabstop=4 - "autocmd FileType javascript set shiftwidth=4 - "autocmd FileType javascript set expandtab - "autocmd FileType javascript let b:auto_trim_whitespace=1 -"augroup END - -augroup hs - autocmd FileType hs nnoremap ii :GhcModInfo! -augroup END - -augroup mkd - autocmd FileType mkd set ai formatoptions=tcroqn2 comments=n:> -augroup END - -augroup mediawiki - autocmd BufRead,BufNewFile *.wiki setfiletype mediawiki - autocmd BufRead,BufNewFile *.wikipedia.org* setfiletype mediawiki -augroup END - -augroup go - autocmd FileType go set ts=2 - autocmd FileType go set softtabstop=2 - autocmd FileType go set shiftwidth=2 - autocmd FileType go set noexpandtab - autocmd FileType go imap rr :GoIfErr - autocmd FileType go nmap rr :GoIfErr - autocmd FileType go nnoremap im lua require('telescope').extensions.goimpl.goimpl{theme = "ivy", layout_config = {height = 10}} - "autocmd FileType go nmap gd (go-doc) - "autocmd FileType go nmap gd (go-def) -augroup END - -augroup idris - autocmd FileType idris nmap a a?holet -augroup end - -augroup markdown - autocmd FileType markdown imap << -augroup end - -autocmd FileType go let b:auto_trim_whitespace=1 -autocmd FileType cpp let b:auto_trim_whitespace=1 -autocmd FileType perl let b:auto_trim_whitespace=1 -autocmd FileType borg let b:auto_trim_whitespace=1 -autocmd FileType javascript let b:auto_trim_whitespace=1 -autocmd FileType python let b:auto_trim_whitespace=1 -autocmd FileType proto let b:auto_trim_whitespace=1 -autocmd FileType hy let b:auto_trim_whitespace=1 -autocmd FileType idris let b:auto_trim_whitespace=1 -autocmd FileType java let b:auto_trim_whitespace=1 -autocmd FileType lua let b:auto_trim_whitespace=1 - -augroup templates - autocmd BufNewFile *.vue 0r ~/.vim/skeletons/vue.skel - autocmd BufNewFile *.svelte 0r ~/.vim/skeletons/svelte.skel -augroup end - -augroup rust - autocmd FileType rust nnoremap lg lua rust_where_at_line() -augroup end - -function DetectGoHtmlTmpl() - if expand('%:e') == "html" && search("{{") != 0 - setfiletype gohtmltmpl - endif -endfunction - -augroup filetypedetect - " gohtmltmpl - au BufRead,BufNewFile *.html call DetectGoHtmlTmpl() -augroup END diff --git a/.vim/ftdetect/proto.vim b/.vim/ftdetect/proto.vim deleted file mode 100644 index 3974660..0000000 --- a/.vim/ftdetect/proto.vim +++ /dev/null @@ -1 +0,0 @@ -autocmd BufNewFile,BufRead *.proto setfiletype proto diff --git a/.vim/ftdetect/scala.vim b/.vim/ftdetect/scala.vim deleted file mode 100644 index 6b35521..0000000 --- a/.vim/ftdetect/scala.vim +++ /dev/null @@ -1,3 +0,0 @@ -" $URL$ - -au BufRead,BufNewFile *.scala set filetype=scala diff --git a/.vim/ftplugin/html_snip_helper.vim b/.vim/ftplugin/html_snip_helper.vim deleted file mode 100644 index 2e54570..0000000 --- a/.vim/ftplugin/html_snip_helper.vim +++ /dev/null @@ -1,10 +0,0 @@ -" Helper function for (x)html snippets -if exists('s:did_snip_helper') || &cp || !exists('loaded_snips') - finish -endif -let s:did_snip_helper = 1 - -" Automatically closes tag if in xhtml -fun! Close() - return stridx(&ft, 'xhtml') == -1 ? '' : ' /' -endf diff --git a/.vim/ftplugin/objc_cocoa_mappings.vim b/.vim/ftplugin/objc_cocoa_mappings.vim deleted file mode 100644 index db2c61b..0000000 --- a/.vim/ftplugin/objc_cocoa_mappings.vim +++ /dev/null @@ -1,70 +0,0 @@ -" File: objc_cocoa_mappings.vim -" Author: Michael Sanders (msanders42 [at] gmail [dot] com) -" Description: Sets up mappings for cocoa.vim. -" Last Updated: September 08, 2009 - -if exists('b:cocoa_proj') || &cp || version < 700 - finish -endif -let b:cocoa_proj = fnameescape(globpath(expand(':p:h'), '*.xcodeproj')) - -com! -buffer ListMethods call objc#method_list#Activate(1) -com! -buffer -nargs=? -complete=customlist,objc#method_builder#Completion BuildMethods call objc#method_builder#Build('') -com! -buffer -nargs=? -complete=custom,objc#man#Completion CocoaDoc call objc#man#ShowDoc('') -com! -buffer -nargs=? Alternate call AlternateFile() - -let objc_man_key = exists('objc_man_key') ? objc_man_key : 'K' -exe 'nn '.objc_man_key.' :call objc#man#ShowDoc()' - -nn A :calAlternateFile() - -" Mimic some of Xcode's mappings. -nn :wcalBuildAnd('launch') -nn :wcalXcodeRun('build') -nn :wcalXcodeRun('clean') -" TODO: Add this -" nn :wcalBuildAnd('debug') -nn :calAlternateFile() -nn :call system('open -a Xcode '.b:cocoa_proj) -nn :ListMethods -nm -ino - -if exists('*s:AlternateFile') | finish | endif - -" Switch from header file to implementation file (and vice versa). -fun s:AlternateFile() - let path = expand('%:p:r').'.' - if expand('%:e') == 'h' - if filereadable(path.'m') - exe 'e'.fnameescape(path.'m') - return - elseif filereadable(path.'c') - exe 'e'.fnameescape(path.'c') - return - endif - else - if filereadable(path.'h') - exe 'e'.fnameescape(path.'h') - return - endif - endif - echoh ErrorMsg | echo 'Alternate file not readable.' | echoh None -endf - -" Opens Xcode and runs Applescript commands, splitting them onto newlines -" if needed. -fun s:XcodeRun(command) - call system("open -a Xcode ".b:cocoa_proj." && osascript -e 'tell app " - \ .'"Xcode" to '.a:command."' &") -endf - -fun s:BuildAnd(command) - call system("open -a Xcode ".b:cocoa_proj." && osascript -e 'tell app " - \ ."\"Xcode\"' -e '" - \ .'set target_ to project of active project document ' - \ ."' -e '" - \ .'if (build target_) starts with "Build succeeded" then ' - \ .a:command.' target_' - \ ."' -e 'end tell'") -endf diff --git a/.vim/indent/cpp.vim b/.vim/indent/cpp.vim deleted file mode 100644 index 1ccb21f..0000000 --- a/.vim/indent/cpp.vim +++ /dev/null @@ -1,92 +0,0 @@ -" Vim indent file -" Language: C++ -" Maintainer: Konstantin Lepa -" Last Change: 2010 May 20 -" License: MIT -" Version: 1.1.0 -" -" Changes {{{ -" 1.1.0 2011-01-17 -" Refactored source code. -" Some fixes. -" -" 1.0.1 2010-05-20 -" Added some changes. Thanks to Eric Rannaud -" -"}}} - -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - - -function! GoogleCppIndent() - let l:cline_num = line('.') - - let l:orig_indent = cindent(l:cline_num) - - if l:orig_indent == 0 | return 0 | endif - - let l:pline_num = prevnonblank(l:cline_num - 1) - let l:pline = getline(l:pline_num) - if l:pline =~# '^\s*template' | return l:pline_indent | endif - - " TODO: I don't know to correct it: - " namespace test { - " void - " ....<-- invalid cindent pos - " - " void test() { - " } - " - " void - " <-- cindent pos - if l:orig_indent != &shiftwidth | return l:orig_indent | endif - - let l:in_comment = 0 - let l:pline_num = prevnonblank(l:cline_num - 1) - while l:pline_num > -1 - let l:pline = getline(l:pline_num) - let l:pline_indent = indent(l:pline_num) - - if l:in_comment == 0 && l:pline =~ '^.\{-}\(/\*.\{-}\)\@ -" Version: 0.1 -" Last Change: 2007-07-25 -" -" Modify g:haskell_indent_if and g:haskell_indent_case to -" change indentation for `if'(default 3) and `case'(default 5). -" Example (in .vimrc): -" > let g:haskell_indent_if = 2 - -if exists('b:did_indent') - finish -endif - -let b:did_indent = 1 - -if !exists('g:haskell_indent_if') - " if bool - " >>>then ... - " >>>else ... - let g:haskell_indent_if = 3 -endif - -if !exists('g:haskell_indent_do') - " do [optional] - " >>>more.. - " >>>stuff... - let g:haskell_indent_do = 4 -endif - -if !exists('g:haskell_indent_case') - " case xs of - " >>>>>[] -> ... - " >>>>>(y:ys) -> ... - let g:haskell_indent_case = 5 -endif - -setlocal indentexpr=GetHaskellIndent() -setlocal indentkeys=!^F,o,O - -function! GetHaskellIndent() - let line = substitute(getline(getpos('.')[1] - 1), '\t', repeat(' ', &tabstop), 'g') - - if line =~ '[!#$%&*+./<=>?@\\^|~-]$' - return match(line, '\s*where \zs\|\S') + &shiftwidth - endif - - if line =~ '\' - let s = match(line, '\.*\&.*\zs\') - if s > 0 - return s - endif - - let s = match(line, '\') - if s > 0 - return s + g:haskell_indent_if - endif - endif - - let s = match(line, '\ 0 - return s - endif - - let s = match(line, '\') - if s > 0 - return s + g:haskell_indent_case - endif - - return match(line, '\S') -endfunction diff --git a/.vim/indent/javascript.vim b/.vim/indent/javascript.vim deleted file mode 100644 index 99e03ee..0000000 --- a/.vim/indent/javascript.vim +++ /dev/null @@ -1,330 +0,0 @@ -" Vim indent file -" Language: Javascript -" Maintainer: Darrick Wiebe -" URL: http://github.com/pangloss/vim-javascript -" Version: 1.0.0 -" Last Change: August 31, 2009 -" Acknowledgement: Based off of vim-ruby maintained by Nikolai Weibull http://vim-ruby.rubyforge.org - -" 0. Initialization {{{1 -" ================= - -" Only load this indent file when no other was loaded. -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - -setlocal nosmartindent - -" Now, set up our indentation expression and keys that trigger it. -setlocal indentexpr=GetJavascriptIndent() -setlocal indentkeys=0{,0},0),0],!^F,o,O,e - -" Only define the function once. -if exists("*GetJavascriptIndent") - finish -endif - -let s:cpo_save = &cpo -set cpo&vim - -" 1. Variables {{{1 -" ============ - -" Regex of syntax group names that are or delimit string or are comments. -let s:syng_strcom = '\' - -" Regex of syntax group names that are strings. -let s:syng_string = - \ '\' - -" Regex of syntax group names that are strings or documentation. -let s:syng_stringdoc = - \'\' - -" Expression used to check whether we should skip a match with searchpair(). -let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" - -let s:line_term = '\s*\%(\%(\/\/\).*\)\=$' - -" Regex that defines continuation lines, not including (, {, or [. -let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@[^{;]*' . s:line_term - -" Regex that defines blocks. -let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term - -" 2. Auxiliary Functions {{{1 -" ====================== - -" Check if the character at lnum:col is inside a string, comment, or is ascii. -function s:IsInStringOrComment(lnum, col) - return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom -endfunction - -" Check if the character at lnum:col is inside a string. -function s:IsInString(lnum, col) - return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string -endfunction - -" Check if the character at lnum:col is inside a string or documentation. -function s:IsInStringOrDocumentation(lnum, col) - return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc -endfunction - -" Find line above 'lnum' that isn't empty, in a comment, or in a string. -function s:PrevNonBlankNonString(lnum) - let in_block = 0 - let lnum = prevnonblank(a:lnum) - while lnum > 0 - " Go in and out of blocks comments as necessary. - " If the line isn't empty (with opt. comment) or in a string, end search. - let line = getline(lnum) - if line =~ '/\*' - if in_block - let in_block = 0 - else - break - endif - elseif !in_block && line =~ '\*/' - let in_block = 1 - elseif !in_block && line !~ '^\s*\%(//\).*$' && !(s:IsInStringOrComment(lnum, 1) && s:IsInStringOrComment(lnum, strlen(line))) - break - endif - let lnum = prevnonblank(lnum - 1) - endwhile - return lnum -endfunction - -" Find line above 'lnum' that started the continuation 'lnum' may be part of. -function s:GetMSL(lnum, in_one_line_scope) - " Start on the line we're at and use its indent. - let msl = a:lnum - let lnum = s:PrevNonBlankNonString(a:lnum - 1) - while lnum > 0 - " If we have a continuation line, or we're in a string, use line as MSL. - " Otherwise, terminate search as we have found our MSL already. - let line = getline(lnum) - let col = match(line, s:msl_regex) + 1 - if (col > 0 && !s:IsInStringOrComment(lnum, col)) || s:IsInString(lnum, strlen(line)) - let msl = lnum - else - " Don't use lines that are part of a one line scope as msl unless the - " flag in_one_line_scope is set to 1 - " - if a:in_one_line_scope - break - end - let msl_one_line = s:Match(lnum, s:one_line_scope_regex) - if msl_one_line == 0 - break - endif - endif - let lnum = s:PrevNonBlankNonString(lnum - 1) - endwhile - return msl -endfunction - -" Check if line 'lnum' has more opening brackets than closing ones. -function s:LineHasOpeningBrackets(lnum) - let open_0 = 0 - let open_2 = 0 - let open_4 = 0 - let line = getline(a:lnum) - let pos = match(line, '[][(){}]', 0) - while pos != -1 - if !s:IsInStringOrComment(a:lnum, pos + 1) - let idx = stridx('(){}[]', line[pos]) - if idx % 2 == 0 - let open_{idx} = open_{idx} + 1 - else - let open_{idx - 1} = open_{idx - 1} - 1 - endif - endif - let pos = match(line, '[][(){}]', pos + 1) - endwhile - return (open_0 > 0) . (open_2 > 0) . (open_4 > 0) -endfunction - -function s:Match(lnum, regex) - let col = match(getline(a:lnum), a:regex) + 1 - return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 -endfunction - -function s:IndentWithContinuation(lnum, ind, width) - " Set up variables to use and search for MSL to the previous line. - let p_lnum = a:lnum - let lnum = s:GetMSL(a:lnum, 1) - let line = getline(line) - - " If the previous line wasn't a MSL and is continuation return its indent. - " TODO: the || s:IsInString() thing worries me a bit. - if p_lnum != lnum - if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line)) - return a:ind + a:width - endif - endif - - " Set up more variables now that we know we aren't continuation bound. - let msl_ind = indent(lnum) - - " If the previous line ended with [*+/.-=], start a continuation that - " indents an extra level. - if s:Match(lnum, s:continuation_regex) - if lnum == p_lnum - return msl_ind + a:width - else - return msl_ind - endif - endif - - return a:ind -endfunction - -function s:InOneLineScope(lnum) - let msl = s:GetMSL(a:lnum, 1) - if msl > 0 && s:Match(msl, s:one_line_scope_regex) - return msl - endif - return 0 -endfunction - -function s:ExitingOneLineScope(lnum) - let msl = s:GetMSL(a:lnum, 1) - if msl > 0 - " if the current line is in a one line scope .. - if s:Match(msl, s:one_line_scope_regex) - return 0 - else - let prev_msl = s:GetMSL(msl - 1, 1) - if s:Match(prev_msl, s:one_line_scope_regex) - return prev_msl - endif - endif - endif - return 0 -endfunction - -" 3. GetJavascriptIndent Function {{{1 -" ========================= - -function GetJavascriptIndent() - " 3.1. Setup {{{2 - " ---------- - - " Set up variables for restoring position in file. Could use v:lnum here. - let vcol = col('.') - - " 3.2. Work on the current line {{{2 - " ----------------------------- - - " Get the current line. - let line = getline(v:lnum) - let ind = -1 - - - " If we got a closing bracket on an empty line, find its match and indent - " according to it. For parentheses we indent to its column - 1, for the - " others we indent to the containing line's MSL's level. Return -1 if fail. - let col = matchend(line, '^\s*[]})]') - if col > 0 && !s:IsInStringOrComment(v:lnum, col) - call cursor(v:lnum, col) - let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) - if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 - if line[col-1]==')' && col('.') != col('$') - 1 - let ind = virtcol('.')-1 - else - let ind = indent(s:GetMSL(line('.'), 0)) - endif - endif - return ind - endif - - " If we have a /* or */ set indent to first column. - if match(line, '^\s*\%(/\*\|\*/\)$') != -1 - return 0 - endif - - " If we are in a multi-line string or line-comment, don't do anything to it. - if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1) - return indent('.') - endif - - " 3.3. Work on the previous line. {{{2 - " ------------------------------- - - " Find a non-blank, non-multi-line string line above the current line. - let lnum = s:PrevNonBlankNonString(v:lnum - 1) - - " If the line is empty and inside a string, use the previous line. - if line =~ '^\s*$' && lnum != prevnonblank(v:lnum - 1) - return indent(prevnonblank(v:lnum)) - endif - - " At the start of the file use zero indent. - if lnum == 0 - return 0 - endif - - " Set up variables for current line. - let line = getline(lnum) - let ind = indent(lnum) - - " If the previous line ended with a block opening, add a level of indent. - if s:Match(lnum, s:block_regex) - return indent(s:GetMSL(lnum, 0)) + &sw - endif - - " If the previous line contained an opening bracket, and we are still in it, - " add indent depending on the bracket type. - if line =~ '[[({]' - let counts = s:LineHasOpeningBrackets(lnum) - if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 - if col('.') + 1 == col('$') - return ind + &sw - else - return virtcol('.') - endif - elseif counts[1] == '1' || counts[2] == '1' - return ind + &sw - else - call cursor(v:lnum, vcol) - end - endif - - " 3.4. Work on the MSL line. {{{2 - " -------------------------- - - let ind_con = ind - let ind = s:IndentWithContinuation(lnum, ind_con, &sw) - - " }}}2 - " - " - let ols = s:InOneLineScope(lnum) - if ols > 0 - let ind = ind + &sw - else - let ols = s:ExitingOneLineScope(lnum) - while ols > 0 && ind > 0 - let ind = ind - &sw - let ols = s:InOneLineScope(ols - 1) - endwhile - endif - - return ind -endfunction - -" }}}1 - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim:set sw=2 sts=2 ts=8 noet: - diff --git a/.vim/indent/mako.vim b/.vim/indent/mako.vim deleted file mode 100644 index bd85ac5..0000000 --- a/.vim/indent/mako.vim +++ /dev/null @@ -1,353 +0,0 @@ -" Vim indent file -" Language: Mako -" Author: Scott Torborg -" Version: 0.4 -" License: Do What The Fuck You Want To Public License (WTFPL) -" -" --------------------------------------------------------------------------- -" -" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE -" Version 2, December 2004 -" -" Copyright (C) 2004 Sam Hocevar -" -" Everyone is permitted to copy and distribute verbatim or modified -" copies of this license document, and changing it is allowed as long -" as the name is changed. -" -" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE -" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -" -" 0. You just DO WHAT THE FUCK YOU WANT TO. -" -" --------------------------------------------------------------------------- -" -" This script does more useful indenting for Mako HTML templates. It indents -" inside of control blocks, defs, etc. Note that this indenting style will -" sacrifice readability of the output text for the sake of readability of the -" template. -" -" We'll use HTML indenting globally, python inside <% %> blocks. Inspired by -" the excellent PHP + HTML indentation files such as php.vim by Pim Snel. -" -" Changelog: -" 0.4 - 5 March 2010 -" - Added license information -" 0.3 - 15 September 2009 -" - Added explicit indenting for ## comments, fixed unindenting count, -" thanks to Mike Lewis (@MikeRLewis) for this -" 0.2 - 15 June 2009 -" - Fixed issue where opening and closing mako tags on the same line -" would cause incorrect indenting -" 0.1 - 06 June 2009 -" - Initial public release of mako indent file - -let sw=2 " default shiftwidth of 2 spaces - -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - -setlocal nosmartindent -setlocal noautoindent -setlocal nocindent -setlocal nolisp - -setlocal indentexpr=GetMakoIndent() -setlocal indentkeys+=*,<>>,,end,: - -" Only define the function once. -if exists("*GetMakoIndent") - finish -endif - -if exists('g:html_indent_tags') - unlet g:html_indent_tags -endif - -function IsInsidePythonBlock(startline) - " Loop until we get a line that's either <% or %> - let lnum = a:startline - while getline(lnum) !~ '\(%>\|<%\)$' && lnum > 0 - let lnum = lnum - 1 - endwhile - - " lnum points to the last control. If it's a <% then we're inside an - " embedded python block, otherwise we're not. - return getline(lnum) =~ '<%$' -endfunction - -function GetMakoIndent() - " Find a non-empty line above the current line - let lnum = prevnonblank(v:lnum - 1) - - " Hit the start of the file, use zero indent. - if lnum == 0 - return 0 - endif - - let line = getline(lnum) " last line - let cline = getline(v:lnum) " current line - let pline = getline(lnum - 1) " previous to last line - let ind = indent(lnum) - if line =~ '^\s*##' - return indent(lnum) - end - - let restore_ic=&ic - let &ic=1 " ignore case - - let ind = HtmlIndentSum(lnum, -1) - let ind = HtmlIndentSum(lnum, -1) - let ind = ind + HtmlIndentSum(v:lnum, 0) - - let &ic=restore_ic - - let ind = indent(lnum) + (&sw * ind) - - " Indent after %anything: or <%anything NOT ending in /> - if line =~ '^\s*%.*:\s*$' - let ind = ind + &sw - endif - - " Unindent before %end* or $' - let scanlnum = lnum - " Scan backwards until we find the beginning of this python block. - while getline(scanlnum) !~ '<%$' && scanlnum > 0 - let scanlnum = scanlnum - 1 - endwhile - let ind = indent(scanlnum) - endif - - " If we're inside a python block and the previous line ends in a colon, - " indent. - if IsInsidePythonBlock(lnum - 1) - " Indent after : - if line =~ '\:$' - let ind = ind + &sw - endif - endif - - return ind -endfunction - - -" [-- helper function to assemble tag list --] -fun! HtmlIndentPush(tag) - if exists('g:html_indent_tags') - let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag - else - let g:html_indent_tags = a:tag - endif -endfun - -fun! MakoIndentPush(tag) - if exists('g:mako_indent_tags') - let g:mako_indent_tags = g:mako_indent_tags.'\|'.a:tag - else - let g:mako_indent_tags = a:tag - endif -endfun - -" [-- --] -call HtmlIndentPush('a') -call HtmlIndentPush('abbr') -call HtmlIndentPush('acronym') -call HtmlIndentPush('address') -call HtmlIndentPush('b') -call HtmlIndentPush('bdo') -call HtmlIndentPush('big') -call HtmlIndentPush('blockquote') -call HtmlIndentPush('button') -call HtmlIndentPush('caption') -call HtmlIndentPush('center') -call HtmlIndentPush('cite') -call HtmlIndentPush('code') -call HtmlIndentPush('colgroup') -call HtmlIndentPush('del') -call HtmlIndentPush('dfn') -call HtmlIndentPush('dir') -call HtmlIndentPush('div') -call HtmlIndentPush('dl') -call HtmlIndentPush('em') -call HtmlIndentPush('fieldset') -call HtmlIndentPush('font') -call HtmlIndentPush('form') -call HtmlIndentPush('frameset') -call HtmlIndentPush('h1') -call HtmlIndentPush('h2') -call HtmlIndentPush('h3') -call HtmlIndentPush('h4') -call HtmlIndentPush('h5') -call HtmlIndentPush('h6') -call HtmlIndentPush('i') -call HtmlIndentPush('iframe') -call HtmlIndentPush('ins') -call HtmlIndentPush('kbd') -call HtmlIndentPush('label') -call HtmlIndentPush('legend') -call HtmlIndentPush('map') -call HtmlIndentPush('menu') -call HtmlIndentPush('noframes') -call HtmlIndentPush('noscript') -call HtmlIndentPush('object') -call HtmlIndentPush('ol') -call HtmlIndentPush('optgroup') -call HtmlIndentPush('pre') -call HtmlIndentPush('q') -call HtmlIndentPush('s') -call HtmlIndentPush('samp') -call HtmlIndentPush('script') -call HtmlIndentPush('select') -call HtmlIndentPush('small') -call HtmlIndentPush('span') -call HtmlIndentPush('strong') -call HtmlIndentPush('style') -call HtmlIndentPush('sub') -call HtmlIndentPush('sup') -call HtmlIndentPush('table') -call HtmlIndentPush('textarea') -call HtmlIndentPush('title') -call HtmlIndentPush('tt') -call HtmlIndentPush('u') -call HtmlIndentPush('ul') -call HtmlIndentPush('var') - -" For some reason the default HTML indentation script doesn't consider these -" elements to be worthy of indentation. -call HtmlIndentPush('p') -call HtmlIndentPush('dt') -call HtmlIndentPush('dd') - - -" [-- --] -if !exists('g:html_indent_strict') - call HtmlIndentPush('body') - call HtmlIndentPush('head') - call HtmlIndentPush('html') - call HtmlIndentPush('tbody') -endif - - -" [-- --] -if !exists('g:html_indent_strict_table') - call HtmlIndentPush('th') - call HtmlIndentPush('td') - call HtmlIndentPush('tr') - call HtmlIndentPush('tfoot') - call HtmlIndentPush('thead') -endif - -" [-- --] -call MakoIndentPush('%def') -call MakoIndentPush('%call') -call MakoIndentPush('%doc') -call MakoIndentPush('%text') -call MakoIndentPush('%.\+:.\+') - -delfun HtmlIndentPush -delfun MakoIndentPush - -set cpo-=C - -" [-- get number of regex matches in a string --] -fun! MatchCount(expr, pat) - let mpos = 0 - let mcount = 0 - let expr = a:expr - while (mpos > -1) - let mend = matchend(expr, a:pat) - if mend > -1 - let mcount = mcount + 1 - endif - if mend == mpos - let mpos = mpos + 1 - else - let mpos = mend - endif - let expr = strpart(expr, mpos) - endwhile - return mcount -endfun - -" [-- count indent-increasing tags of line a:lnum --] -fun! HtmlIndentOpen(lnum) - let s = substitute('x'.getline(a:lnum), - \ '.\{-}\(\(<\)\('.g:html_indent_tags.'\)\>\)', "\1", 'g') - let s = substitute(s, "[^\1].*$", '', '') - return strlen(s) -endfun - -" [-- count indent-decreasing tags of line a:lnum --] -fun! HtmlIndentClose(lnum) - let s = substitute('x'.getline(a:lnum), - \ '.\{-}\(\(<\)/\('.g:html_indent_tags.'\)\>>\)', "\1", 'g') - let s = substitute(s, "[^\1].*$", '', '') - return strlen(s) -endfun - -" [-- count indent-increasing mako tags of line a:lnum --] -fun! MakoIndentOpen(lnum) - let s = substitute('x'.getline(a:lnum), - \ '.\{-}\(\(<\)\('.g:mako_indent_tags.'\)\>\)', "\1", 'g') - let s = substitute(s, "[^\1].*$", '', '') - return strlen(s) -endfun - -" [-- count indent-decreasing mako tags of line a:lnum --] -fun! MakoIndentClose(lnum) - let mcount = MatchCount(getline(a:lnum), '') - let mcount = mcount + MatchCount(getline(a:lnum), '<\('.g:mako_indent_tags.'\)[^>]*/>') - return mcount -endfun - -" [-- count indent-increasing '{' of (java|css) line a:lnum --] -fun! HtmlIndentOpenAlt(lnum) - return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g')) -endfun - -" [-- count indent-decreasing '}' of (java|css) line a:lnum --] -fun! HtmlIndentCloseAlt(lnum) - return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g')) -endfun - -" [-- return the sum of indents respecting the syntax of a:lnum --] -fun! HtmlIndentSum(lnum, style) - let open = HtmlIndentOpen(a:lnum) + MakoIndentOpen(a:lnum) - let close = HtmlIndentClose(a:lnum) + MakoIndentClose(a:lnum) - if a:style == match(getline(a:lnum), '^\s*HtmlIndentOpenAlt(a:lnum) - HtmlIndentCloseAlt(a:lnum) - endif - endif - return 0 -endfun - -" vim: set ts=4 sw=4: diff --git a/.vim/indent/python.vim b/.vim/indent/python.vim deleted file mode 100644 index 32c773c..0000000 --- a/.vim/indent/python.vim +++ /dev/null @@ -1,196 +0,0 @@ -" Python indent file -" Language: Python -" Maintainer: Eric Mc Sween -" Original Author: David Bustos -" Last Change: 2004 Jun 07 - -" Only load this indent file when no other was loaded. -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - -setlocal expandtab -setlocal nolisp -setlocal autoindent -setlocal indentexpr=GetPythonIndent(v:lnum) -setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif,=except - -let s:maxoff = 50 - -" Find backwards the closest open parenthesis/bracket/brace. -function! s:SearchParensPair() - let line = line('.') - let col = col('.') - - " Skip strings and comments and don't look too far - let skip = "line('.') < " . (line - s:maxoff) . " ? dummy :" . - \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? ' . - \ '"string\\|comment"' - - " Search for parentheses - call cursor(line, col) - let parlnum = searchpair('(', '', ')', 'bW', skip) - let parcol = col('.') - - " Search for brackets - call cursor(line, col) - let par2lnum = searchpair('\[', '', '\]', 'bW', skip) - let par2col = col('.') - - " Search for braces - call cursor(line, col) - let par3lnum = searchpair('{', '', '}', 'bW', skip) - let par3col = col('.') - - " Get the closest match - if par2lnum > parlnum || (par2lnum == parlnum && par2col > parcol) - let parlnum = par2lnum - let parcol = par2col - endif - if par3lnum > parlnum || (par3lnum == parlnum && par3col > parcol) - let parlnum = par3lnum - let parcol = par3col - endif - - " Put the cursor on the match - if parlnum > 0 - call cursor(parlnum, parcol) - endif - return parlnum -endfunction - -" Find the start of a multi-line statement -function! s:StatementStart(lnum) - let lnum = a:lnum - while 1 - if getline(lnum - 1) =~ '\\$' - let lnum = lnum - 1 - else - call cursor(lnum, 1) - let maybe_lnum = s:SearchParensPair() - if maybe_lnum < 1 - return lnum - else - let lnum = maybe_lnum - endif - endif - endwhile -endfunction - -" Find the block starter that matches the current line -function! s:BlockStarter(lnum, block_start_re) - let lnum = a:lnum - let maxindent = 10000 " whatever - while lnum > 1 - let lnum = prevnonblank(lnum - 1) - if indent(lnum) < maxindent - if getline(lnum) =~ a:block_start_re - return lnum - else - let maxindent = indent(lnum) - " It's not worth going further if we reached the top level - if maxindent == 0 - return -1 - endif - endif - endif - endwhile - return -1 -endfunction - -function! GetPythonIndent(lnum) - - " First line has indent 0 - if a:lnum == 1 - return 0 - endif - - " If we can find an open parenthesis/bracket/brace, line up with it. - call cursor(a:lnum, 1) - let parlnum = s:SearchParensPair() - if parlnum > 0 - let parcol = col('.') - let closing_paren = match(getline(a:lnum), '^\s*[])}]') != -1 - if match(getline(parlnum), '[([{]\s*$', parcol - 1) != -1 - if closing_paren - return indent(parlnum) - else - return indent(parlnum) + &shiftwidth - endif - else - if closing_paren - return parcol - 1 - else - return parcol - endif - endif - endif - - " Examine this line - let thisline = getline(a:lnum) - let thisindent = indent(a:lnum) - - " If the line starts with 'elif' or 'else', line up with 'if' or 'elif' - if thisline =~ '^\s*\(elif\|else\)\>' - let bslnum = s:BlockStarter(a:lnum, '^\s*\(if\|elif\)\>') - if bslnum > 0 - return indent(bslnum) - else - return -1 - endif - endif - - " If the line starts with 'except' or 'finally', line up with 'try' - " or 'except' - if thisline =~ '^\s*\(except\|finally\)\>' - let bslnum = s:BlockStarter(a:lnum, '^\s*\(try\|except\)\>') - if bslnum > 0 - return indent(bslnum) - else - return -1 - endif - endif - - " Examine previous line - let plnum = a:lnum - 1 - let pline = getline(plnum) - let sslnum = s:StatementStart(plnum) - - " If the previous line is blank, keep the same indentation - if pline =~ '^\s*$' - return -1 - endif - - " If this line is explicitly joined, try to find an indentation that looks - " good. - if pline =~ '\\$' - let compound_statement = '^\s*\(if\|while\|for\s.*\sin\|except\)\s*' - let maybe_indent = matchend(getline(sslnum), compound_statement) - if maybe_indent != -1 - return maybe_indent - else - return indent(sslnum) + &sw * 2 - endif - endif - - " If the previous line ended with a colon, indent relative to - " statement start. - if pline =~ ':\s*$' - return indent(sslnum) + &sw - endif - - " If the previous line was a stop-execution statement or a pass - if getline(sslnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' - " See if the user has already dedented - if indent(a:lnum) > indent(sslnum) - &sw - " If not, recommend one dedent - return indent(sslnum) - &sw - endif - " Otherwise, trust the user - return -1 - endif - - " In all other cases, line up with the start of the previous statement. - return indent(sslnum) -endfunction diff --git a/.vim/indent/scala.vim b/.vim/indent/scala.vim deleted file mode 100644 index 2363b6b..0000000 --- a/.vim/indent/scala.vim +++ /dev/null @@ -1,85 +0,0 @@ -" Vim indent file -" Language : Scala (http://scala-lang.org/) -" Maintainer : Stefan Matthias Aust -" Last Change: 2006 Apr 13 -" Revision : $Id$ -" $URL$ - -if exists("b:did_indent") - finish -endif -let b:did_indent = 1 - -setlocal indentexpr=GetScalaIndent() - -setlocal indentkeys=0{,0},0),!^F,<>>, - -setlocal autoindent sw=2 et - -if exists("*GetScalaIndent") - finish -endif - -function! CountParens(line) - let line = substitute(a:line, '"\(.\|\\"\)*"', '', 'g') - let open = substitute(line, '[^(]', '', 'g') - let close = substitute(line, '[^)]', '', 'g') - return strlen(open) - strlen(close) -endfunction - -function! GetScalaIndent() - " Find a non-blank line above the current line. - let lnum = prevnonblank(v:lnum - 1) - - " Hit the start of the file, use zero indent. - if lnum == 0 - return 0 - endif - - let ind = indent(lnum) - let prevline = getline(lnum) - - "Indent html literals - if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$' - return ind + &shiftwidth - endif - - " Add a 'shiftwidth' after lines that start a block - " If if, for or while end with ), this is a one-line block - " If val, var, def end with =, this is a one-line block - if prevline =~ '^\s*\<\(\(else\s\+\)\?if\|for\|while\|va[lr]\|def\)\>.*[)=]\s*$' - \ || prevline =~ '^\s*\\s*$' - \ || prevline =~ '{\s*$' - let ind = ind + &shiftwidth - endif - - " If parenthesis are unbalanced, indent or dedent - let c = CountParens(prevline) - echo c - if c > 0 - let ind = ind + &shiftwidth - elseif c < 0 - let ind = ind - &shiftwidth - endif - - " Dedent after if, for, while and val, var, def without block - let pprevline = getline(prevnonblank(lnum - 1)) - if pprevline =~ '^\s*\<\(\(else\s\+\)\?if\|for\|while\|va[lr]\|def\)\>.*[)=]\s*$' - \ || pprevline =~ '^\s*\\s*$' - let ind = ind - &shiftwidth - endif - - " Align 'for' clauses nicely - if prevline =~ '^\s*\ (.*;\s*$' - let ind = ind - &shiftwidth + 5 - endif - - " Subtract a 'shiftwidth' on '}' or html - let thisline = getline(v:lnum) - if thisline =~ '^\s*[})]' - \ || thisline =~ '^\s*]*>' - let ind = ind - &shiftwidth - endif - - return ind -endfunction diff --git a/.vim/init.vim b/.vim/init.vim deleted file mode 100644 index f182e5b..0000000 --- a/.vim/init.vim +++ /dev/null @@ -1,3 +0,0 @@ -set runtimepath^=~/.vim runtimepath+=~/.vim/after -let &packpath = &runtimepath -source ~/.vimrc diff --git a/.vim/lua/lir_setup.lua b/.vim/lua/lir_setup.lua deleted file mode 100644 index e559e37..0000000 --- a/.vim/lua/lir_setup.lua +++ /dev/null @@ -1,88 +0,0 @@ -local actions = require 'lir.actions' -local mark_actions = require 'lir.mark.actions' -local clipboard_actions = require 'lir.clipboard.actions' - -require 'lir'.setup { - show_hidden_files = false, - ignore = { ".DS_Store" }, -- { ".DS_Store", "node_modules" } etc. - devicons = { - enable = true, - highlight_dirname = true - }, - mappings = { - ['l'] = actions.edit, - [''] = actions.edit, - [''] = actions.split, - [''] = actions.vsplit, - [''] = actions.tabedit, - - ['h'] = actions.up, - ['q'] = actions.quit, - - ['K'] = actions.mkdir, - ['N'] = actions.newfile, - ['R'] = actions.rename, - ['@'] = actions.cd, - ['Y'] = actions.yank_path, - ['.'] = actions.toggle_show_hidden, - ['D'] = actions.delete, - - ['J'] = function() - mark_actions.toggle_mark() - vim.cmd('normal! j') - end, - ['C'] = clipboard_actions.copy, - ['X'] = clipboard_actions.cut, - ['P'] = clipboard_actions.paste, - }, - float = { - winblend = 0, - curdir_window = { - enable = false, - highlight_dirname = false - }, - - -- -- You can define a function that returns a table to be passed as the third - -- -- argument of nvim_open_win(). - -- win_opts = function() - -- local width = math.floor(vim.o.columns * 0.8) - -- local height = math.floor(vim.o.lines * 0.8) - -- return { - -- border = { - -- "+", "─", "+", "│", "+", "─", "+", "│", - -- }, - -- width = width, - -- height = height, - -- row = 1, - -- col = math.floor((vim.o.columns - width) / 2), - -- } - -- end, - }, - hide_cursor = true -} - -vim.api.nvim_create_autocmd({ 'FileType' }, { - pattern = { "lir" }, - callback = function() - -- use visual mode - vim.api.nvim_buf_set_keymap( - 0, - "x", - "J", - ':lua require"lir.mark.actions".toggle_mark("v")', - { noremap = true, silent = true } - ) - - -- echo cwd - -- vim.api.nvim_echo({ { vim.fn.expand("%:p"), "Normal" } }, false, {}) - end -}) - --- custom folder icon -require 'nvim-web-devicons'.set_icon({ - lir_folder_icon = { - icon = "", - color = "#7ebae4", - name = "LirFolderNode" - } -}) diff --git a/.vim/lua/lualine_setup.lua b/.vim/lua/lualine_setup.lua deleted file mode 100644 index b99cd3e..0000000 --- a/.vim/lua/lualine_setup.lua +++ /dev/null @@ -1,28 +0,0 @@ -require('lsp-progress').setup({ - -}) - -local config = { - sections = { - lualine_c = { - 'filename', - function() - return require('lsp-progress').progress() - end, - }, - lualine_x = { - 'filetype', - } - } -} - ---local function ins_left(component) ---table.insert(config.sections.lualine_c, component) ---end - ---ins_left({ ---'lsp_progress', ---display_components = { 'lsp_client_name', { 'percentage' } } ---}) - -require('lualine').setup(config) diff --git a/.vim/markdown_cheatsheet.md b/.vim/markdown_cheatsheet.md deleted file mode 100644 index d767f50..0000000 --- a/.vim/markdown_cheatsheet.md +++ /dev/null @@ -1,376 +0,0 @@ -vim: set syntax=markdown: - -This is intended as a quick reference and showcase. For more complete info, see [John Gruber's original spec](http://daringfireball.net/projects/markdown/) and the [Github-flavored Markdown info page](http://github.github.com/github-flavored-markdown/). - -Note that there is also a [Cheatsheet specific to Markdown Here](./Markdown-Here-Cheatsheet) if that's what you're looking for. - -You can play around with Markdown on our [live demo page](http://www.markdown-here.com/livedemo.html). - -##### Table of Contents -[Headers](#headers) -[Emphasis](#emphasis) -[Lists](#lists) -[Links](#links) -[Images](#images) -[Code and Syntax Highlighting](#code) -[Tables](#tables) -[Blockquotes](#blockquotes) -[Inline HTML](#html) -[Horizontal Rule](#hr) -[Line Breaks](#lines) -[Youtube videos](#videos) - - -## Headers - -```no-highlight -# H1 -## H2 -### H3 -#### H4 -##### H5 -###### H6 - -Alternatively, for H1 and H2, an underline-ish style: - -Alt-H1 -====== - -Alt-H2 ------- -``` - -# H1 -## H2 -### H3 -#### H4 -##### H5 -###### H6 - -Alternatively, for H1 and H2, an underline-ish style: - -Alt-H1 -====== - -Alt-H2 ------- - - -## Emphasis - -```no-highlight -Emphasis, aka italics, with *asterisks* or _underscores_. - -Strong emphasis, aka bold, with **asterisks** or __underscores__. - -Combined emphasis with **asterisks and _underscores_**. - -Strikethrough uses two tildes. ~~Scratch this.~~ -``` - -Emphasis, aka italics, with *asterisks* or _underscores_. - -Strong emphasis, aka bold, with **asterisks** or __underscores__. - -Combined emphasis with **asterisks and _underscores_**. - -Strikethrough uses two tildes. ~~Scratch this.~~ - - - -## Lists - -```no-highlight -1. First ordered list item -2. Another item - * Unordered sub-list. -1. Actual numbers don't matter, just that it's a number - 1. Ordered sub-list -4. And another item. - - Some text that should be aligned with the above item. - -* Unordered list can use asterisks -- Or minuses -+ Or pluses -``` - -1. First ordered list item -2. Another item - * Unordered sub-list. -1. Actual numbers don't matter, just that it's a number - 1. Ordered sub-list -4. And another item. - - Some text that should be aligned with the above item. - -* Unordered list can use asterisks -- Or minuses -+ Or pluses - - -## Links - -There are two ways to create links. - -```no-highlight -[I'm an inline-style link](https://www.google.com) - -[I'm a reference-style link][Arbitrary case-insensitive reference text] - -[I'm a relative reference to a repository file](../blob/master/LICENSE) - -[You can use numbers for reference-style link definitions][1] - -Or leave it empty and use the [link text itself][] - -Some text to show that the reference links can follow later. - -[arbitrary case-insensitive reference text]: https://www.mozilla.org -[1]: http://slashdot.org -[link text itself]: http://www.reddit.com -``` - -[I'm an inline-style link](https://www.google.com) - -[I'm a reference-style link][Arbitrary case-insensitive reference text] - -[I'm a relative reference to a repository file](../blob/master/LICENSE) - -[You can use numbers for reference-style link definitions][1] - -Or leave it empty and use the [link text itself][] - -Some text to show that the reference links can follow later. - -[arbitrary case-insensitive reference text]: https://www.mozilla.org -[1]: http://slashdot.org -[link text itself]: http://www.reddit.com - - -## Images - -```no-highlight -Here's our logo (hover to see the title text): - -Inline-style: -![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1") - -Reference-style: -![alt text][logo] - -[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2" -``` - -Here's our logo (hover to see the title text): - -Inline-style: -![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1") - -Reference-style: -![alt text][logo] - -[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2" - - -## Code and Syntax Highlighting - -Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and *Markdown Here* -- support syntax highlighting. *Markdown Here* supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html). - -```no-highlight -Inline `code` has `back-ticks around` it. -``` - -Inline `code` has `back-ticks around` it. - -Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting. - -```no-highlight - ```javascript - var s = "JavaScript syntax highlighting"; - alert(s); - ``` - - ```python - s = "Python syntax highlighting" - print s - ``` - - ``` - No language indicated, so no syntax highlighting. - But let's throw in a tag. - ``` -``` - -```javascript -var s = "JavaScript syntax highlighting"; -alert(s); -``` - -```python -s = "Python syntax highlighting" -print s -``` - -``` -No language indicated, so no syntax highlighting in Markdown Here (varies on Github). -But let's throw in a tag. -``` - -(Github Wiki pages don't seem to support syntax highlighting, so the above won't be colourful (the strings are not red, for example). Try it out in a *Markdown Here* email or a Github Markdown README or Github Issue -- you can preview a new Issue without submitting it.) - -Again, to see what languages are available for highlighting, and how to write those language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html). - - -## Tables - -Tables aren't part of the core Markdown spec, but they are part of GFM and *Markdown Here* supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application. - -```no-highlight -Colons can be used to align columns. - -| Tables | Are | Cool | -| ------------- |:-------------:| -----:| -| col 3 is | right-aligned | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | - -The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown. - -Markdown | Less | Pretty ---- | --- | --- -*Still* | `renders` | **nicely** -1 | 2 | 3 -``` - -Colons can be used to align columns. - -| Tables | Are | Cool | -| ------------- |:-------------:| -----:| -| col 3 is | right-aligned | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | - -The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown. - -Markdown | Less | Pretty ---- | --- | --- -*Still* | `renders` | **nicely** -1 | 2 | 3 - - -## Blockquotes - -```no-highlight -> Blockquotes are very handy in email to emulate reply text. -> This line is part of the same quote. - -Quote break. - -> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. -``` - -> Blockquotes are very handy in email to emulate reply text. -> This line is part of the same quote. - -Quote break. - -> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. - - -## Inline HTML - -You can also use raw HTML in your Markdown, and it'll mostly work pretty well. - -```no-highlight -
-
Definition list
-
Is something people use sometimes.
- -
Markdown in HTML
-
Does *not* work **very** well. Use HTML tags.
-
-``` - -
-
Definition list
-
Is something people use sometimes.
- -
Markdown in HTML
-
Does *not* work **very** well. Use HTML tags.
-
- -
-## Horizontal Rule - -``` -Three or more... - ---- - -Hyphens - -*** - -Asterisks - -___ - -Underscores -``` - -Three or more... - ---- - -Hyphens - -*** - -Asterisks - -___ - -Underscores - - -## Line Breaks - -My basic recommendation for learning how line breaks work is to experiment and discover -- hit <Enter> once (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You'll soon learn to get what you want. "Markdown Toggle" is your friend. - -Here are some things to try out: - -``` -Here's a line for us to start with. - -This line is separated from the one above by two newlines, so it will be a *separate paragraph*. - -This line is also a separate paragraph, but... -This line is only separated by a single newline, so it's a separate line in the *same paragraph*. -``` - -Here's a line for us to start with. - -This line is separated from the one above by two newlines, so it will be a *separate paragraph*. - -This line is also begins a separate paragraph, but... -This line is only separated by a single newline, so it's a separate line in the *same paragraph*. - -(Technical note: *Markdown Here* uses GFM line breaks, so there's no need to use MD's two-space line breaks.) - - -## Youtube videos - -They can't be added directly but you can add an image with a link to the video like this: - -```no-highlight - -``` - -Or, in pure Markdown, but losing the image sizing and border: - -```no-highlight -[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE) -``` diff --git a/.vim/nvim.lua b/.vim/nvim.lua deleted file mode 100644 index 272c22d..0000000 --- a/.vim/nvim.lua +++ /dev/null @@ -1,678 +0,0 @@ -require('nvim-autopairs').setup {} - --- nvim_lsp object -local nvim_lsp = require 'lspconfig' - --- function to attach completion when setting up lsp -local on_attach = function(client) -end - --- Set my preferred diagnostic options -local diagnostic_options = { - virtual_text = false, - signs = true, - update_in_insert = false, -} - -local rust_capabilities = vim.lsp.protocol.make_client_capabilities() -rust_capabilities.textDocument.completion.completionItem.snippetSupport = true -rust_capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - 'documentation', - 'detail', - 'additionalTextEdits', - } -} - -local default_capabilities = vim.lsp.protocol.make_client_capabilities() -default_capabilities.textDocument.completion.completionItem.snippetSupport = true -default_capabilities.textDocument.completion.completionItem.resolveSupport = { - properties = { - 'documentation', - 'detail', - 'additionalTextEdits', - } -} - --- Enable rust_analyzer -nvim_lsp.rust_analyzer.setup({ - on_attach = function(client, bufnr) - client.server_capabilities.semanticTokensProvider = nil - end, - capabilities = rust_capabilities, - settings = { - ['rust-analyzer'] = { - checkOnSave = { - allFeatures = true, - overrideCommand = { - 'cargo', 'clippy', '--workspace', '--message-format=json', - '--all-targets', '--all-features' - } - }, - runnables = { - extraEnv = { - TORCH_CUDA_VERSION = "cu121", - } - } - } - } -}) -nvim_lsp.gopls.setup({ - on_attach = function(client, bufnr) - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - --tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', }, - tokenTypes = { 'namespace' }, - tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', - 'modification', 'documentation', 'defaultLibrary', - }, - } - } - end, - settings = { - gopls = { - semanticTokens = true, - }, - }, -}) - -local function filter(arr, func) - -- Filter in place - -- https://stackoverflow.com/questions/49709998/how-to-filter-a-lua-array-inplace - local new_index = 1 - local size_orig = #arr - for old_index, v in ipairs(arr) do - if func(v, old_index) then - arr[new_index] = v - new_index = new_index + 1 - end - end - for i = new_index, size_orig do arr[i] = nil end -end - -local function pyright_accessed_filter(diagnostic) - -- Allow kwargs to be unused, sometimes you want many functions to take the - -- same arguments but you don't use all the arguments in all the functions, - -- so kwargs is used to suck up all the extras - if diagnostic.message == '"kwargs" is not accessed' then - return false - end - -- Allow variables starting with an underscore - if string.match(diagnostic.message, '"_.+" is not accessed') then - return false - end - - return true -end - -local function pyright_custom_diagnostic(a, params, client_id, c, config) - filter(params.diagnostics, pyright_accessed_filter) - vim.lsp.diagnostic.on_publish_diagnostics(a, params, client_id, c, config) -end - -nvim_lsp.pyright.setup({ - on_attach = function(client, bufnr) - vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(pyright_custom_diagnostic, diagnostic_options) - end -}) ---nvim_lsp.pyright.setup({ on_attach = on_attach }) ---nvim_lsp.pylsp.setup({ ---on_attach = on_attach, ---settings = { ---pylsp = { ---plugins = { ----- formatter options -----black = { enabled = true }, ---autopep8 = { enabled = false }, ---yapf = { enabled = false }, ----- linter options ---pylint = { enabled = false, executable = "pylint" }, ---pyflakes = { enabled = false }, ---pycodestyle = { enabled = false }, ----- type checker ---pylsp_mypy = { enabled = true }, ----- auto-completion options ---jedi_completion = { enabled = false }, ----- import sorting -----pyls_isort = { enabled = true }, -----flake8 = { -----maxLineLength = 100, -----}, ---pycodestyle = { ---maxLineLength = 100, ---}, -----rope_autoimport = { -----enabled = true -----}, -----rope_completion = { -----enabled = true -----}, ---} ---} ---} ---}) - -nvim_lsp.clangd.setup({ on_attach = on_attach }) -nvim_lsp.tsserver.setup { - cmd = { "/home/barak/.yarn/bin/typescript-language-server", "--stdio" } -} -nvim_lsp.vuels.setup { - cmd = { "/home/barak/.yarn/bin/vls" } -} -nvim_lsp.hls.setup { - cmd = { "haskell-language-server-wrapper", "--lsp" } -} - -nvim_lsp.svelte.setup { - cmd = { "/home/barak/.bun/bin/bunx", "svelteserver", "--stdio" } -} - -local runtime_path = vim.split(package.path, ';') -table.insert(runtime_path, "lua/?.lua") -table.insert(runtime_path, "lua/?/init.lua") - -require 'lspconfig'.lua_ls.setup { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = runtime_path, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, -} - - -require('go').setup({ - iferr_vertical_shift = 2 -}) - -require('telescope').load_extension('goimpl') - -function org_imports(wait_ms) - local params = vim.lsp.util.make_range_params() - - params.context = { only = { "source.organizeImports" } } - - local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, wait_ms) - - for _, res in pairs(result or {}) do - for _, r in pairs(res.result or {}) do - if r.edit then - vim.lsp.util.apply_workspace_edit(r.edit, "utf-8") - else - vim.lsp.buf.execute_command(r.command) - end - end - end -end - --- register linters -local luaformat = require("efmls-configs.formatters.lua_format") -local rustfmt = require('efmls-configs.formatters.rustfmt') -local black = require('efmls-configs.formatters.black') -local mypy = require('efmls-configs.linters.mypy') -local eslint = require('efmls-configs.linters.eslint') -local isort = require('efmls-configs.formatters.isort') -local languages = { - typescript = { eslint }, - lua = { luaformat }, - python = { black, mypy, isort }, - rust = { rustfmt }, -} - -local efmls_config = { - filetypes = vim.tbl_keys(languages), - settings = { - rootMarkers = { '.git/' }, - languages = languages, - }, - init_options = { - documentFormatting = true, - documentRangeFormatting = true, - }, -} - -require('lspconfig').efm.setup(vim.tbl_extend('force', efmls_config, { - -- Pass your custom lsp config below like on_attach and capabilities - on_attach = on_attach, - capabilities = default_capabilities, -})) - --- Enable diagnostics -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, - diagnostic_options -) - --- Compe setup -require 'compe'.setup { - enabled = true, - autocomplete = true, - debug = false, - min_length = 1, - preselect = 'disable', - throttle_time = 80, - source_timeout = 200, - incomplete_delay = 400, - max_abbr_width = 100, - max_kind_width = 100, - max_menu_width = 100, - documentation = true, - - source = { - path = true, - nvim_lsp = true, - }, -} - ---signature_cfg = { ---hint_enable = true, ---hint_prefix = "% ", ---handler_opts = { ---border = "none" ---}, ---} - ---require'lsp_signature'.on_attach(signature_cfg) - -local saga_cfg = { - code_action_prompt = { - enable = false, - sign = false, - virtual_text = false, - }, -} --- require'lspsaga'.init_lsp_saga(saga_cfg) - -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -local check_back_space = function() - local col = vim.fn.col('.') - 1 - if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then - return true - else - return false - end -end - --- Use (s-)tab to: ---- move to prev/next item in completion menuone ---- jump to prev/next snippet's placeholder -_G.tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - elseif check_back_space() then - return t "" - else - return vim.fn['compe#complete']() - end -end - -_G.s_tab_complete = function() - if vim.fn.pumvisible() == 1 then - return t "" - else - return t "" - end -end - -vim.api.nvim_set_keymap("i", "", "v:lua.tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("s", "", "v:lua.tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("i", "", "v:lua.s_tab_complete()", { expr = true }) -vim.api.nvim_set_keymap("s", "", "v:lua.s_tab_complete()", { expr = true }) - -require('lspkind').init({ - -- disables text annotations - --with_text = false, - --with_text = true, - - -- defines how annotations are shown - -- default: symbol - -- options: 'text', 'text_symbol', 'symbol_text', 'symbol' - mode = 'symbol', - - -- default symbol map - -- can be either 'default' or 'codicons' - preset = 'default', - - -- override preset symbols - -- default: {} - --symbol_map = { - --Method = 'm', - --Function = 'f', - --Text = 'txt', - --Constructor = 'new', - --Variable = 'var', - --Class = 'cls', - --Interface = 'iface', - --Module = 'mod', - --Property = 'prop', - --Unit = 'unit', - --Value = 'val', - --Enum = 'enum', - --Keyword = 'kw', - --Snippet = 'sn', - --Color = 'color', - --File = 'file', - --Folder = 'fold', - --EnumMember = 'enum', - --Constant = 'const', - --Struct = 'struct', - --}, -}) - ---require('rust-tools').setup({ ---}) - -require('trouble').setup { - mode = "document_diagnostics", - auto_close = true, - action_keys = { -- key mappings for actions in the trouble list - -- map to {} to remove a mapping, for example: - -- close = {}, - --close = "q", -- close the list - --cancel = "", -- cancel the preview and get back to your last window / buffer / cursor - --refresh = "r", -- manually refresh - jump = { "o", "" }, -- jump to the diagnostic or open / close folds - --open_split = { "" }, -- open buffer in new split - --open_vsplit = { "" }, -- open buffer in new vsplit - open_tab = {}, -- open buffer in new tab - jump_close = { "" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location - close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds - toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j" -- next item - }, -} - -local trouble_telescope = require("trouble.providers.telescope") -local builtin = require 'telescope.builtin' - -local sendtoqf = function(loc) - local actions = require('telescope.actions') - actions.send_to_qflist(loc) - builtin.quickfix({ initial_mode = "normal" }) -end - -require('telescope').setup { - defaults = { - mappings = { - n = { - ["q"] = require('telescope.actions').close, - ["ff"] = sendtoqf, - [""] = trouble_telescope.open_with_trouble, - }, - i = { - [""] = trouble_telescope.open_with_trouble, - ["ff"] = require('telescope.actions').send_to_qflist, - }, - }, - path_display = { "smart", "shorten" }, - dynamic_preview_title = true, - }, - pickers = { - goimpl = { - theme = "ivy", - layout_config = { - height = 10, - }, - }, - lsp_code_actions = { - theme = "ivy", - layout_config = { - height = 10, - }, - }, - lsp_range_code_actions = { - theme = "ivy", - layout_config = { - height = 10, - }, - }, - lsp_references = { - theme = "ivy", - layout_config = { - height = 15, - }, - }, - quickfix = { - theme = "ivy", - layout_config = { - height = 15, - }, - initial_mode = "normal", - }, - git_files = { - theme = "ivy", - }, - grep_string = { - theme = "ivy", - layout_config = { - height = 15, - }, - initial_mode = "normal", - }, - live_grep = { - theme = "ivy", - layout_config = { - height = 15, - }, - }, - buffers = { - theme = "ivy", - layout_config = { - height = 15, - }, - ignore_current_buffer = true, - initial_mode = "normal", - }, - }, -} - - --- --- Treesitter --- - -require 'nvim-treesitter.configs'.setup { - -- One of "all", "maintained" (parsers with maintainers), or a list of languages - ensure_installed = { - "c", - "cpp", - "css", - "dockerfile", - "fish", - "go", - "haskell", - "html", - "javascript", - "json", - "lua", - "make", - "markdown", - "proto", - "python", - "query", - "rust", - "terraform", - "toml", - "tsx", - "typescript", - "vim", - "yaml", - }, - - -- Install languages synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- List of parsers to ignore installing - -- ignore_install = { "javascript" }, - - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- list of language that will be disabled - -- disable = { "c", "rust" }, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - --custom_captures = { - --["generic_type_param"] = "TSCGenericTypeParam", - --["type_identifier"] = "TSCGenericTypeParam", - --}, - }, - - indent = { - enable = true - }, - - playground = { - enable = true, - disable = {}, - updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code - persist_queries = false, -- Whether the query persists across vim sessions - keybindings = { - toggle_query_editor = 'o', - toggle_hl_groups = 'i', - toggle_injected_languages = 't', - toggle_anonymous_nodes = 'a', - toggle_language_display = 'I', - focus_language = 'f', - unfocus_language = 'F', - update = 'R', - goto_node = '', - show_help = '?', - }, - } -} - -require "neogen".setup {} - -require('leap').set_default_keymaps() -require("flit").setup {} - -require('snippy').setup({ - mappings = { - is = { - [',,'] = 'expand_or_advance', - [',.'] = 'previous', - }, - nx = { - ['x'] = 'cut_text', - }, - }, -}) - - ---- ---- My own "where" clause generator for Rust ---- -function string.insert(str1, str2, pos) - return str1:sub(1, pos) .. str2 .. str1:sub(pos + 1) -end - -function string.split(s, delimiter) - local result = {}; - for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do - table.insert(result, match); - end - return result; -end - -local function rust_whereify_line(line, var_name) - if string.find(line, "fn") == nil then - return nil - end - - local paren = string.find(line, "%(") - if paren == nil then return nil end - - local open_generic = string.find(line, "<") - if open_generic ~= nil then - if open_generic < paren then - -- TODO(barakmich): it's already generic, we need to do something for that - -- probably a different function - return nil - end - -- just continue otherwise - end - - local whitespace = string.match(line, "^(%s*)") - - local generic = "<" .. var_name .. ">" - local out = string.insert(line, generic, paren - 1) - - local brace = string.find(out, "%{") - if brace == nil then brace = string.len(out) end - - out = string.insert(out, "\n" .. whitespace .. "where\n" .. whitespace .. " " .. var_name .. ": ,\n" .. whitespace, - brace - 1) - - return string.split(out, "\n") -end - -function rust_where_at_line() - local var_name = vim.fn.input("Variable: ") - local lineNum, col = unpack(vim.api.nvim_win_get_cursor(0)) - local replacements = rust_whereify_line(vim.api.nvim_get_current_line(), var_name) - vim.api.nvim_buf_set_lines(0, lineNum - 1, lineNum, false, replacements) - vim.api.nvim_win_set_cursor(0, { lineNum + 2, 4 }) -end - -function neogen_dwim() - local table = { - ["function_declaration"] = "func", - ["function_definition"] = "func", - ["function_item"] = "func", - ["function_signature_item"] = "func", - ["struct_item"] = "class", - ["trait_item"] = "class", - ["package_clause"] = "type", - ["const_declaration"] = "type", - ["var_declaration"] = "type", - ["class_definition"] = "class", - } - - local ts_utils = require 'nvim-treesitter.ts_utils' - local current_node = ts_utils.get_node_at_cursor() - while (current_node) do - local v = table[current_node:type()] - if v then - require('neogen').generate({ type = v }) - break - else - current_node = current_node:parent() - end - end -end - -require("murdock") -require("lir_setup") -require("lualine_setup") diff --git a/.vim/plugin/AppleT.vim b/.vim/plugin/AppleT.vim deleted file mode 100644 index c3d90fa..0000000 --- a/.vim/plugin/AppleT.vim +++ /dev/null @@ -1,73 +0,0 @@ -function! AppleT(name) -python << EOF -import sys -import os -import re -import vim - -def walkIt(search): - fullpath = os.path.expanduser(set_path) - fullsearch = ".*%s.*" % ".*".join(search) - fullsearch = re.sub(" ","[/.]", fullsearch) - bsearch = re.sub(" ",".*[/.].*", search) - exactsearch = "%s" % bsearch - exclude = re.compile("\.quer$|\.resp$|\.pyc$") - ignoredirs = [".svn", "_site-packages"] - fullmatch = re.compile(fullsearch, re.I) - exactmatch = re.compile(exactsearch, re.I) - length = len(fullpath) - - results = [] - exactresults = [] - - for root, dirs, files in os.walk(set_path): - for x in ignoredirs: - if x in dirs: - dirs.remove(x) - for f in files: - filename = os.path.join(root,f) - if exclude.search(filename): - pass - elif exactmatch.search(filename): - exactresults.append("%s" % filename) - elif fullmatch.search(filename): - results.append("%s" % filename) - - if len(results) == 0: - return - - def cmplen(x,y): - return cmp(len(x), len(y)) - - results.sort(cmplen) - exactresults.sort(cmplen) - results = exactresults + results - - for i, a in enumerate(results): - print "%d: %s" % (i + 1, a[length:]) - - which = vim.eval('input("Which? ")') - if re.match("^[0-9]+$", which) == None: - return - which = int(which) - 1 - vim.command("tabnew " + results[which]) - -thingtosearch = vim.eval("expand(a:name)") -walkIt(thingtosearch) - -EOF -endfunction - -function! AppleTSetPath(path) -python << EOF -import vim -set_path = vim.eval("expand(a:path)") -EOF -endfunction - -if !exists(":AppleTSetPath") - command! -nargs=+ AppleTSetPath :call AppleTSetPath() -endif -if !exists(":CmdT") - command! -nargs=+ CmdT :call AppleT() -endif diff --git a/.vim/plugin/a.vim b/.vim/plugin/a.vim deleted file mode 100644 index 637feb5..0000000 --- a/.vim/plugin/a.vim +++ /dev/null @@ -1,840 +0,0 @@ -" Copyright (c) 1998-2006 -" Michael Sharpe -" -" We grant permission to use, copy modify, distribute, and sell this -" software for any purpose without fee, provided that the above copyright -" notice and this text are not removed. We make no guarantee about the -" suitability of this software for any purpose and we are not liable -" for any damages resulting from its use. Further, we are under no -" obligation to maintain or extend this software. It is provided on an -" "as is" basis without any expressed or implied warranty. - -" Directory & regex enhancements added by Bindu Wavell who is well known on -" vim.sf.net -" -" Patch for spaces in files/directories from Nathan Stien (also reported by -" Soeren Sonnenburg) - -" Do not load a.vim if is has already been loaded. -if exists("loaded_alternateFile") - finish -endif -if (v:progname == "ex") - finish -endif -let loaded_alternateFile = 1 - -let alternateExtensionsDict = {} - -" setup the default set of alternate extensions. The user can override in thier -" .vimrc if the defaults are not suitable. To override in a .vimrc simply set a -" g:alternateExtensions_ variable to a comma separated list of alternates, -" where is the extension to map. -" E.g. let g:alternateExtensions_CPP = "inc,h,H,HPP,hpp" -" let g:alternateExtensions_{'aspx.cs'} = "aspx" - - -" This variable will be increased when an extension with greater number of dots -" is added by the AddAlternateExtensionMapping call. -let s:maxDotsInExtension = 1 - -" Function : AddAlternateExtensionMapping (PRIVATE) -" Purpose : simple helper function to add the default alternate extension -" mappings. -" Args : extension -- the extension to map -" alternates -- comma separated list of alternates extensions -" Returns : nothing -" Author : Michael Sharpe -function! AddAlternateExtensionMapping(extension, alternates) - " This code does not actually work for variables like foo{'a.b.c.d.e'} - "let varName = "g:alternateExtensions_" . a:extension - "if (!exists(varName)) - " let g:alternateExtensions_{a:extension} = a:alternates - "endif - - " This code handles extensions which contains a dot. exists() fails with - " such names. - "let v:errmsg = "" - " FIXME this line causes ex to return 1 instead of 0 for some reason?? - "silent! echo g:alternateExtensions_{a:extension} - "if (v:errmsg != "") - "let g:alternateExtensions_{a:extension} = a:alternates - "endif - - let g:alternateExtensionsDict[a:extension] = a:alternates - let dotsNumber = strlen(substitute(a:extension, "[^.]", "", "g")) - if s:maxDotsInExtension < dotsNumber - let s:maxDotsInExtension = dotsNumber - endif -endfunction - - -" Add all the default extensions -" Mappings for C and C++ -call AddAlternateExtensionMapping('h',"c,cpp,cxx,cc,CC") -call AddAlternateExtensionMapping('H',"C,CPP,CXX,CC") -call AddAlternateExtensionMapping('hpp',"cpp,c") -call AddAlternateExtensionMapping('HPP',"CPP,C") -call AddAlternateExtensionMapping('c',"h") -call AddAlternateExtensionMapping('C',"H") -call AddAlternateExtensionMapping('cpp',"h,hpp") -call AddAlternateExtensionMapping('CPP',"H,HPP") -call AddAlternateExtensionMapping('cc',"h") -call AddAlternateExtensionMapping('CC',"H,h") -call AddAlternateExtensionMapping('cxx',"h") -call AddAlternateExtensionMapping('CXX',"H") -" Mappings for PSL7 -call AddAlternateExtensionMapping('psl',"ph") -call AddAlternateExtensionMapping('ph',"psl") -" Mappings for ADA -call AddAlternateExtensionMapping('adb',"ads") -call AddAlternateExtensionMapping('ads',"adb") -" Mappings for lex and yacc files -call AddAlternateExtensionMapping('l',"y,yacc,ypp") -call AddAlternateExtensionMapping('lex',"yacc,y,ypp") -call AddAlternateExtensionMapping('lpp',"ypp,y,yacc") -call AddAlternateExtensionMapping('y',"l,lex,lpp") -call AddAlternateExtensionMapping('yacc',"lex,l,lpp") -call AddAlternateExtensionMapping('ypp',"lpp,l,lex") -" Mappings for OCaml -call AddAlternateExtensionMapping('ml',"mli") -call AddAlternateExtensionMapping('mli',"ml") -" ASP stuff -call AddAlternateExtensionMapping('aspx.cs', 'aspx') -call AddAlternateExtensionMapping('aspx.vb', 'aspx') -call AddAlternateExtensionMapping('aspx', 'aspx.cs,aspx.vb') - -" Setup default search path, unless the user has specified -" a path in their [._]vimrc. -if (!exists('g:alternateSearchPath')) - let g:alternateSearchPath = 'sfr:../source,sfr:../src,sfr:../include,sfr:../inc' -endif - -" If this variable is true then a.vim will not alternate to a file/buffer which -" does not exist. E.g while editing a.c and the :A will not swtich to a.h -" unless it exists. -if (!exists('g:alternateNoDefaultAlternate')) - " by default a.vim will alternate to a file which does not exist - let g:alternateNoDefaultAlternate = 0 -endif - -" If this variable is true then a.vim will convert the alternate filename to a -" filename relative to the current working directory. -" Feature by Nathan Huizinga -if (!exists('g:alternateRelativeFiles')) - " by default a.vim will not convert the filename to one relative to the - " current working directory - let g:alternateRelativeFiles = 0 -endif - - -" Function : GetNthItemFromList (PRIVATE) -" Purpose : Support reading items from a comma seperated list -" Used to iterate all the extensions in an extension spec -" Used to iterate all path prefixes -" Args : list -- the list (extension spec, file paths) to iterate -" n -- the extension to get -" Returns : the nth item (extension, path) from the list (extension -" spec), or "" for failure -" Author : Michael Sharpe -" History : Renamed from GetNthExtensionFromSpec to GetNthItemFromList -" to reflect a more generic use of this function. -- Bindu -function! GetNthItemFromList(list, n) - let itemStart = 0 - let itemEnd = -1 - let pos = 0 - let item = "" - let i = 0 - while (i != a:n) - let itemStart = itemEnd + 1 - let itemEnd = match(a:list, ",", itemStart) - let i = i + 1 - if (itemEnd == -1) - if (i == a:n) - let itemEnd = strlen(a:list) - endif - break - endif - endwhile - if (itemEnd != -1) - let item = strpart(a:list, itemStart, itemEnd - itemStart) - endif - return item -endfunction - -" Function : ExpandAlternatePath (PRIVATE) -" Purpose : Expand path info. A path with a prefix of "wdr:" will be -" treated as relative to the working directory (i.e. the -" directory where vim was started.) A path prefix of "abs:" will -" be treated as absolute. No prefix or "sfr:" will result in the -" path being treated as relative to the source file (see sfPath -" argument). -" -" A prefix of "reg:" will treat the pathSpec as a regular -" expression substitution that is applied to the source file -" path. The format is: -" -" reg: -" -" seperator character, we often use one of [/|%#] -" is what you are looking for -" is the output pattern -" can be g for global replace or empty -" -" EXAMPLE: 'reg:/inc/src/g/' will replace every instance -" of 'inc' with 'src' in the source file path. It is possible -" to use match variables so you could do something like: -" 'reg:|src/\([^/]*\)|inc/\1||' (see 'help :substitute', -" 'help pattern' and 'help sub-replace-special' for more details -" -" NOTE: a.vim uses ',' (comma) internally so DON'T use it -" in your regular expressions or other pathSpecs unless you update -" the rest of the a.vim code to use some other seperator. -" -" Args : pathSpec -- path component (or substitution patterns) -" sfPath -- source file path -" Returns : a path that can be used by AlternateFile() -" Author : Bindu Wavell -function! ExpandAlternatePath(pathSpec, sfPath) - let prfx = strpart(a:pathSpec, 0, 4) - if (prfx == "wdr:" || prfx == "abs:") - let path = strpart(a:pathSpec, 4) - elseif (prfx == "reg:") - let re = strpart(a:pathSpec, 4) - let sep = strpart(re, 0, 1) - let patend = match(re, sep, 1) - let pat = strpart(re, 1, patend - 1) - let subend = match(re, sep, patend + 1) - let sub = strpart(re, patend+1, subend - patend - 1) - let flag = strpart(re, strlen(re) - 2) - if (flag == sep) - let flag = '' - endif - let path = substitute(a:sfPath, pat, sub, flag) - "call confirm('PAT: [' . pat . '] SUB: [' . sub . ']') - "call confirm(a:sfPath . ' => ' . path) - else - let path = a:pathSpec - if (prfx == "sfr:") - let path = strpart(path, 4) - endif - let path = a:sfPath . "/" . path - endif - return path -endfunction - -" Function : FindFileInSearchPath (PRIVATE) -" Purpose : Searches for a file in the search path list -" Args : filename -- name of the file to search for -" pathList -- the path list to search -" relPathBase -- the path which relative paths are expanded from -" Returns : An expanded filename if found, the empty string otherwise -" Author : Michael Sharpe (feline@irendi.com) -" History : inline code written by Bindu Wavell originally -function! FindFileInSearchPath(fileName, pathList, relPathBase) - let filepath = "" - let m = 1 - let pathListLen = strlen(a:pathList) - if (pathListLen > 0) - while (1) - let pathSpec = GetNthItemFromList(a:pathList, m) - if (pathSpec != "") - let path = ExpandAlternatePath(pathSpec, a:relPathBase) - let fullname = path . "/" . a:fileName - let foundMatch = BufferOrFileExists(fullname) - if (foundMatch) - let filepath = fullname - break - endif - else - break - endif - let m = m + 1 - endwhile - endif - return filepath -endfunction - -" Function : FindFileInSearchPathEx (PRIVATE) -" Purpose : Searches for a file in the search path list -" Args : filename -- name of the file to search for -" pathList -- the path list to search -" relPathBase -- the path which relative paths are expanded from -" count -- find the count'th occurence of the file on the path -" Returns : An expanded filename if found, the empty string otherwise -" Author : Michael Sharpe (feline@irendi.com) -" History : Based on FindFileInSearchPath() but with extensions -function! FindFileInSearchPathEx(fileName, pathList, relPathBase, count) - let filepath = "" - let m = 1 - let spath = "" - let pathListLen = strlen(a:pathList) - if (pathListLen > 0) - while (1) - let pathSpec = GetNthItemFromList(a:pathList, m) - if (pathSpec != "") - let path = ExpandAlternatePath(pathSpec, a:relPathBase) - if (spath != "") - let spath = spath . ',' - endif - let spath = spath . path - else - break - endif - let m = m + 1 - endwhile - endif - - if (&path != "") - if (spath != "") - let spath = spath . ',' - endif - let spath = spath . &path - endif - - let filepath = findfile(a:fileName, spath, a:count) - return filepath -endfunction - -" Function : EnumerateFilesByExtension (PRIVATE) -" Purpose : enumerates all files by a particular list of alternate extensions. -" Args : path -- path of a file (not including the file) -" baseName -- base name of the file to be expanded -" extension -- extension whose alternates are to be enumerated -" Returns : comma separated list of files with extensions -" Author : Michael Sharpe -function! EnumerateFilesByExtension(path, baseName, extension) - let enumeration = "" - let extSpec = "" - let v:errmsg = "" - silent! echo g:alternateExtensions_{a:extension} - if (v:errmsg == "") - let extSpec = g:alternateExtensions_{a:extension} - endif - if (extSpec == "") - if (has_key(g:alternateExtensionsDict, a:extension)) - let extSpec = g:alternateExtensionsDict[a:extension] - endif - endif - if (extSpec != "") - let n = 1 - let done = 0 - while (!done) - let ext = GetNthItemFromList(extSpec, n) - if (ext != "") - if (a:path != "") - let newFilename = a:path . "/" . a:baseName . "." . ext - else - let newFilename = a:baseName . "." . ext - endif - if (enumeration == "") - let enumeration = newFilename - else - let enumeration = enumeration . "," . newFilename - endif - else - let done = 1 - endif - let n = n + 1 - endwhile - endif - return enumeration -endfunction - -" Function : EnumerateFilesByExtensionInPath (PRIVATE) -" Purpose : enumerates all files by expanding the path list and the extension -" list. -" Args : baseName -- base name of the file -" extension -- extension whose alternates are to be enumerated -" pathList -- the list of paths to enumerate -" relPath -- the path of the current file for expansion of relative -" paths in the path list. -" Returns : A comma separated list of paths with extensions -" Author : Michael Sharpe -function! EnumerateFilesByExtensionInPath(baseName, extension, pathList, relPathBase) - let enumeration = "" - let filepath = "" - let m = 1 - let pathListLen = strlen(a:pathList) - if (pathListLen > 0) - while (1) - let pathSpec = GetNthItemFromList(a:pathList, m) - if (pathSpec != "") - let path = ExpandAlternatePath(pathSpec, a:relPathBase) - let pe = EnumerateFilesByExtension(path, a:baseName, a:extension) - if (enumeration == "") - let enumeration = pe - else - let enumeration = enumeration . "," . pe - endif - else - break - endif - let m = m + 1 - endwhile - endif - return enumeration -endfunction - -" Function : DetermineExtension (PRIVATE) -" Purpose : Determines the extension of a filename based on the register -" alternate extension. This allow extension which contain dots to -" be considered. E.g. foo.aspx.cs to foo.aspx where an alternate -" exists for the aspx.cs extension. Note that this will only accept -" extensions which contain less than 5 dots. This is only -" implemented in this manner for simplicity...it is doubtful that -" this will be a restriction in non-contrived situations. -" Args : The path to the file to find the extension in -" Returns : The matched extension if any -" Author : Michael Sharpe (feline@irendi.com) -" History : idea from Tom-Erik Duestad -" Notes : there is some magic occuring here. The exists() function does not -" work well when the curly brace variable has dots in it. And why -" should it, dots are not valid in variable names. But the exists -" function is wierd too. Lets say foo_c does exist. Then -" exists("foo_c.e.f") will be true...even though the variable does -" not exist. However the curly brace variables do work when the -" variable has dots in it. E.g foo_{'c'} is different from -" foo_{'c.d.e'}...and foo_{'c'} is identical to foo_c and -" foo_{'c.d.e'} is identical to foo_c.d.e right? Yes in the current -" implementation of vim. To trick vim to test for existence of such -" variables echo the curly brace variable and look for an error -" message. -function! DetermineExtension(path) - let mods = ":t" - let i = 0 - while i <= s:maxDotsInExtension - let mods = mods . ":e" - let extension = fnamemodify(a:path, mods) - if (has_key(g:alternateExtensionsDict, extension)) - return extension - endif - let v:errmsg = "" - silent! echo g:alternateExtensions_{extension} - if (v:errmsg == "") - return extension - endif - let i = i + 1 - endwhile - return "" -endfunction - -" Function : AlternateFile (PUBLIC) -" Purpose : Opens a new buffer by looking at the extension of the current -" buffer and finding the corresponding file. E.g. foo.c <--> foo.h -" Args : accepts one argument. If present it used the argument as the new -" extension. -" Returns : nothing -" Author : Michael Sharpe -" History : + When an alternate can't be found in the same directory as the -" source file, a search path will be traversed looking for the -" alternates. -" + Moved some code into a separate function, minor optimization -" + rework to favor files in memory based on complete enumeration of -" all files extensions and paths -function! AlternateFile(splitWindow, ...) - let extension = DetermineExtension(expand("%:p")) - let baseName = substitute(expand("%:t"), "\." . extension . '$', "", "") - let currentPath = expand("%:p:h") - - if (a:0 != 0) - let newFullname = currentPath . "/" . baseName . "." . a:1 - call FindOrCreateBuffer(newFullname, a:splitWindow, 0) - else - let allfiles = "" - if (extension != "") - let allfiles1 = EnumerateFilesByExtension(currentPath, baseName, extension) - let allfiles2 = EnumerateFilesByExtensionInPath(baseName, extension, g:alternateSearchPath, currentPath) - - if (allfiles1 != "") - if (allfiles2 != "") - let allfiles = allfiles1 . ',' . allfiles2 - else - let allfiles = allfiles1 - endif - else - let allfiles = allfiles2 - endif - endif - - if (allfiles != "") - let bestFile = "" - let bestScore = 0 - let score = 0 - let n = 1 - - let onefile = GetNthItemFromList(allfiles, n) - let bestFile = onefile - while (onefile != "" && score < 2) - let score = BufferOrFileExists(onefile) - if (score > bestScore) - let bestScore = score - let bestFile = onefile - endif - let n = n + 1 - let onefile = GetNthItemFromList(allfiles, n) - endwhile - - if (bestScore == 0 && g:alternateNoDefaultAlternate == 1) - echo "No existing alternate available" - else - call FindOrCreateBuffer(bestFile, a:splitWindow, 1) - let b:AlternateAllFiles = allfiles - endif - else - echo "No alternate file/buffer available" - endif - endif -endfunction - -" Function : AlternateOpenFileUnderCursor (PUBLIC) -" Purpose : Opens file under the cursor -" Args : splitWindow -- indicates how to open the file -" Returns : Nothing -" Author : Michael Sharpe (feline@irendi.com) www.irendi.com -function! AlternateOpenFileUnderCursor(splitWindow,...) - let cursorFile = (a:0 > 0) ? a:1 : expand("") - let currentPath = expand("%:p:h") - let openCount = 1 - - let fileName = FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount) - if (fileName != "") - call FindOrCreateBuffer(fileName, a:splitWindow, 1) - let b:openCount = openCount - let b:cursorFile = cursorFile - let b:currentPath = currentPath - else - echo "Can't find file" - endif -endfunction - -" Function : AlternateOpenNextFile (PUBLIC) -" Purpose : Opens the next file corresponding to the search which found the -" current file -" Args : bang -- indicates what to do if the current file has not been -" saved -" Returns : nothing -" Author : Michael Sharpe (feline@irendi.com) www.irendi.com -function! AlternateOpenNextFile(bang) - let cursorFile = "" - if (exists("b:cursorFile")) - let cursorFile = b:cursorFile - endif - - let currentPath = "" - if (exists("b:currentPath")) - let currentPath = b:currentPath - endif - - let openCount = 0 - if (exists("b:openCount")) - let openCount = b:openCount + 1 - endif - - if (cursorFile != "" && currentPath != "" && openCount != 0) - let fileName = FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, openCount) - if (fileName != "") - call FindOrCreateBuffer(fileName, "n".a:bang, 0) - let b:openCount = openCount - let b:cursorFile = cursorFile - let b:currentPath = currentPath - else - let fileName = FindFileInSearchPathEx(cursorFile, g:alternateSearchPath, currentPath, 1) - if (fileName != "") - call FindOrCreateBuffer(fileName, "n".a:bang, 0) - let b:openCount = 1 - let b:cursorFile = cursorFile - let b:currentPath = currentPath - else - echo "Can't find next file" - endif - endif - endif -endfunction - -comm! -nargs=? -bang IH call AlternateOpenFileUnderCursor("n", ) -comm! -nargs=? -bang IHS call AlternateOpenFileUnderCursor("h", ) -comm! -nargs=? -bang IHV call AlternateOpenFileUnderCursor("v", ) -comm! -nargs=? -bang IHT call AlternateOpenFileUnderCursor("t", ) -comm! -nargs=? -bang IHN call AlternateOpenNextFile("") -imap ih :IHS -nmap ih :IHS -imap is :IHS:A -nmap is :IHS:A -imap ihn :IHN -nmap ihn :IHN - -"function! PrintList(theList) -" let n = 1 -" let oneFile = GetNthItemFromList(a:theList, n) -" while (oneFile != "") -" let n = n + 1 -" let oneFile = GetNthItemFromList(a:theList, n) -" endwhile -"endfunction - -" Function : NextAlternate (PUBLIC) -" Purpose : Used to cycle through any other alternate file which existed on -" the search path. -" Args : bang (IN) - used to implement the AN vs AN! functionality -" Returns : nothing -" Author : Michael Sharpe -function! NextAlternate(bang) - if (exists('b:AlternateAllFiles')) - let currentFile = expand("%") - let n = 1 - let onefile = GetNthItemFromList(b:AlternateAllFiles, n) - while (onefile != "" && !EqualFilePaths(fnamemodify(onefile,":p"), fnamemodify(currentFile,":p"))) - let n = n + 1 - let onefile = GetNthItemFromList(b:AlternateAllFiles, n) - endwhile - - if (onefile != "") - let stop = n - let n = n + 1 - let foundAlternate = 0 - let nextAlternate = "" - while (n != stop) - let nextAlternate = GetNthItemFromList(b:AlternateAllFiles, n) - if (nextAlternate == "") - let n = 1 - continue - endif - let n = n + 1 - if (EqualFilePaths(fnamemodify(nextAlternate, ":p"), fnamemodify(currentFile, ":p"))) - continue - endif - if (filereadable(nextAlternate)) - " on cygwin filereadable("foo.H") returns true if "foo.h" exists - if (has("unix") && $WINDIR != "" && fnamemodify(nextAlternate, ":p") ==? fnamemodify(currentFile, ":p")) - continue - endif - let foundAlternate = 1 - break - endif - endwhile - if (foundAlternate == 1) - let s:AlternateAllFiles = b:AlternateAllFiles - "silent! execute ":e".a:bang." " . nextAlternate - call FindOrCreateBuffer(nextAlternate, "n".a:bang, 0) - let b:AlternateAllFiles = s:AlternateAllFiles - else - echo "Only this alternate file exists" - endif - else - echo "Could not find current file in alternates list" - endif - else - echo "No other alternate files exist" - endif -endfunction - -comm! -nargs=? -bang A call AlternateFile("n", ) -comm! -nargs=? -bang AS call AlternateFile("h", ) -comm! -nargs=? -bang AV call AlternateFile("v", ) -comm! -nargs=? -bang AT call AlternateFile("t", ) -comm! -nargs=? -bang AN call NextAlternate("") - -" Function : BufferOrFileExists (PRIVATE) -" Purpose : determines if a buffer or a readable file exists -" Args : fileName (IN) - name of the file to check -" Returns : 2 if it exists in memory, 1 if it exists, 0 otherwise -" Author : Michael Sharpe -" History : Updated code to handle buffernames using just the -" filename and not the path. -function! BufferOrFileExists(fileName) - let result = 0 - - let lastBuffer = bufnr("$") - let i = 1 - while i <= lastBuffer - if EqualFilePaths(expand("#".i.":p"), a:fileName) - let result = 2 - break - endif - let i = i + 1 - endwhile - - if (!result) - let bufName = fnamemodify(a:fileName,":t") - let memBufName = bufname(bufName) - if (memBufName != "") - let memBufBasename = fnamemodify(memBufName, ":t") - if (bufName == memBufBasename) - let result = 2 - endif - endif - - if (!result) - let result = bufexists(bufName) || bufexists(a:fileName) || filereadable(a:fileName) - endif - endif - - if (!result) - let result = filereadable(a:fileName) - endif - return result -endfunction - -" Function : FindOrCreateBuffer (PRIVATE) -" Purpose : searches the buffer list (:ls) for the specified filename. If -" found, checks the window list for the buffer. If the buffer is in -" an already open window, it switches to the window. If the buffer -" was not in a window, it switches to that buffer. If the buffer did -" not exist, it creates it. -" Args : filename (IN) -- the name of the file -" doSplit (IN) -- indicates whether the window should be split -" ("v", "h", "n", "v!", "h!", "n!", "t", "t!") -" findSimilar (IN) -- indicate weather existing buffers should be -" prefered -" Returns : nothing -" Author : Michael Sharpe -" History : + bufname() was not working very well with the possibly strange -" paths that can abound with the search path so updated this -" slightly. -- Bindu -" + updated window switching code to make it more efficient -- Bindu -" Allow ! to be applied to buffer/split/editing commands for more -" vim/vi like consistency -" + implemented fix from Matt Perry -function! FindOrCreateBuffer(fileName, doSplit, findSimilar) - " Check to see if the buffer is already open before re-opening it. - let FILENAME = escape(a:fileName, ' ') - let bufNr = -1 - let lastBuffer = bufnr("$") - let i = 1 - if (a:findSimilar) - while i <= lastBuffer - if EqualFilePaths(expand("#".i.":p"), a:fileName) - let bufNr = i - break - endif - let i = i + 1 - endwhile - - if (bufNr == -1) - let bufName = bufname(a:fileName) - let bufFilename = fnamemodify(a:fileName,":t") - - if (bufName == "") - let bufName = bufname(bufFilename) - endif - - if (bufName != "") - let tail = fnamemodify(bufName, ":t") - if (tail != bufFilename) - let bufName = "" - endif - endif - if (bufName != "") - let bufNr = bufnr(bufName) - let FILENAME = bufName - endif - endif - endif - - if (g:alternateRelativeFiles == 1) - let FILENAME = fnamemodify(FILENAME, ":p:.") - endif - - let splitType = a:doSplit[0] - let bang = a:doSplit[1] - if (bufNr == -1) - " Buffer did not exist....create it - let v:errmsg="" - if (splitType == "h") - silent! execute ":split".bang." " . FILENAME - elseif (splitType == "v") - silent! execute ":vsplit".bang." " . FILENAME - elseif (splitType == "t") - silent! execute ":tab split".bang." " . FILENAME - else - silent! execute ":e".bang." " . FILENAME - endif - if (v:errmsg != "") - echo v:errmsg - endif - else - - " Find the correct tab corresponding to the existing buffer - let tabNr = -1 - " iterate tab pages - for i in range(tabpagenr('$')) - " get the list of buffers in the tab - let tabList = tabpagebuflist(i + 1) - let idx = 0 - " iterate each buffer in the list - while idx < len(tabList) - " if it matches the buffer we are looking for... - if (tabList[idx] == bufNr) - " ... save the number - let tabNr = i + 1 - break - endif - let idx = idx + 1 - endwhile - if (tabNr != -1) - break - endif - endfor - " switch the the tab containing the buffer - if (tabNr != -1) - execute "tabn ".tabNr - endif - - " Buffer was already open......check to see if it is in a window - let bufWindow = bufwinnr(bufNr) - if (bufWindow == -1) - " Buffer was not in a window so open one - let v:errmsg="" - if (splitType == "h") - silent! execute ":sbuffer".bang." " . FILENAME - elseif (splitType == "v") - silent! execute ":vert sbuffer " . FILENAME - elseif (splitType == "t") - silent! execute ":tab sbuffer " . FILENAME - else - silent! execute ":buffer".bang." " . FILENAME - endif - if (v:errmsg != "") - echo v:errmsg - endif - else - " Buffer is already in a window so switch to the window - execute bufWindow."wincmd w" - if (bufWindow != winnr()) - " something wierd happened...open the buffer - let v:errmsg="" - if (splitType == "h") - silent! execute ":split".bang." " . FILENAME - elseif (splitType == "v") - silent! execute ":vsplit".bang." " . FILENAME - elseif (splitType == "t") - silent! execute ":tab split".bang." " . FILENAME - else - silent! execute ":e".bang." " . FILENAME - endif - if (v:errmsg != "") - echo v:errmsg - endif - endif - endif - endif -endfunction - -" Function : EqualFilePaths (PRIVATE) -" Purpose : Compares two paths. Do simple string comparison anywhere but on -" Windows. On Windows take into account that file paths could differ -" in usage of separators and the fact that case does not matter. -" "c:\WINDOWS" is the same path as "c:/windows". has("win32unix") Vim -" version does not count as one having Windows path rules. -" Args : path1 (IN) -- first path -" path2 (IN) -- second path -" Returns : 1 if path1 is equal to path2, 0 otherwise. -" Author : Ilya Bobir -function! EqualFilePaths(path1, path2) - if has("win16") || has("win32") || has("win64") || has("win95") - return substitute(a:path1, "\/", "\\", "g") ==? substitute(a:path2, "\/", "\\", "g") - else - return a:path1 == a:path2 - endif -endfunction diff --git a/.vim/plugin/bclose.vim b/.vim/plugin/bclose.vim deleted file mode 100644 index 3c1bb19..0000000 --- a/.vim/plugin/bclose.vim +++ /dev/null @@ -1,70 +0,0 @@ -if exists("loaded_bclosePlugin") - finish -endif -if (v:progname == "ex") - finish -endif -let loaded_bclosePlugin = 1 - - -"here is a more exotic version of my original Kwbd script -"delete the buffer; keep windows; create a scratch buffer if no buffers left -function s:Kwbd(kwbdStage) - if(a:kwbdStage == 1) - if(!buflisted(winbufnr(0))) - bd! - return - endif - let s:kwbdBufNum = bufnr("%") - let s:kwbdWinNum = winnr() - windo call s:Kwbd(2) - execute s:kwbdWinNum . 'wincmd w' - let s:buflistedLeft = 0 - let s:bufFinalJump = 0 - let l:nBufs = bufnr("$") - let l:i = 1 - while(l:i <= l:nBufs) - if(l:i != s:kwbdBufNum) - if(buflisted(l:i)) - let s:buflistedLeft = s:buflistedLeft + 1 - else - if(bufexists(l:i) && !strlen(bufname(l:i)) && !s:bufFinalJump) - let s:bufFinalJump = l:i - endif - endif - endif - let l:i = l:i + 1 - endwhile - if(!s:buflistedLeft) - if(s:bufFinalJump) - windo if(buflisted(winbufnr(0))) | execute "b! " . s:bufFinalJump | endif - else - enew - let l:newBuf = bufnr("%") - windo if(buflisted(winbufnr(0))) | execute "b! " . l:newBuf | endif - endif - execute s:kwbdWinNum . 'wincmd w' - endif - if(buflisted(s:kwbdBufNum) || s:kwbdBufNum == bufnr("%")) - execute "bd! " . s:kwbdBufNum - endif - if(!s:buflistedLeft) - set buflisted - set bufhidden=delete - set buftype=nofile - setlocal noswapfile - endif - else - if(bufnr("%") == s:kwbdBufNum) - let prevbufvar = bufnr("#") - if(prevbufvar > 0 && buflisted(prevbufvar) && prevbufvar != s:kwbdBufNum) - b # - else - bn - endif - endif - endif -endfunction - -command! Kwbd call Kwbd(1) -nnoremap Kwbd :Kwbd diff --git a/.vim/plugin/camelcasemotion.vim b/.vim/plugin/camelcasemotion.vim deleted file mode 100644 index ae9cbd6..0000000 --- a/.vim/plugin/camelcasemotion.vim +++ /dev/null @@ -1,449 +0,0 @@ -" camelcasemotion.vim: Mappings for motion through CamelCaseWords and -" underscore_notation. -" -" DESCRIPTION: {{{1 -" VIM provides many built-in motions, e.g. to move to the next word, or -" end of the current word. Most programming languages use either CamelCase -" ("anIdentifier") or underscore_notation ("an_identifier") naming -" conventions for identifiers. The best way to navigate inside those -" identifiers using VIM built-in motions is the '[count]f{char}' motion, i.e. -" 'f' or 'f_', respectively. But we can make this easier: -" -" This script defines motions ',w', ',b' and ',e' (similar to 'w', 'b', 'e'), -" which do not move word-wise (forward/backward), but Camel-wise; i.e. to word -" boundaries and uppercase letters. The motions also work on underscore -" notation, where words are delimited by underscore ('_') characters. -" From here on, both CamelCase and underscore_notation entities are referred -" to as "words" (in double quotes). Just like with the regular motions, a -" [count] can be prepended to move over multiple "words" at once. -" Outside of "words" (e.g. in non-keyword characters like // or ;), the new -" motions move just like the regular motions. -" -" VIM provides a built-in text object called 'inner word' ('iw'), which works -" in operator-pending and visual mode. Analog to that, this script defines -" inner "word" motions 'i,w', 'i,b' and 'i,e', which select the "word" (or -" multiple "words" if a [count] is given) where the cursor is located. -" -" USAGE: -" Use the new motions ',w', ',b' and ',e' in normal mode, operator-pending -" mode (cp. :help operator), and visual mode. For example, type 'bc,w' to -" change 'Camel' in 'CamelCase' to something else. -" -" EXAMPLE: motions -" Given the following CamelCase identifiers in a source code fragment: -" set Script31337PathAndNameWithoutExtension11=%~dpn0 -" set Script31337PathANDNameWITHOUTExtension11=%~dpn0 -" and the corresponding identifiers in underscore_notation: -" set script_31337_path_and_name_without_extension_11=%~dpn0 -" set SCRIPT_31337_PATH_AND_NAME_WITHOUT_EXTENSION_11=%~dpn0 -" -" ,w moves to ([x] is cursor position): [s]et, [s]cript, [3]1337, [p]ath, -" [a]nd, [n]ame, [w]ithout, [e]xtension, [1]1, [d]pn0, dpn[0], [s]et -" ,b moves to: [d]pn0, [1]1, [e]xtension, [w]ithout, ... -" ,e moves to: se[t], scrip[t], 3133[7], pat[h], an[d], nam[e], withou[t], -" extensio[n], 1[1], dpn[0] -" -" EXAMPLE: inner motions -" Given the following identifier, with the cursor positioned at [x]: -" script_31337_path_and_na[m]e_without_extension_11 -" -" v3i,w selects script_31337_path_and_[name_without_extension_]11 -" v3i,b selects script_31337_[path_and_name]_without_extension_11 -" v3i,e selects script_31337_path_and_[name_without_extension]_11 -" Instead of visual mode, you can also use c3i,w to change, d3i,w to delete, -" gU3i,w to upper-case, and so on. -" -" INSTALLATION: {{{1 -" Put the script into your user or system VIM plugin directory (e.g. -" ~/.vim/plugin). -" -" DEPENDENCIES: -" - Requires VIM 7.0 or higher. -" -" CONFIGURATION: -" If you want to use different mappings, map your keys to the -" CamelCaseMotion_? mapping targets _before_ sourcing this script -" (e.g. in your .vimrc). -" -" Example: Replace the default 'w', 'b' and 'e' mappings instead of defining -" additional mappings ',w', ',b' and ',e': -" map w CamelCaseMotion_w -" map b CamelCaseMotion_b -" map e CamelCaseMotion_e -" -" Example: Replace default 'iw' text-object and define 'ib' and 'ie' motions: -" omap iw CamelCaseMotion_iw -" vmap iw CamelCaseMotion_iw -" omap ib CamelCaseMotion_ib -" vmap ib CamelCaseMotion_ib -" omap ie CamelCaseMotion_ie -" vmap ie CamelCaseMotion_ie -" -" LIMITATIONS: -" -" ASSUMPTIONS: -" -" KNOWN PROBLEMS: -" - A degenerate CamelCaseWord containing '\U\u\d' (e.g. "MaP1Roblem") -" confuses the operator-pending and visual mode ,e mapping if 'selection' is -" not set to "exclusive". It'll skip "P" and select "P1" in one step. As a -" workaround, use ',w' instead of ',e'; those two mappings have the same -" effect inside CamelCaseWords, anyway. -" - The operator-pending and visual mode ,e mapping doesn't work properly when -" it reaches the end of the buffer; the final character of the moved-over -" "word" remains. As a workaround, use the default 'e' motion instead of -" ',e'. -" - When the VIM setting 'selection' is not set to "exclusive", a -" forward-backward combination in visual mode (e.g. 'v,w,b') selects one -" additional character to the left, instead of only the character where the -" motion started. Likewise, extension of the visual selection from the front -" end is off by one additional character. -" -" TODO: -" -" Copyright: (C) 2007-2008 by Ingo Karkat -" The VIM LICENSE applies to this script; see ':help copyright'. -" -" Source: Based on vimtip #1016 by Anthony Van Ham. -" Maintainer: Ingo Karkat -" REVISION DATE REMARKS {{{1 -" 1.40.017 19-May-2008 BF: Now using :normal! to be independent from -" any user mappings. Thanks to Neil Walker for the -" patch. -" 1.40.016 28-Apr-2008 BF: Wrong forward motion stop at the second -" digit if a word starts with multiple numbers -" (e.g. 1234.56789). Thanks to Wasim Ahmed for -" reporting this. -" 1.40.015 24-Apr-2008 ENH: Added inner "word" text objects 'i,w' etc. -" that work analoguous to the built-in 'iw' text -" object. Thanks to David Kotchan for this -" suggestion. -" 1.30.014 20-Apr-2008 The motions now also stop at non-keyword -" boundaries, just like the regular motions. This -" has no effect inside a CamelCaseWord or inside -" underscore_notation, but it makes the motions -" behave like the regular motions (which is -" important if you replace the default motions). -" Thanks to Mun Johl for reporting this. -" Now using non-capturing parentheses \%() in the -" patterns. -" 1.30.013 09-Apr-2008 Refactored away s:VisualCamelCaseMotion(). -" Allowing users to use mappings different than -" ,w ,b ,e by defining CamelCaseMotion_? -" target mappings. This can even be used to -" replace the default 'w', 'b' and 'e' mappings, -" as suggested by Mun Johl. -" Mappings are now created in a generic function. -" Now requires VIM 7.0 or higher. -" 1.20.012 02-Jun-2007 BF: Corrected motions through mixed -" CamelCase_and_UnderScore words by re-ordering -" and narrowing the search patterns. -" 1.20.011 02-Jun-2007 Thanks again to Joseph Barker for discussing the -" complicated visual mode mapping on the vim-dev -" mailing list and coming up with a great -" simplification: -" Removed s:CheckForChangesToTheSelectionSetting(). -" Introduced s:VisualCamelCaseMotion(), which -" handles the differences depending on the -" 'selection' setting. -" Visual mode mappings now directly map to the -" s:VisualCamelCaseMotion() function; no mark is -" clobbered, the complex mapping with the inline -" expression has been retired. -" 1.20.010 29-May-2007 BF: The operator-pending and visual mode ,e -" mapping doesn't work properly when it reaches -" the end of line; the final character of the -" moved-over "word" remains. Fixed this problem -" unless the "word" is at the very end of the -" buffer. -" ENH: The visual mode motions now also (mostly) -" work with the (default) setting -" 'set selection=inclusive', instead of selecting -" one character too much. -" ENH: All mappings will check for changes to the -" 'selection' setting and remap the visual mode -" mappings via function -" s:SetupVisualModeMappings(). We cannot rely on -" the setting while sourcing camelcasemotion.vim -" because the mswin.vim script may be sourced -" afterwards, and its 'behave mswin' changes -" 'selection'. -" Refactored the arguments of function -" s:CamelCaseMotion(...). -" 1.10.009 28-May-2007 BF: Degenerate CamelCaseWords that consist of -" only a single uppercase letter (e.g. "P" in -" "MapPRoblem") are skipped by all motions. Thanks -" to Joseph Barker for reporting this. -" BF: In CamelCaseWords that consist of uppercase -" letters followed by decimals (e.g. -" "MyUPPER123Problem", the uppercase "word" is -" skipped by all motions. -" 1.10.008 28-May-2007 Incorporated major improvements and -" simplifications done by Joseph Barker: -" Operator-pending and visual mode motions now -" accept [count] of more than 9. -" Visual selections can now be extended from -" either end. -" Instead of misusing the :[range], the special -" variable v:count1 is used. Custom commands are -" not needed anymore. -" Operator-pending and visual mode mappings are -" now generic: There's only a single mapping for -" ,w that can be repeated, rather than having a -" separate mapping for 1,w 2,w 3,w ... -" 1.00.007 22-May-2007 Added documentation for publication. -" 006 20-May-2007 BF: visual mode [1,2,3],e on pure CamelCase -" mistakenly marks [2,4,6] words. If the cursor is -" on a uppercase letter, the search pattern -" '\u\l\+' doesn't match at the cursor position, -" so another match won. Changed search pattern -" from '\l\+', -" 005 16-May-2007 Added support for underscore notation. -" Added support for "forward to end of word" -" (',e') motion. -" 004 16-May-2007 Improved search pattern so that -" UppercaseWORDSInBetween and digits are handled, -" too. -" 003 15-May-2007 Changed mappings from w to ,w; -" other \w mappings interfere here, because it's -" irritating when the cursor jump doesn't happen -" immediately, because VIM waits whether the -" mapping is complete. ,w is faster to type that -" \w (and, because of the left-right touch, -" preferred over gw). -" Added visual mode mappings. -" 0.02 15-Feb-2006 BF: missing for omaps. -" 0.01 11-Oct-2005 file creation - -" Avoid installing twice or when in compatible mode -if exists("loaded_camelcasemotion") || (v:version < 700) - finish -endif -let loaded_camelcasemotion = 1 -" }}}1 - -"- functions ------------------------------------------------------------------" -function! s:CamelCaseMove( direction, count, mode ) " {{{1 - " Note: There is no inversion of the regular expression character class - " 'keyword character' (\k). We need an inversion "non-keyword" defined as - " "any non-whitespace character that is not a keyword character (e.g. - " [!@#$%^&*()]. This can be specified via a non-whitespace character in - " whose place no keyword character matches (\k\@!\S). - - "echo "count is " . a:count - let l:i = 0 - while l:i < a:count - if a:direction == 'e' - " "Forward to end" motion. - "call search( '\>\|\(\a\|\d\)\+\ze_', 'We' ) - " end of ... - " number | ACRONYM followed by CamelCase or number | CamelCase | underscore_notation | non-keyword | word - call search( '\d\+\|\u\+\ze\%(\u\l\|\d\)\|\u\l\+\|\%(\a\|\d\)\+\ze_\|\%(\k\@!\S\)\+\|\%(_\@!\k\)\+\>', 'We' ) - " Note: word must be defined as '\k\>'; '\>' on its own somehow - " dominates over the previous branch. Plus, \k must exclude the - " underscore, or a trailing one will be incorrectly moved over: - " '\%(_\@!\k\)'. - if a:mode == 'o' - " Note: Special additional treatment for operator-pending mode - " "forward to end" motion. - " The difference between normal mode, operator-pending and visual - " mode is that in the latter two, the motion must go _past_ the - " final "word" character, so that all characters of the "word" are - " selected. This is done by appending a 'l' motion after the - " search for the next "word". - " - " In operator-pending mode, the 'l' motion only works properly - " at the end of the line (i.e. when the moved-over "word" is at - " the end of the line) when the 'l' motion is allowed to move - " over to the next line. Thus, the 'l' motion is added - " temporarily to the global 'whichwrap' setting. - " Without this, the motion would leave out the last character in - " the line. I've also experimented with temporarily setting - " "set virtualedit=onemore" , but that didn't work. - let l:save_ww = &whichwrap - set whichwrap+=l - normal! l - let &whichwrap = l:save_ww - endif - else - " Forward (a:direction == '') and backward (a:direction == 'b') - " motion. - - let l:direction = (a:direction == 'w' ? '' : a:direction) - - " CamelCase: Jump to beginning of either (start of word, Word, WORD, - " 123). - " Underscore_notation: Jump to the beginning of an underscore-separated - " word or number. - "call search( '\<\|\u', 'W' . l:direction ) - "call search( '\<\|\u\(\l\+\|\u\+\ze\u\)\|\d\+', 'W' . l:direction ) - "call search( '\<\|\u\(\l\+\|\u\+\ze\u\)\|\d\+\|_\zs\(\a\|\d\)\+', 'W' . l:direction ) - " beginning of ... - " word | empty line | non-keyword after whitespaces | non-whitespace after word | number | ACRONYM followed by CamelCase or number | CamelCase | underscore followed by ACRONYM, Camel, lowercase or number - call search( '\<\D\|^$\|\%(^\|\s\)\+\zs\k\@!\S\|\>\S\|\d\+\|\u\+\ze\%(\u\l\|\d\)\|\u\l\+\|_\zs\%(\u\+\|\u\l\+\|\l\+\|\d\+\)', 'W' . l:direction ) - " Note: word must be defined as '\<\D' to avoid that a word like - " 1234Test is moved over as [1][2]34[T]est instead of [1]234[T]est - " because \< matches with zero width, and \d\+ will then start - " matching '234'. To fix that, we make \d\+ be solely responsible - " for numbers by taken this away from \< via \<\D. (An alternative - " would be to replace \d\+ with \D\%#\zs\d\+, but that one is more - " complex.) All other branches are not affected, because they match - " multiple characters and not the same character multiple times. - endif - let l:i = l:i + 1 - endwhile -endfunction -" }}}1 - -function! s:CamelCaseMotion( direction, count, mode ) " {{{1 -"******************************************************************************* -"* PURPOSE: -" Perform the motion over CamelCaseWords or underscore_notation. -"* ASSUMPTIONS / PRECONDITIONS: -" none -"* EFFECTS / POSTCONDITIONS: -" Move cursor / change selection. -"* INPUTS: -" a:direction one of 'w', 'b', 'e' -" a:count number of "words" to move over -" a:mode one of 'n', 'o', 'v', 'iv' (latter one is a special visual mode -" when inside the inner "word" text objects. -"* RETURN VALUES: -" none -"******************************************************************************* - " Visual mode needs special preparations and postprocessing; - " normal and operator-pending mode breeze through to s:CamelCaseMove(). - - if a:mode == 'v' - " Visual mode was left when calling this function. Reselecting the current - " selection returns to visual mode and allows to call search() and issue - " normal mode motions while staying in visual mode. - normal! gv - endif - if a:mode == 'v' || a:mode == 'iv' - - " Note_1a: - if &selection != 'exclusive' && a:direction == 'w' - normal! l - endif - endif - - call s:CamelCaseMove( a:direction, a:count, a:mode ) - - if a:mode == 'v' || a:mode == 'iv' - " Note: 'selection' setting. - if &selection == 'exclusive' && a:direction == 'e' - " When set to 'exclusive', the "forward to end" motion (',e') does not - " include the last character of the moved-over "word". To include that, an - " additional 'l' motion is appended to the motion; similar to the - " special treatment in operator-pending mode. - normal! l - elseif &selection != 'exclusive' && a:direction != 'e' - " Note_1b: - " The forward and backward motions move to the beginning of the next "word". - " When 'selection' is set to 'inclusive' or 'old', this is one character too far. - " The appended 'h' motion undoes this. Because of this backward step, - " though, the forward motion finds the current "word" again, and would - " be stuck on the current "word". An 'l' motion before the CamelCase - " motion (see Note_1a) fixes that. - normal! h - end - endif -endfunction -" }}}1 - -function! s:CamelCaseInnerMotion( direction, count ) " {{{1 - " If the cursor is positioned on the first character of a CamelWord, the - " backward motion would move to the previous word, which would result in a - " wrong selection. To fix this, first move the cursor to the right, so that - " the backward motion definitely will cover the current "word" under the - " cursor. - normal! l - - " Move "word" backwards, enter visual mode, then move "word" forward. This - " selects the inner "word" in visual mode; the operator-pending mode takes - " this selection as the area covered by the motion. - if a:direction == 'b' - " Do not do the selection backwards, because the backwards "word" motion - " in visual mode + selection=inclusive has an off-by-one error. - call s:CamelCaseMotion( 'b', a:count, 'n' ) - normal! v - " We decree that 'b' is the opposite of 'e', not 'w'. This makes more - " sense at the end of a line and for underscore_notation. - call s:CamelCaseMotion( 'e', a:count, 'iv' ) - else - call s:CamelCaseMotion( 'b', 1, 'n' ) - normal! v - call s:CamelCaseMotion( a:direction, a:count, 'iv' ) - endif -endfunction -" }}}1 - -"- mappings ------------------------------------------------------------------- -" The count is passed into the function through the special variable 'v:count1', -" which is easier than misusing the :[range] that :call supports. -" is used to delete the unused range. -" Another option would be to use a custom 'command! -count=1', but that doesn't -" work with the normal mode mapping: When a count is typed before the mapping, -" the ':' will convert a count of 3 into ':.,+2MyCommand', but ':3MyCommand' -" would be required to use -count and . -" -" We do not provide the fourth "backward to end" motion (,E), because it is -" seldomly used. - -function! s:CreateMotionMappings() "{{{1 - " Create mappings according to this template: - " (* stands for the mode [nov], ? for the underlying motion [wbe].) - " - " *noremap - -
-
- - diff --git a/.vim/skeletons/vue.skel b/.vim/skeletons/vue.skel deleted file mode 100644 index 8310166..0000000 --- a/.vim/skeletons/vue.skel +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/.vim/syntax/c.vim b/.vim/syntax/c.vim deleted file mode 100644 index 8381244..0000000 --- a/.vim/syntax/c.vim +++ /dev/null @@ -1,377 +0,0 @@ -" Vim syntax file -" Language: C -" Maintainer: Bram Moolenaar -" Last Change: 2008 Mar 19 - -" Quit when a (custom) syntax file was already loaded -if exists("b:current_syntax") - finish -endif - -" A bunch of useful C keywords -syn keyword cStatement goto break return continue asm -syn keyword cLabel case default -syn keyword cConditional if else switch -syn keyword cRepeat while for do - -syn keyword cTodo contained TODO FIXME XXX - -" cCommentGroup allows adding matches for special things in comments -syn cluster cCommentGroup contains=cTodo - -" String and Character constants -" Highlight special characters (those which have a backslash) differently -syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" -if !exists("c_no_utf") - syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" -endif -if exists("c_no_cformat") - syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell - " cCppString: same as cString, but ends at end of line - syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell -else - if !exists("c_no_c99") " ISO C99 - syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained - else - syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained - endif - syn match cFormat display "%%" contained - syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell - " cCppString: same as cString, but ends at end of line - syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell -endif - -syn match cCharacter "L\='[^\\]'" -syn match cCharacter "L'[^']*'" contains=cSpecial -if exists("c_gnu") - syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" - syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" -else - syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" - syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" -endif -syn match cSpecialCharacter display "L\='\\\o\{1,3}'" -syn match cSpecialCharacter display "'\\x\x\{1,2}'" -syn match cSpecialCharacter display "L'\\x\x\+'" - -"when wanted, highlight trailing white space -if exists("c_space_errors") - if !exists("c_no_trail_space_error") - syn match cSpaceError display excludenl "\s\+$" - endif - if !exists("c_no_tab_space_error") - syn match cSpaceError display " \+\t"me=e-1 - endif -endif - -" This should be before cErrInParen to avoid problems with #define ({ xxx }) -if exists("c_curly_error") - syntax match cCurlyError "}" - syntax region cBlock start="{" end="}" contains=ALLBUT,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold -else - syntax region cBlock start="{" end="}" transparent fold -endif - -"catch errors caused by wrong parenthesis and brackets -" also accept <% for {, %> for }, <: for [ and :> for ] (C99) -" But avoid matching <::. -syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom -if exists("c_no_curly_error") - syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell - " cCppParen: same as cParen but ends at end-of-line; used in cDefine - syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell - syn match cParenError display ")" - syn match cErrInParen display contained "^[{}]\|^<%\|^%>" -elseif exists("c_no_bracket_error") - syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell - " cCppParen: same as cParen but ends at end-of-line; used in cDefine - syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell - syn match cParenError display ")" - syn match cErrInParen display contained "[{}]\|<%\|%>" -else - syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell - " cCppParen: same as cParen but ends at end-of-line; used in cDefine - syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell - syn match cParenError display "[\])]" - syn match cErrInParen display contained "[\]{}]\|<%\|%>" - syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell - " cCppBracket: same as cParen but ends at end-of-line; used in cDefine - syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell - syn match cErrInBracket display contained "[);{}]\|<%\|%>" -endif - -"integer number, or floating point number without a dot and with "f". -syn case ignore -syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal -" Same, but without octal error (for comments) -syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal -syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" -"hex number -syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" -" Flag the first zero of an octal number as something special -syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero -syn match cOctalZero display contained "\<0" -syn match cFloat display contained "\d\+f" -"floating point number, with dot, optional exponent -syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" -"floating point number, starting with a dot, optional exponent -syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" -"floating point number, without dot, with exponent -syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" -if !exists("c_no_c99") - "hexadecimal floating point number, optional leading digits, with dot, with exponent - syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" - "hexadecimal floating point number, with leading digits, optional dot, with exponent - syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" -endif - -" flag an octal number with wrong digits -syn match cOctalError display contained "0\o*[89]\d*" -syn case match - -if exists("c_comment_strings") - " A comment can contain cString, cCharacter and cNumber. - " But a "*/" inside a cString in a cComment DOES end the comment! So we - " need to use a special type of cString: cCommentString, which also ends on - " "*/", and sees a "*" at the start of the line as comment again. - " Unfortunately this doesn't very well work for // type of comments :-( - syntax match cCommentSkip contained "^\s*\*\($\|\s\+\)" - syntax region cCommentString contained start=+L\=\\\@" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError -syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" -if !exists("c_no_if0") - if !exists("c_no_if0_fold") - syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 fold - else - syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 - endif - syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip - syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip -endif -syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn match cIncluded display contained "<[^>]*>" -syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded -"syn match cLineSkip "\\$" -syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti -syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 keepend contains=ALLBUT,@cPreProcGroup,@Spell -syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell - -" Highlight User Labels -syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString -syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell -" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' -syn cluster cLabelGroup contains=cUserLabel -syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup -syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup -syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup -syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup - -syn match cUserLabel display "\I\i*" contained - -" Avoid recognizing most bitfields as labels -syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType -syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType - -" Highlight Class and Function names -syn match cCustomParen "(" contains=cParen contains=cCppParen -syn match cCustomFunc "\w\+\s*(" contains=cCustomParen -syn match cCustomScope "::" -syn match cCustomClass "\w\+\s*::" contains=cCustomScope - -hi def link cCustomFunc Function -hi def link cCustomClass Function - -if exists("c_minlines") - let b:c_minlines = c_minlines -else - if !exists("c_no_if0") - let b:c_minlines = 50 " #if 0 constructs can be long - else - let b:c_minlines = 15 " mostly for () constructs - endif -endif -if exists("c_curly_error") - syn sync fromstart -else - exec "syn sync ccomment cComment minlines=" . b:c_minlines -endif - -" Define the default highlighting. -" Only used when an item doesn't have highlighting yet -hi def link cFormat cSpecial -hi def link cCppString cString -hi def link cCommentL cComment -hi def link cCommentStart cComment -hi def link cLabel Label -hi def link cUserLabel Label -hi def link cConditional Conditional -hi def link cRepeat Repeat -hi def link cCharacter Character -hi def link cSpecialCharacter cSpecial -hi def link cNumber Number -hi def link cOctal Number -hi def link cOctalZero PreProc " link this to Error if you want -hi def link cFloat Float -hi def link cOctalError cError -hi def link cParenError cError -hi def link cErrInParen cError -hi def link cErrInBracket cError -hi def link cCommentError cError -hi def link cCommentStartError cError -hi def link cSpaceError cError -hi def link cSpecialError cError -hi def link cCurlyError cError -hi def link cOperator Operator -hi def link cStructure Structure -hi def link cStorageClass StorageClass -hi def link cInclude Include -hi def link cPreProc PreProc -hi def link cDefine Macro -hi def link cIncluded cString -hi def link cError Error -hi def link cStatement Statement -hi def link cPreCondit PreCondit -hi def link cType Type -hi def link cConstant Constant -hi def link cCommentString cString -hi def link cComment2String cString -hi def link cCommentSkip cComment -hi def link cString String -hi def link cComment Comment -hi def link cSpecial SpecialChar -hi def link cTodo Todo -hi def link cCppSkip cCppOut -hi def link cCppOut2 cCppOut -hi def link cCppOut Comment - -let b:current_syntax = "c" - -" vim: ts=8 diff --git a/.vim/syntax/cvsannotate.vim b/.vim/syntax/cvsannotate.vim deleted file mode 100644 index 4af5809..0000000 --- a/.vim/syntax/cvsannotate.vim +++ /dev/null @@ -1,45 +0,0 @@ -" Vim syntax file -" Language: CVS annotate output -" Maintainer: Bob Hiestand -" Remark: Used by the cvscommand plugin. Originally written by Mathieu -" Clabaut -" License: -" Copyright (c) 2007 Bob Hiestand -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn match cvsDate /\d\d-...-\d\d/ contained -syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate -syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName -syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate - -if !exists("did_cvsannotate_syntax_inits") - let did_cvsannotate_syntax_inits = 1 - hi link cvsDate Comment - hi link cvsName Type - hi link cvsVer Statement -endif - -let b:current_syntax="CVSAnnotate" diff --git a/.vim/syntax/gitannotate.vim b/.vim/syntax/gitannotate.vim deleted file mode 100644 index 932342d..0000000 --- a/.vim/syntax/gitannotate.vim +++ /dev/null @@ -1,44 +0,0 @@ -" Vim syntax file -" Language: git annotate output -" Maintainer: Bob Hiestand -" Remark: Used by the vcscommand plugin. -" License: -" Copyright (c) 2009 Bob Hiestand -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. - -if exists("b:current_syntax") - finish -endif - -syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained -syn match gitCommit /^\^\?\x\+/ contained -syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained -syn match gitLineNumber /\d\+)\@=/ contained -syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName - -if !exists("did_gitannotate_syntax_inits") - let did_gitannotate_syntax_inits = 1 - hi link gitName Type - hi link gitCommit Statement - hi link gitDate Comment - hi link gitLineNumber Label -endif - -let b:current_syntax="gitAnnotate" diff --git a/.vim/syntax/haskell.vim b/.vim/syntax/haskell.vim deleted file mode 100644 index 10bb221..0000000 --- a/.vim/syntax/haskell.vim +++ /dev/null @@ -1,355 +0,0 @@ -" Vim syntax file -" -" Modification of vims Haskell syntax file: -" - match types using regular expression -" - highlight toplevel functions -" - use "syntax keyword" instead of "syntax match" where appropriate -" - functions and types in import and module declarations are matched -" - removed hs_highlight_more_types (just not needed anymore) -" - enable spell checking in comments and strings only -" - FFI highlighting -" - QuasiQuotation -" - top level Template Haskell slices -" - PackageImport -" -" TODO: find out which vim versions are still supported -" -" From Original file: -" =================== -" -" Language: Haskell -" Maintainer: Haskell Cafe mailinglist -" Last Change: 2010 Feb 21 -" Original Author: John Williams -" -" Thanks to Ryan Crumley for suggestions and John Meacham for -" pointing out bugs. Also thanks to Ian Lynagh and Donald Bruce Stewart -" for providing the inspiration for the inclusion of the handling -" of C preprocessor directives, and for pointing out a bug in the -" end-of-line comment handling. -" -" Options-assign a value to these variables to turn the option on: -" -" hs_highlight_delimiters - Highlight delimiter characters--users -" with a light-colored background will -" probably want to turn this on. -" hs_highlight_boolean - Treat True and False as keywords. -" hs_highlight_types - Treat names of primitive types as keywords. -" hs_highlight_debug - Highlight names of debugging functions. -" hs_allow_hash_operator - Don't highlight seemingly incorrect C -" preprocessor directives but assume them to be -" operators -" -" - -if version < 600 - syn clear -elseif exists("b:current_syntax") - finish -endif - -"syntax sync fromstart "mmhhhh.... is this really ok to do so? -syntax sync linebreaks=15 minlines=50 maxlines=500 - -syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)" -syn match hsSpecialChar contained "\\\(NUL\|SOH\|STX\|ETX\|EOT\|ENQ\|ACK\|BEL\|BS\|HT\|LF\|VT\|FF\|CR\|SO\|SI\|DLE\|DC1\|DC2\|DC3\|DC4\|NAK\|SYN\|ETB\|CAN\|EM\|SUB\|ESC\|FS\|GS\|RS\|US\|SP\|DEL\)" -syn match hsSpecialCharError contained "\\&\|'''\+" -sy region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar,@Spell -sy match hsCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=hsSpecialChar,hsSpecialCharError -sy match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hsSpecialCharError - -" (Qualified) identifiers (no default highlighting) -syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" -syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" - -" Infix operators--most punctuation characters and any (qualified) identifier -" enclosed in `backquotes`. An operator starting with : is a constructor, -" others are variables (e.g. functions). -syn match hsVarSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[-!#$%&\*\+/<=>\?@\\^|~.][-!#$%&\*\+/<=>\?@\\^|~:.]*" -syn match hsConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*" -syn match hsVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`" -syn match hsConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`" - -" Toplevel Template Haskell support -"sy match hsTHTopLevel "^[a-z]\(\(.\&[^=]\)\|\(\n[^a-zA-Z0-9]\)\)*" -sy match hsTHIDTopLevel "^[a-z]\S*" -sy match hsTHTopLevel "^\$(\?" nextgroup=hsTHTopLevelName -sy match hsTHTopLevelName "[a-z]\S*" contained - -" Reserved symbols--cannot be overloaded. -syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}" - -sy region hsInnerParen start="(" end=")" contained contains=hsInnerParen,hsConSym,hsType,hsVarSym -sy region hs_InfixOpFunctionName start="^(" end=")\s*[^:`]\(\W\&\S\&[^'\"`()[\]{}@]\)\+"re=s - \ contained keepend contains=hsInnerParen,hs_HlInfixOp - -sy match hs_hlFunctionName "[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained -sy match hs_FunctionName "^[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained contains=hs_hlFunctionName -sy match hs_HighliteInfixFunctionName "`[a-z_][^`]*`" contained -sy match hs_InfixFunctionName "^\S[^=]*`[a-z_][^`]*`"me=e-1 contained contains=hs_HighliteInfixFunctionName,hsType,hsConSym,hsVarSym,hsString,hsCharacter -sy match hs_HlInfixOp "\(\W\&\S\&[^`(){}'[\]]\)\+" contained contains=hsString -sy match hs_InfixOpFunctionName "^\(\(\w\|[[\]{}]\)\+\|\(\".*\"\)\|\('.*'\)\)\s*[^:]=*\(\W\&\S\&[^='\"`()[\]{}@]\)\+" - \ contained contains=hs_HlInfixOp,hsCharacter - -sy match hs_OpFunctionName "(\(\W\&[^(),\"]\)\+)" contained -"sy region hs_Function start="^["'a-z_([{]" end="=\(\s\|\n\|\w\|[([]\)" keepend extend -sy region hs_Function start="^["'a-zA-Z_([{]\(\(.\&[^=]\)\|\(\n\s\)\)*=" end="\(\s\|\n\|\w\|[([]\)" - \ contains=hs_OpFunctionName,hs_InfixOpFunctionName,hs_InfixFunctionName,hs_FunctionName,hsType,hsConSym,hsVarSym,hsString,hsCharacter - -sy match hs_DeclareFunction "^[a-z_(]\S*\(\s\|\n\)*::" contains=hs_FunctionName,hs_OpFunctionName - -" hi hs_InfixOpFunctionName guibg=yellow -" hi hs_Function guibg=green -" hi hs_InfixFunctionName guibg=red -" hi hs_DeclareFunction guibg=red - -sy keyword hsStructure data family class where instance default deriving -sy keyword hsTypedef type newtype - -sy keyword hsInfix infix infixl infixr -sy keyword hsStatement do case of let in -sy keyword hsConditional if then else - -"if exists("hs_highlight_types") - " Primitive types from the standard prelude and libraries. - sy match hsType "\<[A-Z]\(\S\&[^,.]\)*\>" - sy match hsType "()" -"endif - -" Not real keywords, but close. -if exists("hs_highlight_boolean") - " Boolean constants from the standard prelude. - syn keyword hsBoolean True False -endif - -syn region hsPackageString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained -sy match hsModuleName excludenl "\([A-Z]\w*\.\?\)*" contained - -sy match hsImport "\\s\+\(qualified\s\+\)\?\(\<\(\w\|\.\)*\>\)" - \ contains=hsModuleName,hsImportLabel - \ nextgroup=hsImportParams,hsImportIllegal skipwhite -sy keyword hsImportLabel import qualified contained - -sy match hsImportIllegal "\w\+" contained - -sy keyword hsAsLabel as contained -sy keyword hsHidingLabel hiding contained - -sy match hsImportParams "as\s\+\(\w\+\)" contained - \ contains=hsModuleName,hsAsLabel - \ nextgroup=hsImportParams,hsImportIllegal skipwhite -sy match hsImportParams "hiding" contained - \ contains=hsHidingLabel - \ nextgroup=hsImportParams,hsImportIllegal skipwhite -sy region hsImportParams start="(" end=")" contained - \ contains=hsBlockComment,hsLineComment, hsType,hsDelimTypeExport,hs_hlFunctionName,hs_OpFunctionName - \ nextgroup=hsImportIllegal skipwhite - -" hi hsImport guibg=red -"hi hsImportParams guibg=bg -"hi hsImportIllegal guibg=bg -"hi hsModuleName guibg=bg - -"sy match hsImport "\\(.\|[^(]\)*\((.*)\)\?" -" \ contains=hsPackageString,hsImportLabel,hsImportMod,hsModuleName,hsImportList -"sy keyword hsImportLabel import contained -"sy keyword hsImportMod as qualified hiding contained -"sy region hsImportListInner start="(" end=")" contained keepend extend contains=hs_OpFunctionName -"sy region hsImportList matchgroup=hsImportListParens start="("rs=s+1 end=")"re=e-1 -" \ contained -" \ keepend extend -" \ contains=hsType,hsLineComment,hsBlockComment,hs_hlFunctionName,hsImportListInner - - - -" new module highlighting -syn region hsDelimTypeExport start="\<[A-Z]\(\S\&[^,.]\)*\>(" end=")" contained - \ contains=hsType - -sy keyword hsExportModuleLabel module contained -sy match hsExportModule "\\(\s\|\t\|\n\)*\([A-Z]\w*\.\?\)*" contained contains=hsExportModuleLabel,hsModuleName - -sy keyword hsModuleStartLabel module contained -sy keyword hsModuleWhereLabel where contained - -syn match hsModuleStart "^module\(\s\|\n\)*\(\<\(\w\|\.\)*\>\)\(\s\|\n\)*" - \ contains=hsModuleStartLabel,hsModuleName - \ nextgroup=hsModuleCommentA,hsModuleExports,hsModuleWhereLabel - -syn region hsModuleCommentA start="{-" end="-}" - \ contains=hsModuleCommentA,hsCommentTodo,@Spell contained - \ nextgroup=hsModuleCommentA,hsModuleExports,hsModuleWhereLabel skipwhite skipnl - -syn match hsModuleCommentA "--.*\n" - \ contains=hsCommentTodo,@Spell contained - \ nextgroup=hsModuleCommentA,hsModuleExports,hsModuleWhereLabel skipwhite skipnl - -syn region hsModuleExports start="(" end=")" contained - \ nextgroup=hsModuleCommentB,hsModuleWhereLabel skipwhite skipnl - \ contains=hsBlockComment,hsLineComment,hsType,hsDelimTypeExport,hs_hlFunctionName,hs_OpFunctionName,hsExportModule - -syn match hsModuleCommentB "--.*\n" - \ contains=hsCommentTodo,@Spell contained - \ nextgroup=hsModuleCommentB,hsModuleWhereLabel skipwhite skipnl - -syn region hsModuleCommentB start="{-" end="-}" - \ contains=hsModuleCommentB,hsCommentTodo,@Spell contained - \ nextgroup=hsModuleCommentB,hsModuleWhereLabel skipwhite skipnl -" end module highlighting - -" FFI support -sy keyword hsFFIForeign foreign contained -"sy keyword hsFFIImportExport import export contained -sy keyword hsFFIImportExport export contained -sy keyword hsFFICallConvention ccall stdcall contained -sy keyword hsFFISafety safe unsafe contained -sy region hsFFIString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=hsSpecialChar -sy match hsFFI excludenl "\\(.\&[^\"]\)*\"\(.\)*\"\(\s\|\n\)*\(.\)*::" - \ keepend - \ contains=hsFFIForeign,hsFFIImportExport,hsFFICallConvention,hsFFISafety,hsFFIString,hs_OpFunctionName,hs_hlFunctionName - - -sy match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" -sy match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" - -" Comments -sy keyword hsCommentTodo TODO FIXME XXX TBD contained -sy match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=hsCommentTodo,@Spell -sy region hsBlockComment start="{-" end="-}" contains=hsBlockComment,hsCommentTodo,@Spell -sy region hsPragma start="{-#" end="#-}" - -" QuasiQuotation -sy region hsQQ start="\[\$" end="|\]"me=e-2 keepend contains=hsQQVarID,hsQQContent nextgroup=hsQQEnd -sy region hsQQNew start="\[\(.\&[^|]\&\S\)*|" end="|\]"me=e-2 keepend contains=hsQQVarIDNew,hsQQContent nextgroup=hsQQEnd -sy match hsQQContent ".*" contained -sy match hsQQEnd "|\]" contained -sy match hsQQVarID "\[\$\(.\&[^|]\)*|" contained -sy match hsQQVarIDNew "\[\(.\&[^|]\)*|" contained - -if exists("hs_highlight_debug") - " Debugging functions from the standard prelude. - syn keyword hsDebug undefined error trace -endif - - -" C Preprocessor directives. Shamelessly ripped from c.vim and trimmed -" First, see whether to flag directive-like lines or not -if (!exists("hs_allow_hash_operator")) - syn match cError display "^\s*\(%:\|#\).*$" -endif -" Accept %: for # (C99) -syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCommentError -syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" -syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 -syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cCppSkip -syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cCppSkip -syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn match cIncluded display contained "<[^>]*>" -syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded -syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cCppOut,cCppOut2,cCppSkip,cCommentStartError -syn region cDefine matchgroup=cPreCondit start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" -syn region cPreProc matchgroup=cPreCondit start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend - -syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=cCommentStartError,cSpaceError contained -syntax match cCommentError display "\*/" contained -syntax match cCommentStartError display "/\*"me=e-1 contained -syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained - - -if version >= 508 || !exists("did_hs_syntax_inits") - if version < 508 - let did_hs_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink hs_hlFunctionName Function - HiLink hs_HighliteInfixFunctionName Function - HiLink hs_HlInfixOp Function - HiLink hs_OpFunctionName Function - HiLink hsTypedef Typedef - HiLink hsVarSym hsOperator - HiLink hsConSym hsOperator - if exists("hs_highlight_delimiters") - " Some people find this highlighting distracting. - HiLink hsDelimiter Delimiter - endif - - HiLink hsModuleStartLabel Structure - HiLink hsExportModuleLabel Keyword - HiLink hsModuleWhereLabel Structure - HiLink hsModuleName Normal - - HiLink hsImportIllegal Error - HiLink hsAsLabel hsImportLabel - HiLink hsHidingLabel hsImportLabel - HiLink hsImportLabel Include - HiLink hsImportMod Include - HiLink hsPackageString hsString - - HiLink hsOperator Operator - - HiLink hsInfix Keyword - HiLink hsStructure Structure - HiLink hsStatement Statement - HiLink hsConditional Conditional - - HiLink hsSpecialCharError Error - HiLink hsSpecialChar SpecialChar - HiLink hsString String - HiLink hsFFIString String - HiLink hsCharacter Character - HiLink hsNumber Number - HiLink hsFloat Float - - HiLink hsLiterateComment hsComment - HiLink hsBlockComment hsComment - HiLink hsLineComment hsComment - HiLink hsModuleCommentA hsComment - HiLink hsModuleCommentB hsComment - HiLink hsComment Comment - HiLink hsCommentTodo Todo - HiLink hsPragma SpecialComment - HiLink hsBoolean Boolean - - if exists("hs_highlight_types") - HiLink hsDelimTypeExport hsType - HiLink hsType Type - endif - - HiLink hsDebug Debug - - HiLink cCppString hsString - HiLink cCommentStart hsComment - HiLink cCommentError hsError - HiLink cCommentStartError hsError - HiLink cInclude Include - HiLink cPreProc PreProc - HiLink cDefine Macro - HiLink cIncluded hsString - HiLink cError Error - HiLink cPreCondit PreCondit - HiLink cComment Comment - HiLink cCppSkip cCppOut - HiLink cCppOut2 cCppOut - HiLink cCppOut Comment - - HiLink hsFFIForeign Keyword - HiLink hsFFIImportExport Structure - HiLink hsFFICallConvention Keyword - HiLink hsFFISafety Keyword - - HiLink hsTHIDTopLevel Macro - HiLink hsTHTopLevelName Macro - - HiLink hsQQVarID Keyword - HiLink hsQQVarIDNew Keyword - HiLink hsQQEnd Keyword - HiLink hsQQContent String - - delcommand HiLink -endif - -let b:current_syntax = "haskell" - diff --git a/.vim/syntax/hgannotate.vim b/.vim/syntax/hgannotate.vim deleted file mode 100755 index cee9a23..0000000 --- a/.vim/syntax/hgannotate.vim +++ /dev/null @@ -1,40 +0,0 @@ -" Vim syntax file -" Language: HG annotate output -" Maintainer: Bob Hiestand -" Remark: Used by the vcscommand plugin. -" License: -" Copyright (c) 2010 Bob Hiestand -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. - -if exists("b:current_syntax") - finish -endif - -syn match hgVer /\d\+/ contained -syn match hgName /^\s*\S\+/ contained -syn match hgHead /^\s*\S\+\s\+\d\+:/ contains=hgVer,hgName - -if !exists("did_hgannotate_syntax_inits") - let did_hgannotate_syntax_inits = 1 - hi link hgName Type - hi link hgVer Statement -endif - -let b:current_syntax="hgAnnotate" diff --git a/.vim/syntax/java.vim b/.vim/syntax/java.vim deleted file mode 100644 index 8c33b12..0000000 --- a/.vim/syntax/java.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Highlight Class and Function names -syn match javaCustomParen "(" contains=javaParenT -syn match javaCustomFunc "\w\+\s*(" contains=javaCustomParen -syn match javaCustomScope "::" -syn match javaCustomClass "\w\+\s*::" contains=cCustomScope - -hi def link javaCustomFunc Function -hi def link javaCustomClass Function - diff --git a/.vim/syntax/javascript.vim b/.vim/syntax/javascript.vim deleted file mode 100644 index 53b684e..0000000 --- a/.vim/syntax/javascript.vim +++ /dev/null @@ -1,247 +0,0 @@ -" Vim syntax file -" Language: JavaScript -" Maintainer: Yi Zhao (ZHAOYI) -" Last Change: June 4, 2009 -" Version: 0.7.7 -" Changes: Add "undefined" as a type keyword -" -" TODO: -" - Add the HTML syntax inside the JSDoc - -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish - endif - let main_syntax = 'javascript' -endif - -"" Drop fold if it set but VIM doesn't support it. -let b:javascript_fold='true' -if version < 600 " Don't support the old version - unlet! b:javascript_fold -endif - -"" dollar sigh is permittd anywhere in an identifier -setlocal iskeyword+=$ - -syntax sync fromstart - -"" JavaScript comments -syntax keyword javaScriptCommentTodo TODO FIXME XXX TBD contained -syntax region javaScriptLineComment start=+\/\/+ end=+$+ keepend contains=javaScriptCommentTodo,@Spell -syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend contains=javaScriptCommentTodo,@Spell fold -syntax region javaScriptCvsTag start="\$\cid:" end="\$" oneline contained -syntax region javaScriptComment start="/\*" end="\*/" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold - -"" JSDoc support start -if !exists("javascript_ignore_javaScriptdoc") - syntax case ignore - - "" syntax coloring for javadoc comments (HTML) - "syntax include @javaHtml :p:h/html.vim - "unlet b:current_syntax - - syntax region javaScriptDocComment matchgroup=javaScriptComment start="/\*\*\s*$" end="\*/" contains=javaScriptDocTags,javaScriptCommentTodo,javaScriptCvsTag,@javaScriptHtml,@Spell fold - syntax match javaScriptDocTags contained "@\(param\|argument\|requires\|exception\|throws\|type\|class\|extends\|see\|link\|member\|module\|method\|title\|namespace\|optional\|default\|base\|file\)\>" nextgroup=javaScriptDocParam,javaScriptDocSeeTag skipwhite - syntax match javaScriptDocTags contained "@\(beta\|deprecated\|description\|fileoverview\|author\|license\|version\|returns\=\|constructor\|private\|protected\|final\|ignore\|addon\|exec\)\>" - syntax match javaScriptDocParam contained "\%(#\|\w\|\.\|:\|\/\)\+" - syntax region javaScriptDocSeeTag contained matchgroup=javaScriptDocSeeTag start="{" end="}" contains=javaScriptDocTags - - syntax case match -endif "" JSDoc end - -syntax case match - -"" Syntax in the JavaScript code -syntax match javaScriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\." -syntax region javaScriptStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=javaScriptSpecial,@htmlPreproc -syntax region javaScriptStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=javaScriptSpecial,@htmlPreproc -syntax region javaScriptRegexpString start=+/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gim]\{,3}+ contains=javaScriptSpecial,@htmlPreproc oneline -syntax match javaScriptNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/ -syntax match javaScriptFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/ -syntax match javaScriptLabel /\(?\s*\)\@/ - syntax match javaScriptDomElemFuncs contained /\%(insertBefore\|replaceChild\|removeChild\|appendChild\|hasChildNodes\|cloneNode\|normalize\|isSupported\|hasAttributes\|getAttribute\|setAttribute\|removeAttribute\|getAttributeNode\|setAttributeNode\|removeAttributeNode\|getElementsByTagName\|getAttributeNS\|setAttributeNS\|removeAttributeNS\|getAttributeNodeNS\|setAttributeNodeNS\|getElementsByTagNameNS\|hasAttribute\|hasAttributeNS\)\>/ nextgroup=javaScriptParen skipwhite - " HTML things - syntax match javaScriptHtmlElemAttrs contained /\%(className\|clientHeight\|clientLeft\|clientTop\|clientWidth\|dir\|id\|innerHTML\|lang\|length\|offsetHeight\|offsetLeft\|offsetParent\|offsetTop\|offsetWidth\|scrollHeight\|scrollLeft\|scrollTop\|scrollWidth\|style\|tabIndex\|title\)\>/ - syntax match javaScriptHtmlElemFuncs contained /\%(blur\|click\|focus\|scrollIntoView\|addEventListener\|dispatchEvent\|removeEventListener\|item\)\>/ nextgroup=javaScriptParen skipwhite - - " CSS Styles in JavaScript - syntax keyword javaScriptCssStyles contained color font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight letterSpacing lineBreak lineHeight quotes rubyAlign rubyOverhang rubyPosition - syntax keyword javaScriptCssStyles contained textAlign textAlignLast textAutospace textDecoration textIndent textJustify textJustifyTrim textKashidaSpace textOverflowW6 textShadow textTransform textUnderlinePosition - syntax keyword javaScriptCssStyles contained unicodeBidi whiteSpace wordBreak wordSpacing wordWrap writingMode - syntax keyword javaScriptCssStyles contained bottom height left position right top width zIndex - syntax keyword javaScriptCssStyles contained border borderBottom borderLeft borderRight borderTop borderBottomColor borderLeftColor borderTopColor borderBottomStyle borderLeftStyle borderRightStyle borderTopStyle borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderColor borderStyle borderWidth borderCollapse borderSpacing captionSide emptyCells tableLayout - syntax keyword javaScriptCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop - syntax keyword javaScriptCssStyles contained listStyle listStyleImage listStylePosition listStyleType - syntax keyword javaScriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage gackgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat - syntax keyword javaScriptCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType - syntax keyword javaScriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText - syntax keyword javaScriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor - - " Highlight ways - syntax match javaScriptDotNotation "\." nextgroup=javaScriptPrototype,javaScriptDomElemAttrs,javaScriptDomElemFuncs,javaScriptHtmlElemAttrs,javaScriptHtmlElemFuncs - syntax match javaScriptDotNotation "\.style\." nextgroup=javaScriptCssStyles - -endif "DOM/HTML/CSS - -"" end DOM/HTML/CSS specified things - - -"" Code blocks -syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation -syntax region javaScriptBracket matchgroup=javaScriptBracket transparent start="\[" end="\]" contains=@javaScriptAll,javaScriptParensErrB,javaScriptParensErrC,javaScriptBracket,javaScriptParen,javaScriptBlock,@htmlPreproc -syntax region javaScriptParen matchgroup=javaScriptParen transparent start="(" end=")" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrC,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc -syntax region javaScriptBlock matchgroup=javaScriptBlock transparent start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc - -"" catch errors caused by wrong parenthesis -syntax match javaScriptParensError ")\|}\|\]" -syntax match javaScriptParensErrA contained "\]" -syntax match javaScriptParensErrB contained ")" -syntax match javaScriptParensErrC contained "}" - -if main_syntax == "javascript" - syntax sync clear - syntax sync ccomment javaScriptComment minlines=200 - syntax sync match javaScriptHighlight grouphere javaScriptBlock /{/ -endif - -"" Fold control -if exists("b:javascript_fold") - syntax match javaScriptFunction /\/ nextgroup=javaScriptFuncName skipwhite - syntax match javaScriptOpAssign /=\@= 508 || !exists("did_javascript_syn_inits") - if version < 508 - let did_javascript_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink javaScriptComment Comment - HiLink javaScriptLineComment Comment - HiLink javaScriptDocComment Comment - HiLink javaScriptCommentTodo Todo - HiLink javaScriptCvsTag Function - HiLink javaScriptDocTags Special - HiLink javaScriptDocSeeTag Function - HiLink javaScriptDocParam Function - HiLink javaScriptStringS String - HiLink javaScriptStringD String - HiLink javaScriptRegexpString String - HiLink javaScriptCharacter Character - HiLink javaScriptPrototype Type - HiLink javaScriptConditional Conditional - HiLink javaScriptBranch Conditional - HiLink javaScriptRepeat Repeat - HiLink javaScriptStatement Statement -" HiLink javaScriptFunction Function - HiLink javaScriptFunction Keyword - HiLink javaScriptError Error - HiLink javaScriptParensError Error - HiLink javaScriptParensErrA Error - HiLink javaScriptParensErrB Error - HiLink javaScriptParensErrC Error - HiLink javaScriptOperator Operator - HiLink javaScriptType Type - HiLink javaScriptNull Type - HiLink javaScriptNumber Number - HiLink javaScriptFloat Number - HiLink javaScriptBoolean Boolean - HiLink javaScriptLabel Label - HiLink javaScriptSpecial Special - HiLink javaScriptSource Special - HiLink javaScriptGlobalObjects Special - HiLink javaScriptExceptions Special - - HiLink javaScriptDomErrNo Constant - HiLink javaScriptDomNodeConsts Constant - HiLink javaScriptDomElemAttrs Label - HiLink javaScriptDomElemFuncs PreProc - - HiLink javaScriptHtmlEvents Special - HiLink javaScriptHtmlElemAttrs Label - HiLink javaScriptHtmlElemFuncs PreProc - - HiLink javaScriptCssStyles Label - - delcommand HiLink -endif - -" Define the htmlJavaScript for HTML syntax html.vim -"syntax clear htmlJavaScript -"syntax clear javaScriptExpression -syntax cluster htmlJavaScript contains=@javaScriptAll,javaScriptBracket,javaScriptParen,javaScriptBlock,javaScriptParenError -syntax cluster javaScriptExpression contains=@javaScriptAll,javaScriptBracket,javaScriptParen,javaScriptBlock,javaScriptParenError,@htmlPreproc - -let b:current_syntax = "javascript" -if main_syntax == 'javascript' - unlet main_syntax -endif - -" vim: ts=4 diff --git a/.vim/syntax/lilypond-words b/.vim/syntax/lilypond-words deleted file mode 100644 index 612d59b..0000000 --- a/.vim/syntax/lilypond-words +++ /dev/null @@ -1,1040 +0,0 @@ -\\withMusicProperty -\\with -\\whiteTriangleMarkup -\\voiceTwoStyle -\\voiceTwo -\\voiceThreeStyle -\\voiceThree -\\voiceOneStyle -\\voiceOne -\\voiceNeutralStyle -\\voiceFourStyle -\\voiceFour -\\vocalName -\\virgula -\\virga -\\verylongfermata -\\verticallySpacedContexts -\\versus -\\version -\\varcoda -\\upprall -\\upmordent -\\upbow -\\up -\\unset -\\unit -\\unfoldRepeats -\\unaCorda -\\unHideNotes -\\type -\\tweak -\\turn -\\tupletUp -\\tupletNeutral -\\tupletDown -\\trill -\\treCorde -\\transposition -\\transposedCueDuring -\\transpose -\\tiny -\\timing -\\times -\\time -\\tildeSymbol -\\tieWaitForNote -\\tieUp -\\tieSolid -\\tieNeutral -\\tieDown -\\tieDotted -\\tieDashed -\\thumb -\\textSpannerUp -\\textSpannerNeutral -\\textSpannerDown -\\textLengthOn -\\textLengthOff -\\tenuto -\\tempoWholesPerMinute -\\tempo -\\teeny -\\tag -\\tablatureFormat -\\systemStartDelimiter -\\sustainOn -\\sustainOff -\\subdivideBeams -\\stropha -\\strokeFingerOrientations -\\stringTunings -\\stringOneTopmost -\\stringNumberOrientations -\\stopped -\\stopTrillSpan -\\stopTextSpan -\\stopStaff -\\stopGroup -\\stopGraceMusic -\\stopAppoggiaturaMusic -\\stopAcciaccaturaMusic -\\stop -\\stemUp -\\stemNeutral -\\stemDown -\\startTrillSpan -\\startTextSpan -\\startStaff -\\startGroup -\\startGraceMusic -\\startAppoggiaturaMusic -\\startAcciaccaturaMusic -\\start -\\staccato -\\staccatissimo -\\squashedPosition -\\spp -\\spacingTweaks -\\sp -\\sostenutoOn -\\sostenutoOff -\\soloText -\\soloIIText -\\smaller -\\small -\\slurUp -\\slurSolid -\\slurNeutral -\\slurDown -\\slurDotted -\\slurDashed -\\skipTypesetting -\\skip -\\simultaneous -\\signumcongruentiae -\\showStaffSwitch -\\shortfermata -\\shortVocalName -\\shortInstrumentName -\\shiftOnnn -\\shiftOnn -\\shiftOn -\\shiftOff -\\shiftDurations -\\sfz -\\sfp -\\sff -\\sf -\\setDefaultDurationToQuarter -\\set -\\sequential -\\semicirculus -\\semiGermanChords -\\segno -\\scriptDefinitions -\\scoreTweak -\\score -\\scaleDurations -\\sacredHarpHeads -\\rtoe -\\rightHandFinger -\\right -\\rheel -\\rfz -\\revert -\\reverseturn -\\rest -\\responsum -\\resetRelativeOctave -\\repeatTie -\\repeatCountVisibility -\\repeat -\\removeWithTag -\\remove -\\relative -\\rehearsalMark -\\quotedEventTypes -\\quoteDuring -\\quilisma -\\pt -\\printPartCombineTexts -\\printKeyCancellation -\\predefinedFretboardsOn -\\predefinedFretboardsOff -\\predefinedDiagramTable -\\prallup -\\prallprall -\\prallmordent -\\pralldown -\\prall -\\ppppp -\\pppp -\\ppp -\\pp -\\portato -\\pointAndClickOn -\\pointAndClickOff -\\pitchedTrill -\\pipeSymbol -\\phrygian -\\phrasingSlurUp -\\phrasingSlurSolid -\\phrasingSlurNeutral -\\phrasingSlurDown -\\phrasingSlurDotted -\\phrasingSlurDashed -\\pes -\\pedalUnaCordaStyle -\\pedalUnaCordaStrings -\\pedalSustainStyle -\\pedalSustainStrings -\\pedalSostenutoStyle -\\pedalSostenutoStrings -\\partialJazzMusic -\\partialJazzExceptions -\\partial -\\partcombine -\\partCombineListener -\\parenthesize -\\parenthesisOpenSymbol -\\parenthesisCloseSymbol -\\parallelMusic -\\paper -\\pageTurn -\\pageBreak -\\p -\\overrideProperty -\\override -\\ottava -\\oriscus -\\open -\\oneVoice -\\once -\\octaveCheck -\\objectid -\\numericTimeSignature -\\notemode -\\noteToFretFunction -\\normalsize -\\noPageTurn -\\noPageBreak -\\noBreak -\\noBeam -\\newSpacingSection -\\new -\\neumeDemoLayout -\\name -\\musicMap -\\mp -\\mordent -\\mm -\\mixolydian -\\minor -\\midiInstrument -\\midi -\\middleCPosition -\\middleCClefPosition -\\mf -\\metronomeMarkFormatter -\\mergeDifferentlyHeadedOn -\\mergeDifferentlyHeadedOff -\\mergeDifferentlyDottedOn -\\mergeDifferentlyDottedOff -\\melismaEnd -\\melismaBusyProperties -\\melisma -\\maxima -\\markuplines -\\markup -\\markFormatter -\\mark -\\marcato -\\makeClusters -\\majorSevenSymbol -\\major -\\maininput -\\lyricsto -\\lyrics -\\lyricmode -\\lyricMelismaAlignment -\\lydian -\\ltoe -\\longfermata -\\longa -\\locrian -\\localKeySignature -\\lineprall -\\linea -\\ligature -\\lheel -\\left -\\layout -\\large -\\laissezVibrer -\\label -\\killCues -\\keyAlterationOrder -\\key -\\keepWithTag -\\keepAliveInterfaces -\\italianChords -\\ionian -\\interscoreline -\\instrumentTransposition -\\instrumentSwitch -\\instrumentName -\\instrumentEqualizer -\\indent -\\includePageLayoutFile -\\include -\\inclinatum -\\in -\\improvisationOn -\\improvisationOff -\\implicitTimeSignatureVisibility -\\ij -\\iij -\\ignoreFiguredBassRest -\\ignoreBarChecks -\\ignatzekExceptions -\\ignatzekExceptionMusic -\\ictus -\\huge -\\highStringOne -\\hideStaffSwitch -\\hideNotes -\\header -\\harmonicAccidentals -\\harmonic -\\grobdescriptions -\\graceSettings -\\grace -\\glissando -\\germanChords -\\fz -\\fullJazzExceptions -\\frenchChords -\\fp -\\fontSize -\\flexa -\\flageolet -\\firstClef -\\fingeringOrientations -\\finalis -\\figures -\\figuremode -\\figuredBassFormatter -\\ffff -\\fff -\\ff -\\fermataMarkup -\\fermata -\\featherDurations -\\f -\\extraNatural -\\explicitKeySignatureVisibility -\\explicitClefVisibility -\\expandFullBarRests -\\espressivo -\\escapedSmallerSymbol -\\escapedParenthesisOpenSymbol -\\escapedParenthesisCloseSymbol -\\escapedExclamationSymbol -\\escapedBiggerSymbol -\\episemInitium -\\episemFinis -\\endincipit -\\enddim -\\enddecr -\\endcresc -\\endcr -\\endSpanners -\\easyHeadsOn -\\easyHeadsOff -\\dynamicUp -\\dynamicNeutral -\\dynamicDown -\\dynamicAbsoluteVolumeFunction -\\drums -\\drummode -\\drumStyleTable -\\drumPitchTable -\\downprall -\\downmordent -\\downbow -\\down -\\doubleRepeatType -\\dotsUp -\\dotsNeutral -\\dotsDown -\\dorian -\\divisioMinima -\\divisioMaxima -\\divisioMaior -\\displayMusic -\\displayLilyMusic -\\dimTextDim -\\dimTextDecresc -\\dimTextDecr -\\dimHairpin -\\dim -\\description -\\descendens -\\denies -\\deminutum -\\defaultchild -\\defaultTimeSignature -\\defaultBarType -\\default -\\decrescendoSpanner -\\decr -\\dashUnderscore -\\dashPlus -\\dashLarger -\\dashHat -\\dashDot -\\dashDash -\\dashBar -\\cueDuring -\\crescendoSpanner -\\crescTextCresc -\\crescHairpin -\\cresc -\\createSpacing -\\cr -\\context -\\consists -\\compressFullBarRests -\\coda -\\cm -\\clefPosition -\\clefOctavation -\\clefGlyph -\\clef -\\circulus -\\chords -\\chordmodifiers -\\chordmode -\\chordRootNamer -\\chordPrefixSpacer -\\chordNoteNamer -\\chordNameSeparator -\\chordNameFunction -\\chordNameExceptionsPartial -\\chordNameExceptionsFull -\\chordNameExceptions -\\change -\\center -\\cavum -\\caesura -\\cadenzaOn -\\cadenzaOff -\\breve -\\breathe -\\break -\\bracketOpenSymbol -\\bracketCloseSymbol -\\bookpart -\\book -\\blackTriangleMarkup -\\bigger -\\bendAfter -\\bassStaffProperties -\\bassFigureStaffAlignmentUp -\\bassFigureStaffAlignmentNeutral -\\bassFigureStaffAlignmentDown -\\bassFigureExtendersOn -\\bassFigureExtendersOff -\\barNumberVisibility -\\barNumberCheck -\\barCheckSynchronize -\\barAlways -\\bar -\\balloonText -\\balloonLengthOn -\\balloonLengthOff -\\balloonGrobText -\\automaticBars -\\autochange -\\autoCautionaries -\\autoBeaming -\\autoBeamSettings -\\autoBeamOn -\\autoBeamOff -\\autoBeamCheck -\\autoAccidentals -\\augmentum -\\auctum -\\assertBeamSlope -\\assertBeamQuant -\\ascendens -\\arpeggioParenthesis -\\arpeggioNormal -\\arpeggioBracket -\\arpeggioArrowUp -\\arpeggioArrowDown -\\arpeggio -\\appoggiatura -\\applyOutput -\\applyMusic -\\applyContext -\\alternative -\\allowPageTurn -\\alias -\\aikenHeads -\\afterGraceFraction -\\afterGrace -\\aeolian -\\addlyrics -\\addQuote -\\addInstrumentDefinition -\\acciaccatura -\\accepts -\\accentus -\\accent -\\aDueText -\\RemoveEmptyStaffContext -\\RemoveEmptyRhythmicStaffContext -\\IJ -\\IIJ -\\C -\\B -\\AncientRemoveEmptyStaffContext -\\A -strings -Volta_engraver -Voice -Vertically_spaced_contexts_engraver -Vertical_align_engraver -Vaticana_ligature_engraver -VaticanaVoice -VaticanaStaff -Tweak_engraver -Tuplet_engraver -Trill_spanner_engraver -Timing_translator -Time_signature_performer -Time_signature_engraver -Tie_performer -Tie_engraver -Text_spanner_engraver -Text_engraver -Tempo_performer -Tab_staff_symbol_engraver -Tab_note_heads_engraver -Tab_harmonic_engraver -TabVoice -TabStaff -System_start_delimiter_engraver -Swallow_performer -Swallow_engraver -String_number_engraver -Stem_engraver -Stanza_number_engraver -Stanza_number_align_engraver -Staff_symbol_engraver -Staff_performer -Staff_collecting_engraver -StaffGroup -Staff -Spanner_break_forbid_engraver -Span_bar_engraver -Span_arpeggio_engraver -Spacing_engraver -Slur_performer -Slur_engraver -Slash_repeat_engraver -Skip_event_swallow_translator -Separating_line_group_engraver -Script_row_engraver -Script_engraver -Script_column_engraver -Score -Rhythmic_column_engraver -RhythmicStaff -Rest_swallow_translator -Rest_engraver -Rest_collision_engraver -Repeat_tie_engraver -Repeat_acknowledge_engraver -Pitched_trill_engraver -Pitch_squash_engraver -Piano_pedal_performer -Piano_pedal_engraver -Piano_pedal_align_engraver -PianoStaff -Phrasing_slur_engraver -Percent_repeat_engraver -Part_combine_engraver -Parenthesis_engraver -Paper_column_engraver -Output_property_engraver -Ottava_spanner_engraver -Note_swallow_translator -Note_spacing_engraver -Note_performer -Note_name_engraver -Note_heads_engraver -Note_head_line_engraver -NoteNames -New_fingering_engraver -New_dynamic_engraver -Multi_measure_rest_engraver -Metronome_mark_engraver -Mensural_ligature_engraver -MensuralVoice -MensuralStaff -Mark_engraver -Lyrics -Lyric_performer -Lyric_engraver -Ligature_bracket_engraver -Ledger_line_engraver -Laissez_vibrer_engraver -Key_performer -Key_engraver -Instrument_switch_engraver -Instrument_name_engraver -Hyphen_engraver -Hara_kiri_engraver -Grob_pq_engraver -GregorianTranscriptionVoice -GregorianTranscriptionStaff -GrandStaff -Grace_spacing_engraver -Grace_engraver -Grace_beam_engraver -Global -Glissando_engraver -Fretboard_engraver -FretBoards -Forbid_line_break_engraver -Font_size_engraver -Fingering_engraver -Figured_bass_position_engraver -Figured_bass_engraver -FiguredBass -Extender_engraver -Dynamic_performer -Dynamic_align_engraver -Drum_notes_engraver -Drum_note_performer -DrumVoice -DrumStaff -Dots_engraver -Dot_column_engraver -Devnull -Default_bar_line_engraver -Custos_engraver -CueVoice -Control_track_performer -Collision_engraver -Cluster_spanner_engraver -Clef_engraver -Chord_tremolo_engraver -Chord_name_engraver -ChordNames -ChordNameVoice -ChoirStaff -Breathing_sign_engraver -Break_align_engraver -Bend_engraver -Beam_performer -Beam_engraver -Bar_number_engraver -Bar_engraver -Axis_group_engraver -Auto_beam_engraver -Arpeggio_engraver -Accidental_engraver -vibraslap -twoup -twodown -tt -triangle -threeup -threedown -tambourine -splashcymbal -solstqt -solss -solsqt -solsd -solsb -sols -solkk -solk -soldsd -soldd -sold -solbtqt -solbsb -solbqt -solbb -solb -sol -snare -sistqt -siss -sisqt -sisd -sisb -sis -sikk -sik -sidsd -sidestick -sidd -sid -sibtqt -sibsb -sibqt -sibb -sib -si -shortwhistle -shortguiro -ridecymbalb -ridecymbala -ridecymbal -ridebell -restqt -ress -resqt -resd -resb -res -rekk -rek -redsd -redd -red -rebtqt -rebsb -rebqt -rebb -reb -re -pedalhihat -opentriangle -openloconga -openlobongo -openhihat -openhiconga -openhibongo -opencuica -oneup -onedown -mutetriangle -muteloconga -mutelobongo -mutehiconga -mutehibongo -mutecuica -mistqt -miss -misqt -misd -misb -mis -mikk -mik -midsd -midd -mid -mibtqt -mibsb -mibqt -mibb -mib -mi -maracas -lowtom -lowoodblock -lowmidtom -lowfloortom -lotimbale -losidestick -longwhistle -longguiro -loconga -lobongo -loagogo -lastqt -lass -lasqt -lasd -lasb -las -lakk -lak -ladsd -ladd -lad -labtqt -labsb -labqt -labb -lab -la -hiwoodblock -hitimbale -hississ -hiss -hisis -hisih -hisidestick -his -himidtom -hihat -hih -hightom -highfloortom -hiconga -hibongo -hiagogo -hessess -heses -heseh -handclap -halfopenhihat -h -gx -guiro -gtqs -gtqf -gss -gsharpsharp -gsharp -gs -gqs -gqf -gississ -giss -gisis -gisih -gis -gih -gflatflat -gflat -gff -gf -gessess -gess -geses -geseh -ges -geh -g -fx -ftqs -ftqf -fss -fsharpsharp -fsharp -fs -fqs -fqf -fourup -fourdown -fiveup -fivedown -fississ -fiss -fisis -fisih -fis -fih -fflatflat -fflat -fff -ff -fessess -fess -feses -feseh -fes -feh -fastqt -fass -fasqt -fasd -fasb -fas -fakk -fak -fadsd -fadd -fad -fabtqt -fabsb -fabqt -fabb -fab -fa -f -ex -etqs -etqf -essess -ess -esharpsharp -esharp -eses -eseh -es -eqs -eqf -electricsnare -eississ -eiss -eisis -eisih -eis -eih -eflatflat -eflat -eff -ef -eessess -eess -eeses -eeseh -ees -eeh -e -dx -dtqs -dtqf -dss -dsharpsharp -dsharp -ds -dqs -dqf -dostqt -doss -dosqt -dosd -dosb -dos -dokk -dok -dodsd -dodd -dod -dobtqt -dobsb -dobqt -dobb -dob -do -dississ -diss -disis -disih -dis -dih -dflatflat -dflat -dff -df -dessess -dess -deses -deseh -des -deh -d -cx -ctqs -ctqf -css -csharpsharp -csharp -cs -crashcymbalb -crashcymbala -crashcymbal -cqs -cqf -cowbell -closedhihat -claves -cississ -ciss -cisis -cisih -cis -cih -chinesecymbal -cflatflat -cflat -cff -cf -cessess -cess -ceses -ceseh -ces -ceh -cabasa -c -bx -btqs -btqf -bss -bsharpsharp -bsharp -bs -bqs -bqf -bisis -bisih -bis -bih -bflatflat -bflat -bff -bf -bess -beses -beseh -bes -beh -bb -bassdrum -b -ax -atqs -atqf -assess -ass -asharpsharp -asharp -ases -aseh -asas -asah -as -aqs -aqf -aississ -aiss -aisis -aisih -ais -aih -aflatflat -aflat -aff -af -aessess -aess -aeses -aeseh -aes -aeh -acousticsnare -a diff --git a/.vim/syntax/lilypond-words.vim b/.vim/syntax/lilypond-words.vim deleted file mode 100644 index cd4eb57..0000000 --- a/.vim/syntax/lilypond-words.vim +++ /dev/null @@ -1,3 +0,0 @@ -syn match lilyKeyword "[-_^]\?\\\(withMusicProperty\|with\|whiteTriangleMarkup\|voiceTwoStyle\|voiceTwo\|voiceThreeStyle\|voiceThree\|voiceOneStyle\|voiceOne\|voiceNeutralStyle\|voiceFourStyle\|voiceFour\|vocalName\|virgula\|virga\|verylongfermata\|verticallySpacedContexts\|versus\|version\|varcoda\|upprall\|upmordent\|upbow\|up\|unset\|unit\|unfoldRepeats\|unaCorda\|unHideNotes\|type\|tweak\|turn\|tupletUp\|tupletNeutral\|tupletDown\|trill\|treCorde\|transposition\|transposedCueDuring\|transpose\|tiny\|timing\|times\|time\|tildeSymbol\|tieWaitForNote\|tieUp\|tieSolid\|tieNeutral\|tieDown\|tieDotted\|tieDashed\|thumb\|textSpannerUp\|textSpannerNeutral\|textSpannerDown\|textLengthOn\|textLengthOff\|tenuto\|tempoWholesPerMinute\|tempo\|teeny\|tag\|tablatureFormat\|systemStartDelimiter\|sustainOn\|sustainOff\|subdivideBeams\|stropha\|strokeFingerOrientations\|stringTunings\|stringOneTopmost\|stringNumberOrientations\|stopped\|stopTrillSpan\|stopTextSpan\|stopStaff\|stopGroup\|stopGraceMusic\|stopAppoggiaturaMusic\|stopAcciaccaturaMusic\|stop\|stemUp\|stemNeutral\|stemDown\|startTrillSpan\|startTextSpan\|startStaff\|startGroup\|startGraceMusic\|startAppoggiaturaMusic\|startAcciaccaturaMusic\|start\|staccato\|staccatissimo\|squashedPosition\|spp\|spacingTweaks\|sp\|sostenutoOn\|sostenutoOff\|soloText\|soloIIText\|smaller\|small\|slurUp\|slurSolid\|slurNeutral\|slurDown\|slurDotted\|slurDashed\|skipTypesetting\|skip\|simultaneous\|signumcongruentiae\|showStaffSwitch\|shortfermata\|shortVocalName\|shortInstrumentName\|shiftOnnn\|shiftOnn\|shiftOn\|shiftOff\|shiftDurations\|sfz\|sfp\|sff\|sf\|setDefaultDurationToQuarter\|set\|sequential\|semicirculus\|semiGermanChords\|segno\|scriptDefinitions\|scoreTweak\|score\|scaleDurations\|sacredHarpHeads\|rtoe\|rightHandFinger\|right\|rheel\|rfz\|revert\|reverseturn\|rest\|responsum\|resetRelativeOctave\|repeatTie\|repeatCountVisibility\|repeat\|removeWithTag\|remove\|relative\|rehearsalMark\|quotedEventTypes\|quoteDuring\|quilisma\|pt\|printPartCombineTexts\|printKeyCancellation\|predefinedFretboardsOn\|predefinedFretboardsOff\|predefinedDiagramTable\|prallup\|prallprall\|prallmordent\|pralldown\|prall\|ppppp\|pppp\|ppp\|pp\|portato\|pointAndClickOn\|pointAndClickOff\|pitchedTrill\|pipeSymbol\|phrygian\|phrasingSlurUp\|phrasingSlurSolid\|phrasingSlurNeutral\|phrasingSlurDown\|phrasingSlurDotted\|phrasingSlurDashed\|pes\|pedalUnaCordaStyle\|pedalUnaCordaStrings\|pedalSustainStyle\|pedalSustainStrings\|pedalSostenutoStyle\|pedalSostenutoStrings\|partialJazzMusic\|partialJazzExceptions\|partial\|partcombine\|partCombineListener\|parenthesize\|parenthesisOpenSymbol\|parenthesisCloseSymbol\|parallelMusic\|paper\|pageTurn\|pageBreak\|p\|overrideProperty\|override\|ottava\|oriscus\|open\|oneVoice\|once\|octaveCheck\|objectid\|numericTimeSignature\|notemode\|noteToFretFunction\|normalsize\|noPageTurn\|noPageBreak\|noBreak\|noBeam\|newSpacingSection\|new\|neumeDemoLayout\|name\|musicMap\|mp\|mordent\|mm\|mixolydian\|minor\|midiInstrument\|midi\|middleCPosition\|middleCClefPosition\|mf\|metronomeMarkFormatter\|mergeDifferentlyHeadedOn\|mergeDifferentlyHeadedOff\|mergeDifferentlyDottedOn\|mergeDifferentlyDottedOff\|melismaEnd\|melismaBusyProperties\|melisma\|maxima\|markuplines\|markup\|markFormatter\|mark\|marcato\|makeClusters\|majorSevenSymbol\|major\|maininput\|lyricsto\|lyrics\|lyricmode\|lyricMelismaAlignment\|lydian\|ltoe\|longfermata\|longa\|locrian\|localKeySignature\|lineprall\|linea\|ligature\|lheel\|left\|layout\|large\|laissezVibrer\|label\|killCues\|keyAlterationOrder\|key\|keepWithTag\|keepAliveInterfaces\|italianChords\|ionian\|interscoreline\|instrumentTransposition\|instrumentSwitch\|instrumentName\|instrumentEqualizer\|indent\|includePageLayoutFile\|include\|inclinatum\|in\|improvisationOn\|improvisationOff\|implicitTimeSignatureVisibility\|ij\|iij\|ignoreFiguredBassRest\|ignoreBarChecks\|ignatzekExceptions\|ignatzekExceptionMusic\|ictus\|huge\|highStringOne\|hideStaffSwitch\|hideNotes\|header\|harmonicAccidentals\|harmonic\|grobdescriptions\|graceSettings\|grace\|glissando\|germanChords\|fz\|fullJazzExceptions\|frenchChords\|fp\|fontSize\|flexa\|flageolet\|firstClef\|fingeringOrientations\|finalis\|figures\|figuremode\|figuredBassFormatter\|ffff\|fff\|ff\|fermataMarkup\|fermata\|featherDurations\|f\|extraNatural\|explicitKeySignatureVisibility\|explicitClefVisibility\|expandFullBarRests\|espressivo\|escapedSmallerSymbol\|escapedParenthesisOpenSymbol\|escapedParenthesisCloseSymbol\|escapedExclamationSymbol\|escapedBiggerSymbol\|episemInitium\|episemFinis\|endincipit\|enddim\|enddecr\|endcresc\|endcr\|endSpanners\|easyHeadsOn\|easyHeadsOff\|dynamicUp\|dynamicNeutral\|dynamicDown\|dynamicAbsoluteVolumeFunction\|drums\|drummode\|drumStyleTable\|drumPitchTable\|downprall\|downmordent\|downbow\|down\|doubleRepeatType\|dotsUp\|dotsNeutral\|dotsDown\|dorian\|divisioMinima\|divisioMaxima\|divisioMaior\|displayMusic\|displayLilyMusic\|dimTextDim\|dimTextDecresc\|dimTextDecr\|dimHairpin\|dim\|description\|descendens\|denies\|deminutum\|defaultchild\|defaultTimeSignature\|defaultBarType\|default\|decrescendoSpanner\|decr\|dashUnderscore\|dashPlus\|dashLarger\|dashHat\|dashDot\|dashDash\|dashBar\|cueDuring\|crescendoSpanner\|crescTextCresc\|crescHairpin\|cresc\|createSpacing\|cr\|context\|consists\|compressFullBarRests\|coda\|cm\|clefPosition\|clefOctavation\|clefGlyph\|clef\|circulus\|chords\|chordmodifiers\|chordmode\|chordRootNamer\|chordPrefixSpacer\|chordNoteNamer\|chordNameSeparator\|chordNameFunction\|chordNameExceptionsPartial\|chordNameExceptionsFull\|chordNameExceptions\|change\|center\|cavum\|caesura\|cadenzaOn\|cadenzaOff\|breve\|breathe\|break\|bracketOpenSymbol\|bracketCloseSymbol\|bookpart\|book\|blackTriangleMarkup\|bigger\|bendAfter\|bassStaffProperties\|bassFigureStaffAlignmentUp\|bassFigureStaffAlignmentNeutral\|bassFigureStaffAlignmentDown\|bassFigureExtendersOn\|bassFigureExtendersOff\|barNumberVisibility\|barNumberCheck\|barCheckSynchronize\|barAlways\|bar\|balloonText\|balloonLengthOn\|balloonLengthOff\|balloonGrobText\|automaticBars\|autochange\|autoCautionaries\|autoBeaming\|autoBeamSettings\|autoBeamOn\|autoBeamOff\|autoBeamCheck\|autoAccidentals\|augmentum\|auctum\|assertBeamSlope\|assertBeamQuant\|ascendens\|arpeggioParenthesis\|arpeggioNormal\|arpeggioBracket\|arpeggioArrowUp\|arpeggioArrowDown\|arpeggio\|appoggiatura\|applyOutput\|applyMusic\|applyContext\|alternative\|allowPageTurn\|alias\|aikenHeads\|afterGraceFraction\|afterGrace\|aeolian\|addlyrics\|addQuote\|addInstrumentDefinition\|acciaccatura\|accepts\|accentus\|accent\|aDueText\|RemoveEmptyStaffContext\|RemoveEmptyRhythmicStaffContext\|IJ\|IIJ\|C\|B\|AncientRemoveEmptyStaffContext\|A\|n\)\(\A\|\n\)"me=e-1 -syn match lilyReservedWord "\(\A\|\n\)\(strings\|Volta_engraver\|Voice\|Vertically_spaced_contexts_engraver\|Vertical_align_engraver\|Vaticana_ligature_engraver\|VaticanaVoice\|VaticanaStaff\|Tweak_engraver\|Tuplet_engraver\|Trill_spanner_engraver\|Timing_translator\|Time_signature_performer\|Time_signature_engraver\|Tie_performer\|Tie_engraver\|Text_spanner_engraver\|Text_engraver\|Tempo_performer\|Tab_staff_symbol_engraver\|Tab_note_heads_engraver\|Tab_harmonic_engraver\|TabVoice\|TabStaff\|System_start_delimiter_engraver\|Swallow_performer\|Swallow_engraver\|String_number_engraver\|Stem_engraver\|Stanza_number_engraver\|Stanza_number_align_engraver\|Staff_symbol_engraver\|Staff_performer\|Staff_collecting_engraver\|StaffGroup\|Staff\|Spanner_break_forbid_engraver\|Span_bar_engraver\|Span_arpeggio_engraver\|Spacing_engraver\|Slur_performer\|Slur_engraver\|Slash_repeat_engraver\|Skip_event_swallow_translator\|Separating_line_group_engraver\|Script_row_engraver\|Script_engraver\|Script_column_engraver\|Score\|Rhythmic_column_engraver\|RhythmicStaff\|Rest_swallow_translator\|Rest_engraver\|Rest_collision_engraver\|Repeat_tie_engraver\|Repeat_acknowledge_engraver\|Pitched_trill_engraver\|Pitch_squash_engraver\|Piano_pedal_performer\|Piano_pedal_engraver\|Piano_pedal_align_engraver\|PianoStaff\|Phrasing_slur_engraver\|Percent_repeat_engraver\|Part_combine_engraver\|Parenthesis_engraver\|Paper_column_engraver\|Output_property_engraver\|Ottava_spanner_engraver\|Note_swallow_translator\|Note_spacing_engraver\|Note_performer\|Note_name_engraver\|Note_heads_engraver\|Note_head_line_engraver\|NoteNames\|New_fingering_engraver\|New_dynamic_engraver\|Multi_measure_rest_engraver\|Metronome_mark_engraver\|Mensural_ligature_engraver\|MensuralVoice\|MensuralStaff\|Mark_engraver\|Lyrics\|Lyric_performer\|Lyric_engraver\|Ligature_bracket_engraver\|Ledger_line_engraver\|Laissez_vibrer_engraver\|Key_performer\|Key_engraver\|Instrument_switch_engraver\|Instrument_name_engraver\|Hyphen_engraver\|Hara_kiri_engraver\|Grob_pq_engraver\|GregorianTranscriptionVoice\|GregorianTranscriptionStaff\|GrandStaff\|Grace_spacing_engraver\|Grace_engraver\|Grace_beam_engraver\|Global\|Glissando_engraver\|Fretboard_engraver\|FretBoards\|Forbid_line_break_engraver\|Font_size_engraver\|Fingering_engraver\|Figured_bass_position_engraver\|Figured_bass_engraver\|FiguredBass\|Extender_engraver\|Dynamic_performer\|Dynamic_align_engraver\|Drum_notes_engraver\|Drum_note_performer\|DrumVoice\|DrumStaff\|Dots_engraver\|Dot_column_engraver\|Devnull\|Default_bar_line_engraver\|Custos_engraver\|CueVoice\|Control_track_performer\|Collision_engraver\|Cluster_spanner_engraver\|Clef_engraver\|Chord_tremolo_engraver\|Chord_name_engraver\|ChordNames\|ChordNameVoice\|ChoirStaff\|Breathing_sign_engraver\|Break_align_engraver\|Bend_engraver\|Beam_performer\|Beam_engraver\|Bar_number_engraver\|Bar_engraver\|Axis_group_engraver\|Auto_beam_engraver\|Arpeggio_engraver\|Accidental_engraver\|Score\)\(\A\|\n\)"ms=s+1,me=e-1 -syn match lilyNote "\<\(\(\(vibraslap\|twoup\|twodown\|tt\|triangle\|threeup\|threedown\|tambourine\|splashcymbal\|solstqt\|solss\|solsqt\|solsd\|solsb\|sols\|solkk\|solk\|soldsd\|soldd\|sold\|solbtqt\|solbsb\|solbqt\|solbb\|solb\|sol\|snare\|sistqt\|siss\|sisqt\|sisd\|sisb\|sis\|sikk\|sik\|sidsd\|sidestick\|sidd\|sid\|sibtqt\|sibsb\|sibqt\|sibb\|sib\|si\|shortwhistle\|shortguiro\|ridecymbalb\|ridecymbala\|ridecymbal\|ridebell\|restqt\|ress\|resqt\|resd\|resb\|res\|rekk\|rek\|redsd\|redd\|red\|rebtqt\|rebsb\|rebqt\|rebb\|reb\|re\|pedalhihat\|opentriangle\|openloconga\|openlobongo\|openhihat\|openhiconga\|openhibongo\|opencuica\|oneup\|onedown\|mutetriangle\|muteloconga\|mutelobongo\|mutehiconga\|mutehibongo\|mutecuica\|mistqt\|miss\|misqt\|misd\|misb\|mis\|mikk\|mik\|midsd\|midd\|mid\|mibtqt\|mibsb\|mibqt\|mibb\|mib\|mi\|maracas\|lowtom\|lowoodblock\|lowmidtom\|lowfloortom\|lotimbale\|losidestick\|longwhistle\|longguiro\|loconga\|lobongo\|loagogo\|lastqt\|lass\|lasqt\|lasd\|lasb\|las\|lakk\|lak\|ladsd\|ladd\|lad\|labtqt\|labsb\|labqt\|labb\|lab\|la\|hiwoodblock\|hitimbale\|hississ\|hiss\|hisis\|hisih\|hisidestick\|his\|himidtom\|hihat\|hih\|hightom\|highfloortom\|hiconga\|hibongo\|hiagogo\|hessess\|heses\|heseh\|handclap\|halfopenhihat\|h\|gx\|guiro\|gtqs\|gtqf\|gss\|gsharpsharp\|gsharp\|gs\|gqs\|gqf\|gississ\|giss\|gisis\|gisih\|gis\|gih\|gflatflat\|gflat\|gff\|gf\|gessess\|gess\|geses\|geseh\|ges\|geh\|g\|fx\|ftqs\|ftqf\|fss\|fsharpsharp\|fsharp\|fs\|fqs\|fqf\|fourup\|fourdown\|fiveup\|fivedown\|fississ\|fiss\|fisis\|fisih\|fis\|fih\|fflatflat\|fflat\|fff\|ff\|fessess\|fess\|feses\|feseh\|fes\|feh\|fastqt\|fass\|fasqt\|fasd\|fasb\|fas\|fakk\|fak\|fadsd\|fadd\|fad\|fabtqt\|fabsb\|fabqt\|fabb\|fab\|fa\|f\|ex\|etqs\|etqf\|essess\|ess\|esharpsharp\|esharp\|eses\|eseh\|es\|eqs\|eqf\|electricsnare\|eississ\|eiss\|eisis\|eisih\|eis\|eih\|eflatflat\|eflat\|eff\|ef\|eessess\|eess\|eeses\|eeseh\|ees\|eeh\|e\|dx\|dtqs\|dtqf\|dss\|dsharpsharp\|dsharp\|ds\|dqs\|dqf\|dostqt\|doss\|dosqt\|dosd\|dosb\|dos\|dokk\|dok\|dodsd\|dodd\|dod\|dobtqt\|dobsb\|dobqt\|dobb\|dob\|do\|dississ\|diss\|disis\|disih\|dis\|dih\|dflatflat\|dflat\|dff\|df\|dessess\|dess\|deses\|deseh\|des\|deh\|d\|cx\|ctqs\|ctqf\|css\|csharpsharp\|csharp\|cs\|crashcymbalb\|crashcymbala\|crashcymbal\|cqs\|cqf\|cowbell\|closedhihat\|claves\|cississ\|ciss\|cisis\|cisih\|cis\|cih\|chinesecymbal\|cflatflat\|cflat\|cff\|cf\|cessess\|cess\|ceses\|ceseh\|ces\|ceh\|cabasa\|c\|bx\|btqs\|btqf\|bss\|bsharpsharp\|bsharp\|bs\|bqs\|bqf\|bisis\|bisih\|bis\|bih\|bflatflat\|bflat\|bff\|bf\|bess\|beses\|beseh\|bes\|beh\|bb\|bassdrum\|b\|ax\|atqs\|atqf\|assess\|ass\|asharpsharp\|asharp\|ases\|aseh\|asas\|asah\|as\|aqs\|aqf\|aississ\|aiss\|aisis\|aisih\|ais\|aih\|aflatflat\|aflat\|aff\|af\|aessess\|aess\|aeses\|aeseh\|aes\|aeh\|acousticsnare\|a\|a\)\([,']\)\{,4}\([?!]\)\?\)\|s\|r\)\(\(128\|64\|32\|16\|8\|4\|2\|1\|\\breve\|\\longa\|\\maxima\)[.]\{,8}\)\?\(\A\|\n\)"me=e-1 diff --git a/.vim/syntax/lilypond.vim b/.vim/syntax/lilypond.vim deleted file mode 100644 index 7d0a6d8..0000000 --- a/.vim/syntax/lilypond.vim +++ /dev/null @@ -1,83 +0,0 @@ -" LilyPond syntax file -" Language: LilyPond -" Maintainer: Heikki Junes -" Created: Oct 17, 2002 -" Last Change: Sep 23, 2003 -" Version: 6.1-1 -" -" Installed As: vim/syntax/lilypond.vim -" Uses Generated File: vim/syntax/lilypond-words.vim -" -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -" Read the LilyPond syntax match groups: -" lilyKeyword, lilyReservedWord, lilyNote -if version < 600 - so :p:h/lilypond-words.vim -else - runtime! syntax/lilypond-words.vim - if exists("b:current_syntax") - unlet b:current_syntax - endif -endif - -" Match also parethesis of angle type -setlocal mps+=<:> - -" Case matters -syn case match - -syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilyEquation,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord - -syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold -syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold -syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold - -syn region lilyString start=/"/ end=/"/ skip=/\\"/ -syn region lilyComment start="%{" skip="%$" end="%}" -syn region lilyComment start="%\([^{]\|$\)" end="$" - -syn match lilyNumber "[-_^.]\?\d\+[.]\?" -syn match lilyEquation "\(#['`]\)\?\(\a*[-]\)*\a*\s*=\s*\(#[#'`]\?\)\?\a*" -syn match lilySlur "[(~)]" -syn match lilySlur "\\[()]" -syn match lilySpecial "\\[\\]" -" avoid highlighting the extra character in situations like -" c--\mf c^^\mf c__\mf -syn match lilyArticulation "[-_^][-_^+|>.]" - -" Rest of syntax highlighting rules start here -" -" " Define the default highlighting. -" " 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_lily_syn_inits") - if version < 508 - let did_lily_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink Delimiter Identifier - - HiLink lilyString String - HiLink lilyComment Comment - - HiLink lilyNote Identifier - HiLink lilyArticulation PreProc - HiLink lilyKeyword Keyword - HiLink lilyReservedWord Type - - HiLink lilyNumber Constant - HiLink lilySpecial Special - HiLink lilySlur ModeMsg - - delcommand HiLink -endif diff --git a/.vim/syntax/mako.vim b/.vim/syntax/mako.vim deleted file mode 100644 index a9244a2..0000000 --- a/.vim/syntax/mako.vim +++ /dev/null @@ -1,83 +0,0 @@ -" Vim syntax file -" Language: Mako -" Maintainer: Armin Ronacher -" URL: http://lucumr.pocoo.org/ -" Last Change: 2007 April 8 -" Version: 0.6 -" -" Known Limitations -" the <%text> block does not have correct attributes - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -if !exists("main_syntax") - let main_syntax = "html" -endif - -"Source the html syntax file -ru! syntax/html.vim -unlet b:current_syntax - -"Put the python syntax file in @pythonTop -syn include @pythonTop syntax/python.vim - -" End keywords -syn keyword makoEnd contained endfor endwhile endif endtry enddef - -" Block rules -syn region makoLine matchgroup=makoDelim start=#%\s*# end=#$# keepend contains=@pythonTop,makoEnd -syn region makoBlock matchgroup=makoDelim start=#<%!\?# end=#%># keepend contains=@pythonTop,makoEnd - -" Variables -syn region makoNested start="{" end="}" transparent display contained contains=makoNested,@pythonTop -syn region makoVariable matchgroup=makoDelim start=#\${# end=#}# contains=makoNested,@pythonTop - -" Comments -syn region makoComment start="##" end="$" -syn region makoDocComment matchgroup=makoDelim start="<%doc>" end="" keepend - -" Literal Blocks -syn region makoText matchgroup=makoDelim start="<%text[^>]*>" end="" - -" Attribute Sublexing -syn match makoAttributeKey containedin=makoTag contained "[a-zA-Z_][a-zA-Z0-9_]*=" -syn region makoAttributeValue containedin=makoTag contained start=/"/ skip=/\\"/ end=/"/ -syn region makoAttributeValue containedin=MakoTag contained start=/'/ skip=/\\'/ end=/'/ - -" Tags -syn region makoTag matchgroup=makoDelim start="<%\(def\|call\|page\|include\|namespace\|inherit\)\>\s*" end="/\?>" -syn match makoDelim "" - -" Newline Escapes -syn match makoEscape /\\$/ - -" Default highlighting links -if version >= 508 || !exists("did_mako_syn_inits") - if version < 508 - let did_mako_syn_inits = 1 - com -nargs=+ HiLink hi link - else - com -nargs=+ HiLink hi def link - endif - - HiLink makoDocComment makoComment - HiLink makoDefEnd makoDelim - - HiLink makoAttributeKey Type - HiLink makoAttributeValue String - HiLink makoText Normal - HiLink makoDelim Preproc - HiLink makoEnd Keyword - HiLink makoComment Comment - HiLink makoEscape Special - - delc HiLink -endif - -let b:current_syntax = "mako" diff --git a/.vim/syntax/mediawiki.vim b/.vim/syntax/mediawiki.vim deleted file mode 100644 index 339993e..0000000 --- a/.vim/syntax/mediawiki.vim +++ /dev/null @@ -1,304 +0,0 @@ -" Taken from http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Vim - -" Wikipedia syntax file for Vim -" Published on Wikipedia in 2003-04 and declared authorless. -" -" Based on the HTML syntax file. Probably too closely based, in fact. There -" may well be name collisions everywhere, but ignorance is bliss, so they say. -" -" To do: plug-in support for downloading and uploading to the server. - -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif - let main_syntax = 'html' -endif - -if version < 508 - command! -nargs=+ HtmlHiLink hi link -else - command! -nargs=+ HtmlHiLink hi def link -endif - -syn case ignore -if v:version >= 700 - syn spell toplevel -endif - -" tags -syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar -syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar -syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 -syn region htmlEndTag start=++ contains=htmlTagN - -syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlBadArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster - -syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,htmlBadTag,@htmlTagNameCluster -syn match htmlTagN contained +]<"ms=s+1 -" This would highlight all tags and fragments that are not allowed. -"syn match htmlBadTag contained +<\s*[-a-zA-Z0-9]\++ms=s+1 -" Highlight only known disallowed HTML tags, so that not every "" -" fragment is flagged. -syn keyword htmlBadTag contained a acronym address applet area base basefont bdo body button col colgroup dfn dir fieldset form frame frameset head html iframe img input isindex kbd label legend link map menu meta noframes noscript object optgroup option param q script select style tbody textarea tfoot thead title -syn match htmlBadArg contained "\s\+[-a-zA-Z0-9]\+\s*="ms=s+1,me=e-1 - -" allowed HTML tag names -syn keyword htmlTagName contained b big blockquote br caption center cite code dd del div dl dt em font h1 h2 h3 h4 h5 h6 hr i ins li ol p pre rb rp rt ruby s small span strike strong sub sup table td th tr tt u ul var -" allowed Wiki tag names -syn keyword htmlTagName contained nowiki math references - -" allowed arg names -syn keyword htmlArg contained title align lang dir width height nowrap -syn keyword htmlArg contained bgcolor clear noshade -syn keyword htmlArg contained cite datetime size face color -syn keyword htmlArg contained type start value compact -syn keyword htmlArg contained summary border frame rules -syn keyword htmlArg contained cellspacing cellpadding valign char -syn keyword htmlArg contained charoff colgroup col span abbr axis -syn keyword htmlArg contained headers scope rowspan colspan -syn keyword htmlArg contained id class name style - -" special characters -syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" - -" comments -syn region htmlComment start=++ contains=htmlCommentPart,htmlCommentError -syn match htmlCommentError contained "[^>+ - -" HTML formatting -syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlComment,htmlLink - -syn region htmlBold start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic -syn region htmlBold start="" end=""me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic -syn region htmlBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic -syn region htmlBoldItalic contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldItalicUnderline -syn region htmlBoldItalic contained start="" end=""me=e-5 contains=@htmlTop,htmlBoldItalicUnderline -syn region htmlBoldUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop -syn region htmlBoldUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop -syn region htmlBoldItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic - -syn region htmlUnderline start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic -syn region htmlUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic -syn region htmlUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic -syn region htmlUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop,htmUnderlineItalicBold -syn region htmlUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop,htmUnderlineItalicBold -syn region htmlUnderlineItalicBold contained start="" end=""me=e-4 contains=@htmlTop -syn region htmlUnderlineItalicBold contained start="" end=""me=e-9 contains=@htmlTop -syn region htmlUnderlineBoldItalic contained start="" end=""me=e-4 contains=@htmlTop -syn region htmlUnderlineBoldItalic contained start="" end=""me=e-5 contains=@htmlTop - -syn region htmlItalic start="" end=""me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline -syn region htmlItalic start="" end=""me=e-5 contains=@htmlTop -syn region htmlItalicBold contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicBoldUnderline -syn region htmlItalicBold contained start="" end=""me=e-9 contains=@htmlTop,htmlItalicBoldUnderline -syn region htmlItalicBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop -syn region htmlItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicUnderlineBold -syn region htmlItalicUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop -syn region htmlItalicUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop - -syn region htmlH1 start="" end=""me=e-5 contains=@htmlTop -syn region htmlH2 start="" end=""me=e-5 contains=@htmlTop -syn region htmlH3 start="" end=""me=e-5 contains=@htmlTop -syn region htmlH4 start="" end=""me=e-5 contains=@htmlTop -syn region htmlH5 start="" end=""me=e-5 contains=@htmlTop -syn region htmlH6 start="" end=""me=e-5 contains=@htmlTop -syn region htmlHead start="" end=""me=e-7 end=""me=e-5 end=""me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,cssStyle -syn region htmlTitle start="" end=""me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment - -" No htmlTop and wikiPre inside HTML preformatted areas, because Wikipedia -" renders everything in there literally (HTML tags and entities, too): -"
 tags work as the combination of  and the standard HTML 
-"   tag: the content will preformatted, and it will not be parsed, but shown as
-"   in the wikitext source.
-" With wikiPre, indented lines would be rendered differently from unindented
-" lines.
-syn match htmlPreTag /
/ contains=htmlTag
-syn match wikiNowikiTag // contains=htmlTag
-syn match wikiNowikiEndTag /<\/nowiki>/ contains=htmlEndTag
-" Note: Cannot use 'start="
"rs=e', so still have the 
 tag highlighted
-" correctly via separate syn-match. Unfortunately, this will also highlight
-" 
 tags inside the preformatted region. 
-syn region htmlPre start="
" end="
"me=e-6 contains=htmlPreTag -syn region wikiNowiki start="" end=""me=e-9 contains=wikiNowikiTag - -" wiki formatting -syn region wikiItalic start=+'\@.*" contains=@Spell,wikiLink,wikiItalicBold,wikiNowiki,wikiNowikiEndTag -syn region wikiBold start=+'''+ end=+'''+ skip=".*" contains=@Spell,wikiLink,wikiBoldItalic,wikiNowiki,wikiNowikiEndTag -syn region wikiBoldAndItalic start=+'''''+ end=+'''''+ skip=".*" contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag - -syn region wikiBoldItalic contained start=+'\@.*" contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiItalicBold contained start=+'''+ end=+'''+ skip=".*" contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag - -syn region wikiH1 start="^=" end="=" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiH2 start="^==" end="==" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiH3 start="^===" end="===" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiH4 start="^====" end="====" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiH5 start="^=====" end="=====" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiH6 start="^======" end="======" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[\[" end="\]\]\(s\|'s\|es\|ing\|\)" skip=".*" oneline contains=wikiLink,wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[http:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[https:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[ftp:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[gopher:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[news:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag -syn region wikiLink start="\[mailto:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag -syn region wikiTemplate start="{{" end="}}" skip=".*" contains=wikiNowiki,wikiNowikiEndTag - -syn match wikiParaFormatChar /^[\:|\*|;|#]\+/ -syn match wikiParaFormatChar /^-----*/ -syn match wikiPre /^\ .*$/ contains=wikiNowiki,wikiNowikiEndTag - -syn include @TeX syntax/tex.vim -syntax region wikiTeX matchgroup=htmlTag start="" end="" skip=".*" contains=@TeX,wikiNowiki,wikiNowikiEndTag -syntax region wikiRef matchgroup=htmlTag start="" end="" skip=".*" contains=wikiNowiki,wikiNowikiEndTag - - -" HTML highlighting - -HtmlHiLink htmlTag Function -HtmlHiLink htmlEndTag Identifier -HtmlHiLink htmlArg Type -HtmlHiLink htmlTagName htmlStatement -HtmlHiLink htmlSpecialTagName Exception -HtmlHiLink htmlValue String -HtmlHiLink htmlSpecialChar Special - -HtmlHiLink htmlH1 Title -HtmlHiLink htmlH2 htmlH1 -HtmlHiLink htmlH3 htmlH2 -HtmlHiLink htmlH4 htmlH3 -HtmlHiLink htmlH5 htmlH4 -HtmlHiLink htmlH6 htmlH5 -HtmlHiLink htmlHead PreProc -HtmlHiLink htmlTitle Title -HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic -HtmlHiLink htmlUnderlineBold htmlBoldUnderline -HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic -HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic -HtmlHiLink htmlItalicUnderline htmlUnderlineItalic -HtmlHiLink htmlItalicBold htmlBoldItalic -HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic -HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic - -HtmlHiLink htmlSpecial Special -HtmlHiLink htmlSpecialChar Special -HtmlHiLink htmlString String -HtmlHiLink htmlStatement Statement -HtmlHiLink htmlComment Comment -HtmlHiLink htmlCommentPart Comment -HtmlHiLink htmlValue String -HtmlHiLink htmlCommentError htmlError -HtmlHiLink htmlTagError htmlError -HtmlHiLink htmlBadTag htmlError -HtmlHiLink htmlBadArg htmlError -HtmlHiLink htmlEvent javaScript -HtmlHiLink htmlError Error - -HtmlHiLink htmlCssStyleComment Comment -HtmlHiLink htmlCssDefinition Special - -" The default highlighting. -if version >= 508 || !exists("did_html_syn_inits") - if version < 508 - let did_html_syn_inits = 1 - endif - HtmlHiLink htmlTag Function - HtmlHiLink htmlEndTag Identifier - HtmlHiLink htmlArg Type - HtmlHiLink htmlTagName htmlStatement - HtmlHiLink htmlSpecialTagName Exception - HtmlHiLink htmlValue String - HtmlHiLink htmlSpecialChar Special - -if !exists("html_no_rendering") - HtmlHiLink htmlH1 Title - HtmlHiLink htmlH2 htmlH1 - HtmlHiLink htmlH3 htmlH2 - HtmlHiLink htmlH4 htmlH3 - HtmlHiLink htmlH5 htmlH4 - HtmlHiLink htmlH6 htmlH5 - HtmlHiLink htmlHead PreProc - HtmlHiLink htmlTitle Title - HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic - HtmlHiLink htmlUnderlineBold htmlBoldUnderline - HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic - HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic - HtmlHiLink htmlItalicUnderline htmlUnderlineItalic - HtmlHiLink htmlItalicBold htmlBoldItalic - HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic - HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic - HtmlHiLink htmlLink Underlined - if !exists("html_my_rendering") - hi def htmlBold term=bold cterm=bold gui=bold - hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline - hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline - hi def htmlUnderline term=underline cterm=underline gui=underline - hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline - hi def htmlItalic term=italic cterm=italic gui=italic - endif -endif - - HtmlHiLink htmlPreStmt PreProc - HtmlHiLink htmlPreError Error - HtmlHiLink htmlPreProc PreProc - HtmlHiLink htmlPreAttr String - HtmlHiLink htmlPreProcAttrName PreProc - HtmlHiLink htmlPreProcAttrError Error - HtmlHiLink htmlSpecial Special - HtmlHiLink htmlSpecialChar Special - HtmlHiLink htmlString String - HtmlHiLink htmlStatement Statement - HtmlHiLink htmlComment Comment - HtmlHiLink htmlCommentPart Comment - HtmlHiLink htmlValue String - HtmlHiLink htmlCommentError htmlError - HtmlHiLink htmlTagError htmlError - HtmlHiLink htmlBadTag htmlError - HtmlHiLink htmlBadArg htmlError - HtmlHiLink htmlEvent javaScript - HtmlHiLink htmlError Error - - HtmlHiLink javaScript Special - HtmlHiLink javaScriptExpression javaScript - HtmlHiLink htmlCssStyleComment Comment - HtmlHiLink htmlCssDefinition Special -endif - -" wiki highlighting - -HtmlHiLink wikiItalic htmlItalic -HtmlHiLink wikiBold htmlBold - -HtmlHiLink wikiBoldItalic htmlBoldItalic -HtmlHiLink wikiItalicBold htmlBoldItalic - -HtmlHiLink wikiBoldAndItalic htmlBoldItalic - -HtmlHiLink wikiH1 htmlH1 -HtmlHiLink wikiH2 htmlH2 -HtmlHiLink wikiH3 htmlH3 -HtmlHiLink wikiH4 htmlH4 -HtmlHiLink wikiH5 htmlH5 -HtmlHiLink wikiH6 htmlH6 -HtmlHiLink wikiLink Underlined -HtmlHiLink wikiTemplate Special -HtmlHiLink wikiParaFormatChar Special -HtmlHiLink wikiPre Constant -HtmlHiLink wikiRef Comment - - -let b:current_syntax = "html" - -delcommand HtmlHiLink - -if main_syntax == 'html' - unlet main_syntax -endif - diff --git a/.vim/syntax/mkd.vim b/.vim/syntax/mkd.vim deleted file mode 100644 index ee22365..0000000 --- a/.vim/syntax/mkd.vim +++ /dev/null @@ -1,104 +0,0 @@ -" Vim syntax file -" Language: Markdown -" Maintainer: Ben Williams -" 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 :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 -else - command! -nargs=+ HtmlHiLink hi def link -endif - -syn spell toplevel -syn case ignore -syn sync linebreaks=1 - -"additions to HTML groups -syn region htmlBold start=/\\\@) -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=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell -syn region mkdCode start="]*>" end="
" -syn region mkdCode start="]*>" end="" - -"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 diff --git a/.vim/syntax/motd.vim b/.vim/syntax/motd.vim deleted file mode 100644 index 6a5afb9..0000000 --- a/.vim/syntax/motd.vim +++ /dev/null @@ -1,23 +0,0 @@ -" Vim syntax file -" Language: MotD Public -" Maintainer: David Bushong - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn match motdSig "\(\s\s\+\|\t\)--\?.\+$\|\s--\?\w\+\s*$" -syn match motdThread "^\s\+\\[_-]" -syn match motdDate "^\d\+/\d\+\s" -syn match motdLink "https\?://\S\+" - -hi link motdSig String -hi link motdThread Type -hi link motdDate Number -hi link motdLink Underlined - -let b:current_syntax = "motd" diff --git a/.vim/syntax/nvpscript.vim b/.vim/syntax/nvpscript.vim deleted file mode 100644 index a19e65d..0000000 --- a/.vim/syntax/nvpscript.vim +++ /dev/null @@ -1,72 +0,0 @@ -" Vim syn file -" Language: NVISION Script -" Maintainer: Barak Michener -" Last Change: 2006 Jun 29 - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -"this language is oblivious to case. -syn case ignore - - -" The only keywords -syn keyword nvpKeyword elseif else defsub endif msgbox for if -syn keyword nvpKeyword gosub endsub next print printn sleep -syn keyword nvpKeyword to wend while yesnobox - -syn keyword nvpFunction #flush #sendbreak #halt -" String contstants -syn region nvpString start=+"+ skip=+\\"+ end=+"+ -"integer number, or floating point number without a dot. -syn match nvpNumber "\<\d\+\>" -"floating point number, with dot -syn match nvpNumber "\<\d\+\.\d*\>" -"floating point number, starting with a dot -syn match nvpNumber "\.\d\+\>" -"hex number -syn match nvpNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" -syn match nvpNumber "\<[0-9ABCDEF]{2}\>" - -syn region nvpComment start="!" end="$" -syn match nvpOperator "[+\-*/()%<>=\^]" - -syn match nvpVarPlain "$^[ADEFHILMOPSTWX]\=" -syn match nvpVarPlain "$[\\\"\[\]'&`+*.,;=%~?@$<>(-]" -syn match nvpVarPlain "$\(0\|[1-9]\d*\)" -syn region nvpSend start="<<" end="$" -syn region nvpRecv start="\d*: " end="$" - -" Define the default highlighting. -" 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_basic_syntax_inits") - if version < 508 - let did_basic_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - "My Highlighting - HiLink nvpFunction PreProc - HiLink nvpKeyword Statement - HiLink nvpString String - HiLink nvpNumber Number - HiLink nvpComment Comment - HiLink nvpOperator Operator - HiLink nvpVarPlain Identifier - HiLink nvpSend Include - HiLink nvpRecv SpecialChar - - delcommand HiLink -endif - -let b:current_syntax = "nvpscript" - -"vim: ts=4 diff --git a/.vim/syntax/proto.vim b/.vim/syntax/proto.vim deleted file mode 100644 index 23085a2..0000000 --- a/.vim/syntax/proto.vim +++ /dev/null @@ -1,105 +0,0 @@ -" Protocol Buffers - Google's data interchange format -" Copyright 2008 Google Inc. All rights reserved. -" https://developers.google.com/protocol-buffers/ -" -" Redistribution and use in source and binary forms, with or without -" modification, are permitted provided that the following conditions are -" met: -" -" * Redistributions of source code must retain the above copyright -" notice, this list of conditions and the following disclaimer. -" * Redistributions in binary form must reproduce the above -" copyright notice, this list of conditions and the following disclaimer -" in the documentation and/or other materials provided with the -" distribution. -" * Neither the name of Google Inc. nor the names of its -" contributors may be used to endorse or promote products derived from -" this software without specific prior written permission. -" -" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -" This is the Vim syntax file for Google Protocol Buffers. -" -" Usage: -" -" 1. cp proto.vim ~/.vim/syntax/ -" 2. Add the following to ~/.vimrc: -" -" augroup filetype -" au! BufRead,BufNewFile *.proto setfiletype proto -" augroup end -" -" Or just create a new file called ~/.vim/ftdetect/proto.vim with the -" previous lines on it. - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn case match - -syn keyword pbTodo contained TODO FIXME XXX -syn cluster pbCommentGrp contains=pbTodo - -syn keyword pbSyntax syntax import option -syn keyword pbStructure package message group oneof -syn keyword pbRepeat optional required repeated -syn keyword pbDefault default -syn keyword pbExtend extend extensions to max -syn keyword pbRPC service rpc returns - -syn keyword pbType int32 int64 uint32 uint64 sint32 sint64 -syn keyword pbType fixed32 fixed64 sfixed32 sfixed64 -syn keyword pbType float double bool string bytes -syn keyword pbTypedef enum -syn keyword pbBool true false - -syn match pbInt /-\?\<\d\+\>/ -syn match pbInt /\<0[xX]\x+\>/ -syn match pbFloat /\<-\?\d*\(\.\d*\)\?/ -syn region pbComment start="\/\*" end="\*\/" contains=@pbCommentGrp -syn region pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp -syn region pbString start=/"/ skip=/\\./ end=/"/ -syn region pbString start=/'/ skip=/\\./ end=/'/ - -if version >= 508 || !exists("did_proto_syn_inits") - if version < 508 - let did_proto_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink pbTodo Todo - - HiLink pbSyntax Include - HiLink pbStructure Structure - HiLink pbRepeat Repeat - HiLink pbDefault Keyword - HiLink pbExtend Keyword - HiLink pbRPC Keyword - HiLink pbType Type - HiLink pbTypedef Typedef - HiLink pbBool Boolean - - HiLink pbInt Number - HiLink pbFloat Float - HiLink pbComment Comment - HiLink pbString String - - delcommand HiLink -endif - -let b:current_syntax = "proto" diff --git a/.vim/syntax/scala.vim b/.vim/syntax/scala.vim deleted file mode 100644 index b19a04f..0000000 --- a/.vim/syntax/scala.vim +++ /dev/null @@ -1,153 +0,0 @@ -" Vim syntax file -" Language : Scala (http://scala-lang.org/) -" Maintainers: Stefan Matthias Aust, Julien Wetterwald -" Last Change: 2007 June 13 -" Revision : $Id$ -" $URL$ - -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -syn case match -syn sync minlines=50 - -" most Scala keywords -syn keyword scalaKeyword abstract case catch do else extends final finally for forSome if implicit lazy match new null override private protected requires return sealed super this throw try type while with yield -syn match scalaKeyword "=>" -syn match scalaKeyword "<-" -syn match scalaKeyword "\<_\>" - -syn match scalaOperator ":\{2,\}" "this is not a type - -" package and import statements -syn keyword scalaPackage package nextgroup=scalaFqn skipwhite -syn keyword scalaImport import nextgroup=scalaFqn skipwhite -syn match scalaFqn "\<[._$a-zA-Z0-9,]*" contained nextgroup=scalaFqnSet -syn region scalaFqnSet start="{" end="}" contained - -" boolean literals -syn keyword scalaBoolean true false - -" definitions -syn keyword scalaDef def nextgroup=scalaDefName skipwhite -syn keyword scalaVal val nextgroup=scalaValName skipwhite -syn keyword scalaVar var nextgroup=scalaVarName skipwhite -syn keyword scalaClass class nextgroup=scalaClassName skipwhite -syn keyword scalaObject object nextgroup=scalaClassName skipwhite -syn keyword scalaTrait trait nextgroup=scalaClassName skipwhite -syn match scalaDefName "[^ =:;([]\+" contained nextgroup=scalaDefSpecializer skipwhite -syn match scalaValName "[^ =:;([]\+" contained -syn match scalaVarName "[^ =:;([]\+" contained -syn match scalaClassName "[^ =:;(\[]\+" contained nextgroup=scalaClassSpecializer skipwhite -syn region scalaDefSpecializer start="\[" end="\]" contained contains=scalaDefSpecializer -syn region scalaClassSpecializer start="\[" end="\]" contained contains=scalaClassSpecializer - -" type constructor (actually anything with an uppercase letter) -syn match scalaConstructor "\<[A-Z][_$a-zA-Z0-9]*\>" nextgroup=scalaConstructorSpecializer -syn region scalaConstructorSpecializer start="\[" end="\]" contained contains=scalaConstructorSpecializer - -" method call -syn match scalaRoot "\<[a-zA-Z][_$a-zA-Z0-9]*\."me=e-1 -syn match scalaMethodCall "\.[a-z][_$a-zA-Z0-9]*"ms=s+1 - -" type declarations in val/var/def -syn match scalaType ":\s*\(=>\s*\)\?[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)\?\(\s*\(<:\|>:\|#\|=>\)\s*[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)*\)*"ms=s+1 - -" comments -syn match scalaTodo "[tT][oO][dD][oO]" contained -syn match scalaLineComment "//.*" contains=scalaTodo -syn region scalaComment start="/\*" end="\*/" contains=scalaTodo -syn case ignore -syn include @scalaHtml syntax/html.vim -unlet b:current_syntax -syn case match -syn region scalaDocComment start="/\*\*" end="\*/" contains=scalaDocTags,scalaTodo,@scalaHtml keepend -syn region scalaDocTags start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" contained -syn match scalaDocTags "@[a-z]\+" contained - -syn match scalaEmptyString "\"\"" - -" multi-line string literals -syn region scalaMultiLineString start="\"\"\"" end="\"\"\"" contains=scalaUnicode -syn match scalaUnicode "\\u[0-9a-fA-F]\{4}" contained - -" string literals with escapes -syn region scalaString start="\"[^"]" skip="\\\"" end="\"" contains=scalaStringEscape " TODO end \n or not? -syn match scalaStringEscape "\\u[0-9a-fA-F]\{4}" contained -syn match scalaStringEscape "\\[nrfvb\\\"]" contained - -" symbol and character literals -syn match scalaSymbol "'[_a-zA-Z0-9][_a-zA-Z0-9]*\>" -syn match scalaChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'" - -" number literals -syn match scalaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" -syn match scalaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" -syn match scalaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" -syn match scalaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" - -" xml literals -syn match scalaXmlTag "<[a-zA-Z]\_[^>]*/>" contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString -syn region scalaXmlString start="\"" end="\"" contained -syn match scalaXmlStart "<[a-zA-Z]\_[^>]*>" contained contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString -syn region scalaXml start="<\([a-zA-Z]\_[^>]*\_[^/]\|[a-zA-Z]\)>" matchgroup=scalaXmlStart end="]\+>" contains=scalaXmlEscape,scalaXmlQuote,scalaXml,scalaXmlStart,scalaXmlComment -syn region scalaXmlEscape matchgroup=scalaXmlEscapeSpecial start="{" matchgroup=scalaXmlEscapeSpecial end="}" contained contains=TOP -syn match scalaXmlQuote "&[^;]\+;" contained -syn match scalaXmlComment "" contained - -syn sync fromstart - -" map Scala groups to standard groups -hi link scalaKeyword Keyword -hi link scalaPackage Include -hi link scalaImport Include -hi link scalaBoolean Boolean -hi link scalaOperator Normal -hi link scalaNumber Number -hi link scalaEmptyString String -hi link scalaString String -hi link scalaChar String -hi link scalaMultiLineString String -hi link scalaStringEscape Special -hi link scalaSymbol Special -hi link scalaUnicode Special -hi link scalaComment Comment -hi link scalaLineComment Comment -hi link scalaDocComment Comment -hi link scalaDocTags Special -hi link scalaTodo Todo -hi link scalaType Type -hi link scalaTypeSpecializer scalaType -hi link scalaXml String -hi link scalaXmlTag Include -hi link scalaXmlString String -hi link scalaXmlStart Include -hi link scalaXmlEscape Normal -hi link scalaXmlEscapeSpecial Special -hi link scalaXmlQuote Special -hi link scalaXmlComment Comment -hi link scalaDef Keyword -hi link scalaVar Keyword -hi link scalaVal Keyword -hi link scalaClass Keyword -hi link scalaObject Keyword -hi link scalaTrait Keyword -hi link scalaDefName Function -hi link scalaDefSpecializer Function -hi link scalaClassName Special -hi link scalaClassSpecializer Special -hi link scalaConstructor Special -hi link scalaConstructorSpecializer scalaConstructor - -let b:current_syntax = "scala" - -" you might like to put these lines in your .vimrc -" -" customize colors a little bit (should be a different file) -" hi scalaNew gui=underline -" hi scalaMethodCall gui=italic -" hi scalaValName gui=underline -" hi scalaVarName gui=underline diff --git a/.vim/syntax/snippet.vim b/.vim/syntax/snippet.vim deleted file mode 100644 index 5e919e7..0000000 --- a/.vim/syntax/snippet.vim +++ /dev/null @@ -1,19 +0,0 @@ -" Syntax highlighting for snippet files (used for snipMate.vim) -" Hopefully this should make snippets a bit nicer to write! -syn match snipComment '^#.*' -syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand -syn match tabStop '\$\d\+' -syn match snipCommand '`.\{-}`' -syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword -syn match multiSnipText '\S\+ \zs.*' contained -syn match snipKeyword '^snippet'me=s+8 contained -syn match snipError "^[^#s\t].*$" - -hi link snipComment Comment -hi link multiSnipText String -hi link snipKeyword Keyword -hi link snipComment Comment -hi link placeHolder Special -hi link tabStop Special -hi link snipCommand String -hi link snipError Error diff --git a/.vim/syntax/svkannotate.vim b/.vim/syntax/svkannotate.vim deleted file mode 100644 index 3c53c3c..0000000 --- a/.vim/syntax/svkannotate.vim +++ /dev/null @@ -1,42 +0,0 @@ -" Vim syntax file -" Language: SVK annotate output -" Maintainer: Bob Hiestand -" Remark: Used by the vcscommand plugin. -" License: -" Copyright (c) 2007 Bob Hiestand -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. - -if exists("b:current_syntax") - finish -endif - -syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained -syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite -syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite -syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline - -if !exists("did_svkannotate_syntax_inits") - let did_svkannotate_syntax_inits = 1 - hi link svkName Type - hi link svkDate Comment - hi link svkVer Statement -endif - -let b:current_syntax="svkAnnotate" diff --git a/.vim/syntax/svnannotate.vim b/.vim/syntax/svnannotate.vim deleted file mode 100644 index d46f771..0000000 --- a/.vim/syntax/svnannotate.vim +++ /dev/null @@ -1,40 +0,0 @@ -" Vim syntax file -" Language: SVN annotate output -" Maintainer: Bob Hiestand -" Remark: Used by the vcscommand plugin. -" License: -" Copyright (c) 2007 Bob Hiestand -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. - -if exists("b:current_syntax") - finish -endif - -syn match svnName /\S\+/ contained -syn match svnVer /^\s\+\zs\d\+/ contained nextgroup=svnName skipwhite -syn match svnHead /^\s\+\d\+\s\+\S\+/ contains=svnVer,svnName - -if !exists("did_svnannotate_syntax_inits") - let did_svnannotate_syntax_inits = 1 - hi link svnName Type - hi link svnVer Statement -endif - -let b:current_syntax="svnAnnotate" diff --git a/.vim/syntax/vcscommit.vim b/.vim/syntax/vcscommit.vim deleted file mode 100644 index 0cd4c5e..0000000 --- a/.vim/syntax/vcscommit.vim +++ /dev/null @@ -1,31 +0,0 @@ -" Vim syntax file -" Language: VCS commit file -" Maintainer: Bob Hiestand (bob.hiestand@gmail.com) -" License: -" Copyright (c) 2007 Bob Hiestand -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to -" deal in the Software without restriction, including without limitation the -" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -" sell copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -" IN THE SOFTWARE. - -if exists("b:current_syntax") - finish -endif - -syntax region vcsComment start="^VCS: " end="$" -highlight link vcsComment Comment -let b:current_syntax = "vcscommit" diff --git a/.vim/syntax_checkers/go/golintc.vim b/.vim/syntax_checkers/go/golintc.vim deleted file mode 100644 index 58e6102..0000000 --- a/.vim/syntax_checkers/go/golintc.vim +++ /dev/null @@ -1,42 +0,0 @@ -"============================================================================ -"File: golintc.vim -"Description: Check go syntax using 'golintc' -"Maintainer: Hiroshi Ioka -"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. -" -"============================================================================ - -if exists("g:loaded_syntastic_go_golintc_checker") - finish -endif -let g:loaded_syntastic_go_golintc_checker = 1 - -let s:save_cpo = &cpo -set cpo&vim - -function! SyntaxCheckers_go_golintc_GetLocList() dict - let makeprg = self.makeprgBuild({}) - - let errorformat = - \ '%f:%l:%c: %m,' . - \ '%-G%.%#' - - return SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'defaults': {'type': 'w'}, - \ 'subtype': 'Style' }) -endfunction - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'go', - \ 'name': 'golintc'}) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: set sw=4 sts=4 et fdm=marker: diff --git a/.vim/syntax_checkers/go/gonyet.vim b/.vim/syntax_checkers/go/gonyet.vim deleted file mode 100644 index 3c703c5..0000000 --- a/.vim/syntax_checkers/go/gonyet.vim +++ /dev/null @@ -1,49 +0,0 @@ -"============================================================================ -"File: gonyet.vim -"Description: Perform static analysis of Go code with the go-nyet tool -"Maintainer: Barak Michener -"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. -" -"============================================================================ - -if exists("g:loaded_syntastic_go_gonyet_checker") - finish -endif -let g:loaded_syntastic_go_gonyet_checker = 1 - -let s:save_cpo = &cpo -set cpo&vim - -function! SyntaxCheckers_go_gonyet_IsAvailable() dict - return executable('go-nyet') -endfunction - -function! SyntaxCheckers_go_gonyet_GetLocList() dict - let makeprg = 'go-nyet ' . expand('%:p') - let errorformat = '%f:%l:%c:%m' - - " The go compiler needs to either be run with an import path as an - " argument or directly from the package directory. Since figuring out - " the proper import path is fickle, just cwd to the package. - - let errors = SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'cwd': expand('%:p:h'), - \ 'defaults': {'type': 'w'} }) - - return errors -endfunction - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'go', - \ 'name': 'gonyet'}) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: set et sts=4 sw=4: diff --git a/.vim/syntax_checkers/go/govetshadow.vim b/.vim/syntax_checkers/go/govetshadow.vim deleted file mode 100644 index 24e1249..0000000 --- a/.vim/syntax_checkers/go/govetshadow.vim +++ /dev/null @@ -1,52 +0,0 @@ -"============================================================================ -"File: govetshadow.vim -"Description: Perform static analysis of Go code with the vet tool -"Maintainer: Kamil Kisiel -"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. -" -"============================================================================ - -if exists("g:loaded_syntastic_go_govetshadow_checker") - finish -endif -let g:loaded_syntastic_go_govetshadow_checker = 1 - -let s:save_cpo = &cpo -set cpo&vim - -function! SyntaxCheckers_go_govetshadow_IsAvailable() dict - return executable(self.getExec()) -endfunction - -function! SyntaxCheckers_go_govetshadow_GetLocList() dict - let makeprg = self.getExec() . ' tool vet -shadow ' . expand('%:p') - - let errorformat = - \ '%Evet: %.%\+: %f:%l:%c: %m,' . - \ '%W%f:%l: %m,' . - \ '%-G%.%#' - - " The go compiler needs to either be run with an import path as an - " argument or directly from the package directory. Since figuring out - " the proper import path is fickle, just cwd to the package. - - return SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'cwd': expand('%:p:h', 1), - \ 'defaults': {'type': 'w'} }) -endfunction - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'go', - \ 'name': 'govetshadow', - \ 'exec': 'go' }) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" diff --git a/.vim/tabbar.vim b/.vim/tabbar.vim deleted file mode 100644 index b914734..0000000 --- a/.vim/tabbar.vim +++ /dev/null @@ -1,1646 +0,0 @@ -" Copyright: Copyright (C) 2005 Marius Groleo -" Permission is hereby granted to use and distribute this code, -" with or without modifications, provided that this copyright -" notice is copied with it. Like anything else that's free, -" tabbar.vim is provided *AS IS* and comes with no warranty of -" any kind, either expressed or implied. In no event will the -" copyright holder be liable for any damamges resulting from the -" use of this software. -" -" Derived from Bindu Wavell miniBufExplorer.vim version 6.3.2 - - -" Version: 0.7 -" Maintainer: Marius Groleo < groleo@gmail.com > -" Description: TabBar buffer explorer Vim Plugin -" Name Of File: tabbar.vim - -" DOCUMENTATION: is at line :1445 - -" press zR , in normal mode to OPEN all folds -" press zM , in normal mode to CLOSE all folds - -" Already been loaded? ~~ -if exists('Tb_loaded') - finish -else - let Tb_loaded= 1 -endif "%% - - -" Debug Level ~~ -" 0 = no logging -" 1-5 = errors ; 1 is the most important -" 5-9 = info ; 5 is the most important -" 10 = Entry/Exit -if !exists('g:Tb_DBG_LVL') - let g:Tb_DBG_LVL = 0 -endif" %% - - -" Logging method ~~ -" 0 = log to a window -" 1 = log with vim's echo facility -" 2 = log to a file named TabBar.DBG -" in the directory where vim was started -" THIS IS VERY SLOW -" 3 = log into g:Tb_DbgOutput -" global variable [This is the default] -if !exists('g:Tb_DebugMode') - let g:Tb_DebugMode = 0 -endif" %% - - -" Mappings and Commands -" TabBar Keyboard Mappings ~~ -if ! hasmapto('1') || !hasmapto('') - "gui bindings containing META key, are different from terminal bindings - if has('gui_running') - "NORMAL mode bindings for gvim - noremap + +
+
+ + diff --git a/dot_vim/skeletons/vue.skel b/dot_vim/skeletons/vue.skel new file mode 100644 index 0000000..8310166 --- /dev/null +++ b/dot_vim/skeletons/vue.skel @@ -0,0 +1,19 @@ + + + + + diff --git a/dot_vim/syntax/c.vim b/dot_vim/syntax/c.vim new file mode 100644 index 0000000..8381244 --- /dev/null +++ b/dot_vim/syntax/c.vim @@ -0,0 +1,377 @@ +" Vim syntax file +" Language: C +" Maintainer: Bram Moolenaar +" Last Change: 2008 Mar 19 + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" A bunch of useful C keywords +syn keyword cStatement goto break return continue asm +syn keyword cLabel case default +syn keyword cConditional if else switch +syn keyword cRepeat while for do + +syn keyword cTodo contained TODO FIXME XXX + +" cCommentGroup allows adding matches for special things in comments +syn cluster cCommentGroup contains=cTodo + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" +endif +if exists("c_no_cformat") + syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell + " cCppString: same as cString, but ends at end of line + syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell +else + if !exists("c_no_c99") " ISO C99 + syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + else + syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + endif + syn match cFormat display "%%" contained + syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell + " cCppString: same as cString, but ends at end of line + syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell +endif + +syn match cCharacter "L\='[^\\]'" +syn match cCharacter "L'[^']*'" contains=cSpecial +if exists("c_gnu") + syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" + syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" +else + syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" + syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" +endif +syn match cSpecialCharacter display "L\='\\\o\{1,3}'" +syn match cSpecialCharacter display "'\\x\x\{1,2}'" +syn match cSpecialCharacter display "L'\\x\x\+'" + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match cSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match cSpaceError display " \+\t"me=e-1 + endif +endif + +" This should be before cErrInParen to avoid problems with #define ({ xxx }) +if exists("c_curly_error") + syntax match cCurlyError "}" + syntax region cBlock start="{" end="}" contains=ALLBUT,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold +else + syntax region cBlock start="{" end="}" transparent fold +endif + +"catch errors caused by wrong parenthesis and brackets +" also accept <% for {, %> for }, <: for [ and :> for ] (C99) +" But avoid matching <::. +syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom +if exists("c_no_curly_error") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "^[{}]\|^<%\|^%>" +elseif exists("c_no_bracket_error") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "[{}]\|<%\|%>" +else + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell + syn match cParenError display "[\])]" + syn match cErrInParen display contained "[\]{}]\|<%\|%>" + syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell + " cCppBracket: same as cParen but ends at end-of-line; used in cDefine + syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell + syn match cErrInBracket display contained "[);{}]\|<%\|%>" +endif + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal +" Same, but without octal error (for comments) +syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal +syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero +syn match cOctalZero display contained "\<0" +syn match cFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +if !exists("c_no_c99") + "hexadecimal floating point number, optional leading digits, with dot, with exponent + syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" + "hexadecimal floating point number, with leading digits, optional dot, with exponent + syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" +endif + +" flag an octal number with wrong digits +syn match cOctalError display contained "0\o*[89]\d*" +syn case match + +if exists("c_comment_strings") + " A comment can contain cString, cCharacter and cNumber. + " But a "*/" inside a cString in a cComment DOES end the comment! So we + " need to use a special type of cString: cCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match cCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region cCommentString contained start=+L\=\\\@" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" +if !exists("c_no_if0") + if !exists("c_no_if0_fold") + syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 fold + else + syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 + endif + syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip + syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip +endif +syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded display contained "<[^>]*>" +syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +"syn match cLineSkip "\\$" +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti +syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 keepend contains=ALLBUT,@cPreProcGroup,@Spell +syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell + +" Highlight User Labels +syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString +syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn cluster cLabelGroup contains=cUserLabel +syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup +syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + +syn match cUserLabel display "\I\i*" contained + +" Avoid recognizing most bitfields as labels +syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType +syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 contains=cType + +" Highlight Class and Function names +syn match cCustomParen "(" contains=cParen contains=cCppParen +syn match cCustomFunc "\w\+\s*(" contains=cCustomParen +syn match cCustomScope "::" +syn match cCustomClass "\w\+\s*::" contains=cCustomScope + +hi def link cCustomFunc Function +hi def link cCustomClass Function + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +if exists("c_curly_error") + syn sync fromstart +else + exec "syn sync ccomment cComment minlines=" . b:c_minlines +endif + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link cFormat cSpecial +hi def link cCppString cString +hi def link cCommentL cComment +hi def link cCommentStart cComment +hi def link cLabel Label +hi def link cUserLabel Label +hi def link cConditional Conditional +hi def link cRepeat Repeat +hi def link cCharacter Character +hi def link cSpecialCharacter cSpecial +hi def link cNumber Number +hi def link cOctal Number +hi def link cOctalZero PreProc " link this to Error if you want +hi def link cFloat Float +hi def link cOctalError cError +hi def link cParenError cError +hi def link cErrInParen cError +hi def link cErrInBracket cError +hi def link cCommentError cError +hi def link cCommentStartError cError +hi def link cSpaceError cError +hi def link cSpecialError cError +hi def link cCurlyError cError +hi def link cOperator Operator +hi def link cStructure Structure +hi def link cStorageClass StorageClass +hi def link cInclude Include +hi def link cPreProc PreProc +hi def link cDefine Macro +hi def link cIncluded cString +hi def link cError Error +hi def link cStatement Statement +hi def link cPreCondit PreCondit +hi def link cType Type +hi def link cConstant Constant +hi def link cCommentString cString +hi def link cComment2String cString +hi def link cCommentSkip cComment +hi def link cString String +hi def link cComment Comment +hi def link cSpecial SpecialChar +hi def link cTodo Todo +hi def link cCppSkip cCppOut +hi def link cCppOut2 cCppOut +hi def link cCppOut Comment + +let b:current_syntax = "c" + +" vim: ts=8 diff --git a/dot_vim/syntax/cvsannotate.vim b/dot_vim/syntax/cvsannotate.vim new file mode 100644 index 0000000..4af5809 --- /dev/null +++ b/dot_vim/syntax/cvsannotate.vim @@ -0,0 +1,45 @@ +" Vim syntax file +" Language: CVS annotate output +" Maintainer: Bob Hiestand +" Remark: Used by the cvscommand plugin. Originally written by Mathieu +" Clabaut +" License: +" Copyright (c) 2007 Bob Hiestand +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match cvsDate /\d\d-...-\d\d/ contained +syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate +syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName +syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate + +if !exists("did_cvsannotate_syntax_inits") + let did_cvsannotate_syntax_inits = 1 + hi link cvsDate Comment + hi link cvsName Type + hi link cvsVer Statement +endif + +let b:current_syntax="CVSAnnotate" diff --git a/dot_vim/syntax/gitannotate.vim b/dot_vim/syntax/gitannotate.vim new file mode 100644 index 0000000..932342d --- /dev/null +++ b/dot_vim/syntax/gitannotate.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: git annotate output +" Maintainer: Bob Hiestand +" Remark: Used by the vcscommand plugin. +" License: +" Copyright (c) 2009 Bob Hiestand +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. + +if exists("b:current_syntax") + finish +endif + +syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained +syn match gitCommit /^\^\?\x\+/ contained +syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained +syn match gitLineNumber /\d\+)\@=/ contained +syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName + +if !exists("did_gitannotate_syntax_inits") + let did_gitannotate_syntax_inits = 1 + hi link gitName Type + hi link gitCommit Statement + hi link gitDate Comment + hi link gitLineNumber Label +endif + +let b:current_syntax="gitAnnotate" diff --git a/dot_vim/syntax/haskell.vim b/dot_vim/syntax/haskell.vim new file mode 100644 index 0000000..10bb221 --- /dev/null +++ b/dot_vim/syntax/haskell.vim @@ -0,0 +1,355 @@ +" Vim syntax file +" +" Modification of vims Haskell syntax file: +" - match types using regular expression +" - highlight toplevel functions +" - use "syntax keyword" instead of "syntax match" where appropriate +" - functions and types in import and module declarations are matched +" - removed hs_highlight_more_types (just not needed anymore) +" - enable spell checking in comments and strings only +" - FFI highlighting +" - QuasiQuotation +" - top level Template Haskell slices +" - PackageImport +" +" TODO: find out which vim versions are still supported +" +" From Original file: +" =================== +" +" Language: Haskell +" Maintainer: Haskell Cafe mailinglist +" Last Change: 2010 Feb 21 +" Original Author: John Williams +" +" Thanks to Ryan Crumley for suggestions and John Meacham for +" pointing out bugs. Also thanks to Ian Lynagh and Donald Bruce Stewart +" for providing the inspiration for the inclusion of the handling +" of C preprocessor directives, and for pointing out a bug in the +" end-of-line comment handling. +" +" Options-assign a value to these variables to turn the option on: +" +" hs_highlight_delimiters - Highlight delimiter characters--users +" with a light-colored background will +" probably want to turn this on. +" hs_highlight_boolean - Treat True and False as keywords. +" hs_highlight_types - Treat names of primitive types as keywords. +" hs_highlight_debug - Highlight names of debugging functions. +" hs_allow_hash_operator - Don't highlight seemingly incorrect C +" preprocessor directives but assume them to be +" operators +" +" + +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +"syntax sync fromstart "mmhhhh.... is this really ok to do so? +syntax sync linebreaks=15 minlines=50 maxlines=500 + +syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)" +syn match hsSpecialChar contained "\\\(NUL\|SOH\|STX\|ETX\|EOT\|ENQ\|ACK\|BEL\|BS\|HT\|LF\|VT\|FF\|CR\|SO\|SI\|DLE\|DC1\|DC2\|DC3\|DC4\|NAK\|SYN\|ETB\|CAN\|EM\|SUB\|ESC\|FS\|GS\|RS\|US\|SP\|DEL\)" +syn match hsSpecialCharError contained "\\&\|'''\+" +sy region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar,@Spell +sy match hsCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=hsSpecialChar,hsSpecialCharError +sy match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hsSpecialCharError + +" (Qualified) identifiers (no default highlighting) +syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" +syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" + +" Infix operators--most punctuation characters and any (qualified) identifier +" enclosed in `backquotes`. An operator starting with : is a constructor, +" others are variables (e.g. functions). +syn match hsVarSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[-!#$%&\*\+/<=>\?@\\^|~.][-!#$%&\*\+/<=>\?@\\^|~:.]*" +syn match hsConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*" +syn match hsVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`" +syn match hsConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`" + +" Toplevel Template Haskell support +"sy match hsTHTopLevel "^[a-z]\(\(.\&[^=]\)\|\(\n[^a-zA-Z0-9]\)\)*" +sy match hsTHIDTopLevel "^[a-z]\S*" +sy match hsTHTopLevel "^\$(\?" nextgroup=hsTHTopLevelName +sy match hsTHTopLevelName "[a-z]\S*" contained + +" Reserved symbols--cannot be overloaded. +syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}" + +sy region hsInnerParen start="(" end=")" contained contains=hsInnerParen,hsConSym,hsType,hsVarSym +sy region hs_InfixOpFunctionName start="^(" end=")\s*[^:`]\(\W\&\S\&[^'\"`()[\]{}@]\)\+"re=s + \ contained keepend contains=hsInnerParen,hs_HlInfixOp + +sy match hs_hlFunctionName "[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained +sy match hs_FunctionName "^[a-z_]\(\S\&[^,\(\)\[\]]\)*" contained contains=hs_hlFunctionName +sy match hs_HighliteInfixFunctionName "`[a-z_][^`]*`" contained +sy match hs_InfixFunctionName "^\S[^=]*`[a-z_][^`]*`"me=e-1 contained contains=hs_HighliteInfixFunctionName,hsType,hsConSym,hsVarSym,hsString,hsCharacter +sy match hs_HlInfixOp "\(\W\&\S\&[^`(){}'[\]]\)\+" contained contains=hsString +sy match hs_InfixOpFunctionName "^\(\(\w\|[[\]{}]\)\+\|\(\".*\"\)\|\('.*'\)\)\s*[^:]=*\(\W\&\S\&[^='\"`()[\]{}@]\)\+" + \ contained contains=hs_HlInfixOp,hsCharacter + +sy match hs_OpFunctionName "(\(\W\&[^(),\"]\)\+)" contained +"sy region hs_Function start="^["'a-z_([{]" end="=\(\s\|\n\|\w\|[([]\)" keepend extend +sy region hs_Function start="^["'a-zA-Z_([{]\(\(.\&[^=]\)\|\(\n\s\)\)*=" end="\(\s\|\n\|\w\|[([]\)" + \ contains=hs_OpFunctionName,hs_InfixOpFunctionName,hs_InfixFunctionName,hs_FunctionName,hsType,hsConSym,hsVarSym,hsString,hsCharacter + +sy match hs_DeclareFunction "^[a-z_(]\S*\(\s\|\n\)*::" contains=hs_FunctionName,hs_OpFunctionName + +" hi hs_InfixOpFunctionName guibg=yellow +" hi hs_Function guibg=green +" hi hs_InfixFunctionName guibg=red +" hi hs_DeclareFunction guibg=red + +sy keyword hsStructure data family class where instance default deriving +sy keyword hsTypedef type newtype + +sy keyword hsInfix infix infixl infixr +sy keyword hsStatement do case of let in +sy keyword hsConditional if then else + +"if exists("hs_highlight_types") + " Primitive types from the standard prelude and libraries. + sy match hsType "\<[A-Z]\(\S\&[^,.]\)*\>" + sy match hsType "()" +"endif + +" Not real keywords, but close. +if exists("hs_highlight_boolean") + " Boolean constants from the standard prelude. + syn keyword hsBoolean True False +endif + +syn region hsPackageString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained +sy match hsModuleName excludenl "\([A-Z]\w*\.\?\)*" contained + +sy match hsImport "\\s\+\(qualified\s\+\)\?\(\<\(\w\|\.\)*\>\)" + \ contains=hsModuleName,hsImportLabel + \ nextgroup=hsImportParams,hsImportIllegal skipwhite +sy keyword hsImportLabel import qualified contained + +sy match hsImportIllegal "\w\+" contained + +sy keyword hsAsLabel as contained +sy keyword hsHidingLabel hiding contained + +sy match hsImportParams "as\s\+\(\w\+\)" contained + \ contains=hsModuleName,hsAsLabel + \ nextgroup=hsImportParams,hsImportIllegal skipwhite +sy match hsImportParams "hiding" contained + \ contains=hsHidingLabel + \ nextgroup=hsImportParams,hsImportIllegal skipwhite +sy region hsImportParams start="(" end=")" contained + \ contains=hsBlockComment,hsLineComment, hsType,hsDelimTypeExport,hs_hlFunctionName,hs_OpFunctionName + \ nextgroup=hsImportIllegal skipwhite + +" hi hsImport guibg=red +"hi hsImportParams guibg=bg +"hi hsImportIllegal guibg=bg +"hi hsModuleName guibg=bg + +"sy match hsImport "\\(.\|[^(]\)*\((.*)\)\?" +" \ contains=hsPackageString,hsImportLabel,hsImportMod,hsModuleName,hsImportList +"sy keyword hsImportLabel import contained +"sy keyword hsImportMod as qualified hiding contained +"sy region hsImportListInner start="(" end=")" contained keepend extend contains=hs_OpFunctionName +"sy region hsImportList matchgroup=hsImportListParens start="("rs=s+1 end=")"re=e-1 +" \ contained +" \ keepend extend +" \ contains=hsType,hsLineComment,hsBlockComment,hs_hlFunctionName,hsImportListInner + + + +" new module highlighting +syn region hsDelimTypeExport start="\<[A-Z]\(\S\&[^,.]\)*\>(" end=")" contained + \ contains=hsType + +sy keyword hsExportModuleLabel module contained +sy match hsExportModule "\\(\s\|\t\|\n\)*\([A-Z]\w*\.\?\)*" contained contains=hsExportModuleLabel,hsModuleName + +sy keyword hsModuleStartLabel module contained +sy keyword hsModuleWhereLabel where contained + +syn match hsModuleStart "^module\(\s\|\n\)*\(\<\(\w\|\.\)*\>\)\(\s\|\n\)*" + \ contains=hsModuleStartLabel,hsModuleName + \ nextgroup=hsModuleCommentA,hsModuleExports,hsModuleWhereLabel + +syn region hsModuleCommentA start="{-" end="-}" + \ contains=hsModuleCommentA,hsCommentTodo,@Spell contained + \ nextgroup=hsModuleCommentA,hsModuleExports,hsModuleWhereLabel skipwhite skipnl + +syn match hsModuleCommentA "--.*\n" + \ contains=hsCommentTodo,@Spell contained + \ nextgroup=hsModuleCommentA,hsModuleExports,hsModuleWhereLabel skipwhite skipnl + +syn region hsModuleExports start="(" end=")" contained + \ nextgroup=hsModuleCommentB,hsModuleWhereLabel skipwhite skipnl + \ contains=hsBlockComment,hsLineComment,hsType,hsDelimTypeExport,hs_hlFunctionName,hs_OpFunctionName,hsExportModule + +syn match hsModuleCommentB "--.*\n" + \ contains=hsCommentTodo,@Spell contained + \ nextgroup=hsModuleCommentB,hsModuleWhereLabel skipwhite skipnl + +syn region hsModuleCommentB start="{-" end="-}" + \ contains=hsModuleCommentB,hsCommentTodo,@Spell contained + \ nextgroup=hsModuleCommentB,hsModuleWhereLabel skipwhite skipnl +" end module highlighting + +" FFI support +sy keyword hsFFIForeign foreign contained +"sy keyword hsFFIImportExport import export contained +sy keyword hsFFIImportExport export contained +sy keyword hsFFICallConvention ccall stdcall contained +sy keyword hsFFISafety safe unsafe contained +sy region hsFFIString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=hsSpecialChar +sy match hsFFI excludenl "\\(.\&[^\"]\)*\"\(.\)*\"\(\s\|\n\)*\(.\)*::" + \ keepend + \ contains=hsFFIForeign,hsFFIImportExport,hsFFICallConvention,hsFFISafety,hsFFIString,hs_OpFunctionName,hs_hlFunctionName + + +sy match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" +sy match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" + +" Comments +sy keyword hsCommentTodo TODO FIXME XXX TBD contained +sy match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=hsCommentTodo,@Spell +sy region hsBlockComment start="{-" end="-}" contains=hsBlockComment,hsCommentTodo,@Spell +sy region hsPragma start="{-#" end="#-}" + +" QuasiQuotation +sy region hsQQ start="\[\$" end="|\]"me=e-2 keepend contains=hsQQVarID,hsQQContent nextgroup=hsQQEnd +sy region hsQQNew start="\[\(.\&[^|]\&\S\)*|" end="|\]"me=e-2 keepend contains=hsQQVarIDNew,hsQQContent nextgroup=hsQQEnd +sy match hsQQContent ".*" contained +sy match hsQQEnd "|\]" contained +sy match hsQQVarID "\[\$\(.\&[^|]\)*|" contained +sy match hsQQVarIDNew "\[\(.\&[^|]\)*|" contained + +if exists("hs_highlight_debug") + " Debugging functions from the standard prelude. + syn keyword hsDebug undefined error trace +endif + + +" C Preprocessor directives. Shamelessly ripped from c.vim and trimmed +" First, see whether to flag directive-like lines or not +if (!exists("hs_allow_hash_operator")) + syn match cError display "^\s*\(%:\|#\).*$" +endif +" Accept %: for # (C99) +syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCommentError +syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" +syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 +syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cCppSkip +syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cCppSkip +syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded display contained "<[^>]*>" +syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cCppOut,cCppOut2,cCppSkip,cCommentStartError +syn region cDefine matchgroup=cPreCondit start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" +syn region cPreProc matchgroup=cPreCondit start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend + +syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=cCommentStartError,cSpaceError contained +syntax match cCommentError display "\*/" contained +syntax match cCommentStartError display "/\*"me=e-1 contained +syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained + + +if version >= 508 || !exists("did_hs_syntax_inits") + if version < 508 + let did_hs_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink hs_hlFunctionName Function + HiLink hs_HighliteInfixFunctionName Function + HiLink hs_HlInfixOp Function + HiLink hs_OpFunctionName Function + HiLink hsTypedef Typedef + HiLink hsVarSym hsOperator + HiLink hsConSym hsOperator + if exists("hs_highlight_delimiters") + " Some people find this highlighting distracting. + HiLink hsDelimiter Delimiter + endif + + HiLink hsModuleStartLabel Structure + HiLink hsExportModuleLabel Keyword + HiLink hsModuleWhereLabel Structure + HiLink hsModuleName Normal + + HiLink hsImportIllegal Error + HiLink hsAsLabel hsImportLabel + HiLink hsHidingLabel hsImportLabel + HiLink hsImportLabel Include + HiLink hsImportMod Include + HiLink hsPackageString hsString + + HiLink hsOperator Operator + + HiLink hsInfix Keyword + HiLink hsStructure Structure + HiLink hsStatement Statement + HiLink hsConditional Conditional + + HiLink hsSpecialCharError Error + HiLink hsSpecialChar SpecialChar + HiLink hsString String + HiLink hsFFIString String + HiLink hsCharacter Character + HiLink hsNumber Number + HiLink hsFloat Float + + HiLink hsLiterateComment hsComment + HiLink hsBlockComment hsComment + HiLink hsLineComment hsComment + HiLink hsModuleCommentA hsComment + HiLink hsModuleCommentB hsComment + HiLink hsComment Comment + HiLink hsCommentTodo Todo + HiLink hsPragma SpecialComment + HiLink hsBoolean Boolean + + if exists("hs_highlight_types") + HiLink hsDelimTypeExport hsType + HiLink hsType Type + endif + + HiLink hsDebug Debug + + HiLink cCppString hsString + HiLink cCommentStart hsComment + HiLink cCommentError hsError + HiLink cCommentStartError hsError + HiLink cInclude Include + HiLink cPreProc PreProc + HiLink cDefine Macro + HiLink cIncluded hsString + HiLink cError Error + HiLink cPreCondit PreCondit + HiLink cComment Comment + HiLink cCppSkip cCppOut + HiLink cCppOut2 cCppOut + HiLink cCppOut Comment + + HiLink hsFFIForeign Keyword + HiLink hsFFIImportExport Structure + HiLink hsFFICallConvention Keyword + HiLink hsFFISafety Keyword + + HiLink hsTHIDTopLevel Macro + HiLink hsTHTopLevelName Macro + + HiLink hsQQVarID Keyword + HiLink hsQQVarIDNew Keyword + HiLink hsQQEnd Keyword + HiLink hsQQContent String + + delcommand HiLink +endif + +let b:current_syntax = "haskell" + diff --git a/dot_vim/syntax/hgannotate.vim b/dot_vim/syntax/hgannotate.vim new file mode 100755 index 0000000..cee9a23 --- /dev/null +++ b/dot_vim/syntax/hgannotate.vim @@ -0,0 +1,40 @@ +" Vim syntax file +" Language: HG annotate output +" Maintainer: Bob Hiestand +" Remark: Used by the vcscommand plugin. +" License: +" Copyright (c) 2010 Bob Hiestand +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. + +if exists("b:current_syntax") + finish +endif + +syn match hgVer /\d\+/ contained +syn match hgName /^\s*\S\+/ contained +syn match hgHead /^\s*\S\+\s\+\d\+:/ contains=hgVer,hgName + +if !exists("did_hgannotate_syntax_inits") + let did_hgannotate_syntax_inits = 1 + hi link hgName Type + hi link hgVer Statement +endif + +let b:current_syntax="hgAnnotate" diff --git a/dot_vim/syntax/java.vim b/dot_vim/syntax/java.vim new file mode 100644 index 0000000..8c33b12 --- /dev/null +++ b/dot_vim/syntax/java.vim @@ -0,0 +1,9 @@ +" Highlight Class and Function names +syn match javaCustomParen "(" contains=javaParenT +syn match javaCustomFunc "\w\+\s*(" contains=javaCustomParen +syn match javaCustomScope "::" +syn match javaCustomClass "\w\+\s*::" contains=cCustomScope + +hi def link javaCustomFunc Function +hi def link javaCustomClass Function + diff --git a/dot_vim/syntax/javascript.vim b/dot_vim/syntax/javascript.vim new file mode 100644 index 0000000..53b684e --- /dev/null +++ b/dot_vim/syntax/javascript.vim @@ -0,0 +1,247 @@ +" Vim syntax file +" Language: JavaScript +" Maintainer: Yi Zhao (ZHAOYI) +" Last Change: June 4, 2009 +" Version: 0.7.7 +" Changes: Add "undefined" as a type keyword +" +" TODO: +" - Add the HTML syntax inside the JSDoc + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'javascript' +endif + +"" Drop fold if it set but VIM doesn't support it. +let b:javascript_fold='true' +if version < 600 " Don't support the old version + unlet! b:javascript_fold +endif + +"" dollar sigh is permittd anywhere in an identifier +setlocal iskeyword+=$ + +syntax sync fromstart + +"" JavaScript comments +syntax keyword javaScriptCommentTodo TODO FIXME XXX TBD contained +syntax region javaScriptLineComment start=+\/\/+ end=+$+ keepend contains=javaScriptCommentTodo,@Spell +syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend contains=javaScriptCommentTodo,@Spell fold +syntax region javaScriptCvsTag start="\$\cid:" end="\$" oneline contained +syntax region javaScriptComment start="/\*" end="\*/" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold + +"" JSDoc support start +if !exists("javascript_ignore_javaScriptdoc") + syntax case ignore + + "" syntax coloring for javadoc comments (HTML) + "syntax include @javaHtml :p:h/html.vim + "unlet b:current_syntax + + syntax region javaScriptDocComment matchgroup=javaScriptComment start="/\*\*\s*$" end="\*/" contains=javaScriptDocTags,javaScriptCommentTodo,javaScriptCvsTag,@javaScriptHtml,@Spell fold + syntax match javaScriptDocTags contained "@\(param\|argument\|requires\|exception\|throws\|type\|class\|extends\|see\|link\|member\|module\|method\|title\|namespace\|optional\|default\|base\|file\)\>" nextgroup=javaScriptDocParam,javaScriptDocSeeTag skipwhite + syntax match javaScriptDocTags contained "@\(beta\|deprecated\|description\|fileoverview\|author\|license\|version\|returns\=\|constructor\|private\|protected\|final\|ignore\|addon\|exec\)\>" + syntax match javaScriptDocParam contained "\%(#\|\w\|\.\|:\|\/\)\+" + syntax region javaScriptDocSeeTag contained matchgroup=javaScriptDocSeeTag start="{" end="}" contains=javaScriptDocTags + + syntax case match +endif "" JSDoc end + +syntax case match + +"" Syntax in the JavaScript code +syntax match javaScriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\." +syntax region javaScriptStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=javaScriptSpecial,@htmlPreproc +syntax region javaScriptStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=javaScriptSpecial,@htmlPreproc +syntax region javaScriptRegexpString start=+/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gim]\{,3}+ contains=javaScriptSpecial,@htmlPreproc oneline +syntax match javaScriptNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/ +syntax match javaScriptFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/ +syntax match javaScriptLabel /\(?\s*\)\@/ + syntax match javaScriptDomElemFuncs contained /\%(insertBefore\|replaceChild\|removeChild\|appendChild\|hasChildNodes\|cloneNode\|normalize\|isSupported\|hasAttributes\|getAttribute\|setAttribute\|removeAttribute\|getAttributeNode\|setAttributeNode\|removeAttributeNode\|getElementsByTagName\|getAttributeNS\|setAttributeNS\|removeAttributeNS\|getAttributeNodeNS\|setAttributeNodeNS\|getElementsByTagNameNS\|hasAttribute\|hasAttributeNS\)\>/ nextgroup=javaScriptParen skipwhite + " HTML things + syntax match javaScriptHtmlElemAttrs contained /\%(className\|clientHeight\|clientLeft\|clientTop\|clientWidth\|dir\|id\|innerHTML\|lang\|length\|offsetHeight\|offsetLeft\|offsetParent\|offsetTop\|offsetWidth\|scrollHeight\|scrollLeft\|scrollTop\|scrollWidth\|style\|tabIndex\|title\)\>/ + syntax match javaScriptHtmlElemFuncs contained /\%(blur\|click\|focus\|scrollIntoView\|addEventListener\|dispatchEvent\|removeEventListener\|item\)\>/ nextgroup=javaScriptParen skipwhite + + " CSS Styles in JavaScript + syntax keyword javaScriptCssStyles contained color font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight letterSpacing lineBreak lineHeight quotes rubyAlign rubyOverhang rubyPosition + syntax keyword javaScriptCssStyles contained textAlign textAlignLast textAutospace textDecoration textIndent textJustify textJustifyTrim textKashidaSpace textOverflowW6 textShadow textTransform textUnderlinePosition + syntax keyword javaScriptCssStyles contained unicodeBidi whiteSpace wordBreak wordSpacing wordWrap writingMode + syntax keyword javaScriptCssStyles contained bottom height left position right top width zIndex + syntax keyword javaScriptCssStyles contained border borderBottom borderLeft borderRight borderTop borderBottomColor borderLeftColor borderTopColor borderBottomStyle borderLeftStyle borderRightStyle borderTopStyle borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderColor borderStyle borderWidth borderCollapse borderSpacing captionSide emptyCells tableLayout + syntax keyword javaScriptCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop + syntax keyword javaScriptCssStyles contained listStyle listStyleImage listStylePosition listStyleType + syntax keyword javaScriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage gackgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat + syntax keyword javaScriptCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType + syntax keyword javaScriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText + syntax keyword javaScriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor + + " Highlight ways + syntax match javaScriptDotNotation "\." nextgroup=javaScriptPrototype,javaScriptDomElemAttrs,javaScriptDomElemFuncs,javaScriptHtmlElemAttrs,javaScriptHtmlElemFuncs + syntax match javaScriptDotNotation "\.style\." nextgroup=javaScriptCssStyles + +endif "DOM/HTML/CSS + +"" end DOM/HTML/CSS specified things + + +"" Code blocks +syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation +syntax region javaScriptBracket matchgroup=javaScriptBracket transparent start="\[" end="\]" contains=@javaScriptAll,javaScriptParensErrB,javaScriptParensErrC,javaScriptBracket,javaScriptParen,javaScriptBlock,@htmlPreproc +syntax region javaScriptParen matchgroup=javaScriptParen transparent start="(" end=")" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrC,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc +syntax region javaScriptBlock matchgroup=javaScriptBlock transparent start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc + +"" catch errors caused by wrong parenthesis +syntax match javaScriptParensError ")\|}\|\]" +syntax match javaScriptParensErrA contained "\]" +syntax match javaScriptParensErrB contained ")" +syntax match javaScriptParensErrC contained "}" + +if main_syntax == "javascript" + syntax sync clear + syntax sync ccomment javaScriptComment minlines=200 + syntax sync match javaScriptHighlight grouphere javaScriptBlock /{/ +endif + +"" Fold control +if exists("b:javascript_fold") + syntax match javaScriptFunction /\/ nextgroup=javaScriptFuncName skipwhite + syntax match javaScriptOpAssign /=\@= 508 || !exists("did_javascript_syn_inits") + if version < 508 + let did_javascript_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink javaScriptComment Comment + HiLink javaScriptLineComment Comment + HiLink javaScriptDocComment Comment + HiLink javaScriptCommentTodo Todo + HiLink javaScriptCvsTag Function + HiLink javaScriptDocTags Special + HiLink javaScriptDocSeeTag Function + HiLink javaScriptDocParam Function + HiLink javaScriptStringS String + HiLink javaScriptStringD String + HiLink javaScriptRegexpString String + HiLink javaScriptCharacter Character + HiLink javaScriptPrototype Type + HiLink javaScriptConditional Conditional + HiLink javaScriptBranch Conditional + HiLink javaScriptRepeat Repeat + HiLink javaScriptStatement Statement +" HiLink javaScriptFunction Function + HiLink javaScriptFunction Keyword + HiLink javaScriptError Error + HiLink javaScriptParensError Error + HiLink javaScriptParensErrA Error + HiLink javaScriptParensErrB Error + HiLink javaScriptParensErrC Error + HiLink javaScriptOperator Operator + HiLink javaScriptType Type + HiLink javaScriptNull Type + HiLink javaScriptNumber Number + HiLink javaScriptFloat Number + HiLink javaScriptBoolean Boolean + HiLink javaScriptLabel Label + HiLink javaScriptSpecial Special + HiLink javaScriptSource Special + HiLink javaScriptGlobalObjects Special + HiLink javaScriptExceptions Special + + HiLink javaScriptDomErrNo Constant + HiLink javaScriptDomNodeConsts Constant + HiLink javaScriptDomElemAttrs Label + HiLink javaScriptDomElemFuncs PreProc + + HiLink javaScriptHtmlEvents Special + HiLink javaScriptHtmlElemAttrs Label + HiLink javaScriptHtmlElemFuncs PreProc + + HiLink javaScriptCssStyles Label + + delcommand HiLink +endif + +" Define the htmlJavaScript for HTML syntax html.vim +"syntax clear htmlJavaScript +"syntax clear javaScriptExpression +syntax cluster htmlJavaScript contains=@javaScriptAll,javaScriptBracket,javaScriptParen,javaScriptBlock,javaScriptParenError +syntax cluster javaScriptExpression contains=@javaScriptAll,javaScriptBracket,javaScriptParen,javaScriptBlock,javaScriptParenError,@htmlPreproc + +let b:current_syntax = "javascript" +if main_syntax == 'javascript' + unlet main_syntax +endif + +" vim: ts=4 diff --git a/dot_vim/syntax/lilypond-words b/dot_vim/syntax/lilypond-words new file mode 100644 index 0000000..612d59b --- /dev/null +++ b/dot_vim/syntax/lilypond-words @@ -0,0 +1,1040 @@ +\\withMusicProperty +\\with +\\whiteTriangleMarkup +\\voiceTwoStyle +\\voiceTwo +\\voiceThreeStyle +\\voiceThree +\\voiceOneStyle +\\voiceOne +\\voiceNeutralStyle +\\voiceFourStyle +\\voiceFour +\\vocalName +\\virgula +\\virga +\\verylongfermata +\\verticallySpacedContexts +\\versus +\\version +\\varcoda +\\upprall +\\upmordent +\\upbow +\\up +\\unset +\\unit +\\unfoldRepeats +\\unaCorda +\\unHideNotes +\\type +\\tweak +\\turn +\\tupletUp +\\tupletNeutral +\\tupletDown +\\trill +\\treCorde +\\transposition +\\transposedCueDuring +\\transpose +\\tiny +\\timing +\\times +\\time +\\tildeSymbol +\\tieWaitForNote +\\tieUp +\\tieSolid +\\tieNeutral +\\tieDown +\\tieDotted +\\tieDashed +\\thumb +\\textSpannerUp +\\textSpannerNeutral +\\textSpannerDown +\\textLengthOn +\\textLengthOff +\\tenuto +\\tempoWholesPerMinute +\\tempo +\\teeny +\\tag +\\tablatureFormat +\\systemStartDelimiter +\\sustainOn +\\sustainOff +\\subdivideBeams +\\stropha +\\strokeFingerOrientations +\\stringTunings +\\stringOneTopmost +\\stringNumberOrientations +\\stopped +\\stopTrillSpan +\\stopTextSpan +\\stopStaff +\\stopGroup +\\stopGraceMusic +\\stopAppoggiaturaMusic +\\stopAcciaccaturaMusic +\\stop +\\stemUp +\\stemNeutral +\\stemDown +\\startTrillSpan +\\startTextSpan +\\startStaff +\\startGroup +\\startGraceMusic +\\startAppoggiaturaMusic +\\startAcciaccaturaMusic +\\start +\\staccato +\\staccatissimo +\\squashedPosition +\\spp +\\spacingTweaks +\\sp +\\sostenutoOn +\\sostenutoOff +\\soloText +\\soloIIText +\\smaller +\\small +\\slurUp +\\slurSolid +\\slurNeutral +\\slurDown +\\slurDotted +\\slurDashed +\\skipTypesetting +\\skip +\\simultaneous +\\signumcongruentiae +\\showStaffSwitch +\\shortfermata +\\shortVocalName +\\shortInstrumentName +\\shiftOnnn +\\shiftOnn +\\shiftOn +\\shiftOff +\\shiftDurations +\\sfz +\\sfp +\\sff +\\sf +\\setDefaultDurationToQuarter +\\set +\\sequential +\\semicirculus +\\semiGermanChords +\\segno +\\scriptDefinitions +\\scoreTweak +\\score +\\scaleDurations +\\sacredHarpHeads +\\rtoe +\\rightHandFinger +\\right +\\rheel +\\rfz +\\revert +\\reverseturn +\\rest +\\responsum +\\resetRelativeOctave +\\repeatTie +\\repeatCountVisibility +\\repeat +\\removeWithTag +\\remove +\\relative +\\rehearsalMark +\\quotedEventTypes +\\quoteDuring +\\quilisma +\\pt +\\printPartCombineTexts +\\printKeyCancellation +\\predefinedFretboardsOn +\\predefinedFretboardsOff +\\predefinedDiagramTable +\\prallup +\\prallprall +\\prallmordent +\\pralldown +\\prall +\\ppppp +\\pppp +\\ppp +\\pp +\\portato +\\pointAndClickOn +\\pointAndClickOff +\\pitchedTrill +\\pipeSymbol +\\phrygian +\\phrasingSlurUp +\\phrasingSlurSolid +\\phrasingSlurNeutral +\\phrasingSlurDown +\\phrasingSlurDotted +\\phrasingSlurDashed +\\pes +\\pedalUnaCordaStyle +\\pedalUnaCordaStrings +\\pedalSustainStyle +\\pedalSustainStrings +\\pedalSostenutoStyle +\\pedalSostenutoStrings +\\partialJazzMusic +\\partialJazzExceptions +\\partial +\\partcombine +\\partCombineListener +\\parenthesize +\\parenthesisOpenSymbol +\\parenthesisCloseSymbol +\\parallelMusic +\\paper +\\pageTurn +\\pageBreak +\\p +\\overrideProperty +\\override +\\ottava +\\oriscus +\\open +\\oneVoice +\\once +\\octaveCheck +\\objectid +\\numericTimeSignature +\\notemode +\\noteToFretFunction +\\normalsize +\\noPageTurn +\\noPageBreak +\\noBreak +\\noBeam +\\newSpacingSection +\\new +\\neumeDemoLayout +\\name +\\musicMap +\\mp +\\mordent +\\mm +\\mixolydian +\\minor +\\midiInstrument +\\midi +\\middleCPosition +\\middleCClefPosition +\\mf +\\metronomeMarkFormatter +\\mergeDifferentlyHeadedOn +\\mergeDifferentlyHeadedOff +\\mergeDifferentlyDottedOn +\\mergeDifferentlyDottedOff +\\melismaEnd +\\melismaBusyProperties +\\melisma +\\maxima +\\markuplines +\\markup +\\markFormatter +\\mark +\\marcato +\\makeClusters +\\majorSevenSymbol +\\major +\\maininput +\\lyricsto +\\lyrics +\\lyricmode +\\lyricMelismaAlignment +\\lydian +\\ltoe +\\longfermata +\\longa +\\locrian +\\localKeySignature +\\lineprall +\\linea +\\ligature +\\lheel +\\left +\\layout +\\large +\\laissezVibrer +\\label +\\killCues +\\keyAlterationOrder +\\key +\\keepWithTag +\\keepAliveInterfaces +\\italianChords +\\ionian +\\interscoreline +\\instrumentTransposition +\\instrumentSwitch +\\instrumentName +\\instrumentEqualizer +\\indent +\\includePageLayoutFile +\\include +\\inclinatum +\\in +\\improvisationOn +\\improvisationOff +\\implicitTimeSignatureVisibility +\\ij +\\iij +\\ignoreFiguredBassRest +\\ignoreBarChecks +\\ignatzekExceptions +\\ignatzekExceptionMusic +\\ictus +\\huge +\\highStringOne +\\hideStaffSwitch +\\hideNotes +\\header +\\harmonicAccidentals +\\harmonic +\\grobdescriptions +\\graceSettings +\\grace +\\glissando +\\germanChords +\\fz +\\fullJazzExceptions +\\frenchChords +\\fp +\\fontSize +\\flexa +\\flageolet +\\firstClef +\\fingeringOrientations +\\finalis +\\figures +\\figuremode +\\figuredBassFormatter +\\ffff +\\fff +\\ff +\\fermataMarkup +\\fermata +\\featherDurations +\\f +\\extraNatural +\\explicitKeySignatureVisibility +\\explicitClefVisibility +\\expandFullBarRests +\\espressivo +\\escapedSmallerSymbol +\\escapedParenthesisOpenSymbol +\\escapedParenthesisCloseSymbol +\\escapedExclamationSymbol +\\escapedBiggerSymbol +\\episemInitium +\\episemFinis +\\endincipit +\\enddim +\\enddecr +\\endcresc +\\endcr +\\endSpanners +\\easyHeadsOn +\\easyHeadsOff +\\dynamicUp +\\dynamicNeutral +\\dynamicDown +\\dynamicAbsoluteVolumeFunction +\\drums +\\drummode +\\drumStyleTable +\\drumPitchTable +\\downprall +\\downmordent +\\downbow +\\down +\\doubleRepeatType +\\dotsUp +\\dotsNeutral +\\dotsDown +\\dorian +\\divisioMinima +\\divisioMaxima +\\divisioMaior +\\displayMusic +\\displayLilyMusic +\\dimTextDim +\\dimTextDecresc +\\dimTextDecr +\\dimHairpin +\\dim +\\description +\\descendens +\\denies +\\deminutum +\\defaultchild +\\defaultTimeSignature +\\defaultBarType +\\default +\\decrescendoSpanner +\\decr +\\dashUnderscore +\\dashPlus +\\dashLarger +\\dashHat +\\dashDot +\\dashDash +\\dashBar +\\cueDuring +\\crescendoSpanner +\\crescTextCresc +\\crescHairpin +\\cresc +\\createSpacing +\\cr +\\context +\\consists +\\compressFullBarRests +\\coda +\\cm +\\clefPosition +\\clefOctavation +\\clefGlyph +\\clef +\\circulus +\\chords +\\chordmodifiers +\\chordmode +\\chordRootNamer +\\chordPrefixSpacer +\\chordNoteNamer +\\chordNameSeparator +\\chordNameFunction +\\chordNameExceptionsPartial +\\chordNameExceptionsFull +\\chordNameExceptions +\\change +\\center +\\cavum +\\caesura +\\cadenzaOn +\\cadenzaOff +\\breve +\\breathe +\\break +\\bracketOpenSymbol +\\bracketCloseSymbol +\\bookpart +\\book +\\blackTriangleMarkup +\\bigger +\\bendAfter +\\bassStaffProperties +\\bassFigureStaffAlignmentUp +\\bassFigureStaffAlignmentNeutral +\\bassFigureStaffAlignmentDown +\\bassFigureExtendersOn +\\bassFigureExtendersOff +\\barNumberVisibility +\\barNumberCheck +\\barCheckSynchronize +\\barAlways +\\bar +\\balloonText +\\balloonLengthOn +\\balloonLengthOff +\\balloonGrobText +\\automaticBars +\\autochange +\\autoCautionaries +\\autoBeaming +\\autoBeamSettings +\\autoBeamOn +\\autoBeamOff +\\autoBeamCheck +\\autoAccidentals +\\augmentum +\\auctum +\\assertBeamSlope +\\assertBeamQuant +\\ascendens +\\arpeggioParenthesis +\\arpeggioNormal +\\arpeggioBracket +\\arpeggioArrowUp +\\arpeggioArrowDown +\\arpeggio +\\appoggiatura +\\applyOutput +\\applyMusic +\\applyContext +\\alternative +\\allowPageTurn +\\alias +\\aikenHeads +\\afterGraceFraction +\\afterGrace +\\aeolian +\\addlyrics +\\addQuote +\\addInstrumentDefinition +\\acciaccatura +\\accepts +\\accentus +\\accent +\\aDueText +\\RemoveEmptyStaffContext +\\RemoveEmptyRhythmicStaffContext +\\IJ +\\IIJ +\\C +\\B +\\AncientRemoveEmptyStaffContext +\\A +strings +Volta_engraver +Voice +Vertically_spaced_contexts_engraver +Vertical_align_engraver +Vaticana_ligature_engraver +VaticanaVoice +VaticanaStaff +Tweak_engraver +Tuplet_engraver +Trill_spanner_engraver +Timing_translator +Time_signature_performer +Time_signature_engraver +Tie_performer +Tie_engraver +Text_spanner_engraver +Text_engraver +Tempo_performer +Tab_staff_symbol_engraver +Tab_note_heads_engraver +Tab_harmonic_engraver +TabVoice +TabStaff +System_start_delimiter_engraver +Swallow_performer +Swallow_engraver +String_number_engraver +Stem_engraver +Stanza_number_engraver +Stanza_number_align_engraver +Staff_symbol_engraver +Staff_performer +Staff_collecting_engraver +StaffGroup +Staff +Spanner_break_forbid_engraver +Span_bar_engraver +Span_arpeggio_engraver +Spacing_engraver +Slur_performer +Slur_engraver +Slash_repeat_engraver +Skip_event_swallow_translator +Separating_line_group_engraver +Script_row_engraver +Script_engraver +Script_column_engraver +Score +Rhythmic_column_engraver +RhythmicStaff +Rest_swallow_translator +Rest_engraver +Rest_collision_engraver +Repeat_tie_engraver +Repeat_acknowledge_engraver +Pitched_trill_engraver +Pitch_squash_engraver +Piano_pedal_performer +Piano_pedal_engraver +Piano_pedal_align_engraver +PianoStaff +Phrasing_slur_engraver +Percent_repeat_engraver +Part_combine_engraver +Parenthesis_engraver +Paper_column_engraver +Output_property_engraver +Ottava_spanner_engraver +Note_swallow_translator +Note_spacing_engraver +Note_performer +Note_name_engraver +Note_heads_engraver +Note_head_line_engraver +NoteNames +New_fingering_engraver +New_dynamic_engraver +Multi_measure_rest_engraver +Metronome_mark_engraver +Mensural_ligature_engraver +MensuralVoice +MensuralStaff +Mark_engraver +Lyrics +Lyric_performer +Lyric_engraver +Ligature_bracket_engraver +Ledger_line_engraver +Laissez_vibrer_engraver +Key_performer +Key_engraver +Instrument_switch_engraver +Instrument_name_engraver +Hyphen_engraver +Hara_kiri_engraver +Grob_pq_engraver +GregorianTranscriptionVoice +GregorianTranscriptionStaff +GrandStaff +Grace_spacing_engraver +Grace_engraver +Grace_beam_engraver +Global +Glissando_engraver +Fretboard_engraver +FretBoards +Forbid_line_break_engraver +Font_size_engraver +Fingering_engraver +Figured_bass_position_engraver +Figured_bass_engraver +FiguredBass +Extender_engraver +Dynamic_performer +Dynamic_align_engraver +Drum_notes_engraver +Drum_note_performer +DrumVoice +DrumStaff +Dots_engraver +Dot_column_engraver +Devnull +Default_bar_line_engraver +Custos_engraver +CueVoice +Control_track_performer +Collision_engraver +Cluster_spanner_engraver +Clef_engraver +Chord_tremolo_engraver +Chord_name_engraver +ChordNames +ChordNameVoice +ChoirStaff +Breathing_sign_engraver +Break_align_engraver +Bend_engraver +Beam_performer +Beam_engraver +Bar_number_engraver +Bar_engraver +Axis_group_engraver +Auto_beam_engraver +Arpeggio_engraver +Accidental_engraver +vibraslap +twoup +twodown +tt +triangle +threeup +threedown +tambourine +splashcymbal +solstqt +solss +solsqt +solsd +solsb +sols +solkk +solk +soldsd +soldd +sold +solbtqt +solbsb +solbqt +solbb +solb +sol +snare +sistqt +siss +sisqt +sisd +sisb +sis +sikk +sik +sidsd +sidestick +sidd +sid +sibtqt +sibsb +sibqt +sibb +sib +si +shortwhistle +shortguiro +ridecymbalb +ridecymbala +ridecymbal +ridebell +restqt +ress +resqt +resd +resb +res +rekk +rek +redsd +redd +red +rebtqt +rebsb +rebqt +rebb +reb +re +pedalhihat +opentriangle +openloconga +openlobongo +openhihat +openhiconga +openhibongo +opencuica +oneup +onedown +mutetriangle +muteloconga +mutelobongo +mutehiconga +mutehibongo +mutecuica +mistqt +miss +misqt +misd +misb +mis +mikk +mik +midsd +midd +mid +mibtqt +mibsb +mibqt +mibb +mib +mi +maracas +lowtom +lowoodblock +lowmidtom +lowfloortom +lotimbale +losidestick +longwhistle +longguiro +loconga +lobongo +loagogo +lastqt +lass +lasqt +lasd +lasb +las +lakk +lak +ladsd +ladd +lad +labtqt +labsb +labqt +labb +lab +la +hiwoodblock +hitimbale +hississ +hiss +hisis +hisih +hisidestick +his +himidtom +hihat +hih +hightom +highfloortom +hiconga +hibongo +hiagogo +hessess +heses +heseh +handclap +halfopenhihat +h +gx +guiro +gtqs +gtqf +gss +gsharpsharp +gsharp +gs +gqs +gqf +gississ +giss +gisis +gisih +gis +gih +gflatflat +gflat +gff +gf +gessess +gess +geses +geseh +ges +geh +g +fx +ftqs +ftqf +fss +fsharpsharp +fsharp +fs +fqs +fqf +fourup +fourdown +fiveup +fivedown +fississ +fiss +fisis +fisih +fis +fih +fflatflat +fflat +fff +ff +fessess +fess +feses +feseh +fes +feh +fastqt +fass +fasqt +fasd +fasb +fas +fakk +fak +fadsd +fadd +fad +fabtqt +fabsb +fabqt +fabb +fab +fa +f +ex +etqs +etqf +essess +ess +esharpsharp +esharp +eses +eseh +es +eqs +eqf +electricsnare +eississ +eiss +eisis +eisih +eis +eih +eflatflat +eflat +eff +ef +eessess +eess +eeses +eeseh +ees +eeh +e +dx +dtqs +dtqf +dss +dsharpsharp +dsharp +ds +dqs +dqf +dostqt +doss +dosqt +dosd +dosb +dos +dokk +dok +dodsd +dodd +dod +dobtqt +dobsb +dobqt +dobb +dob +do +dississ +diss +disis +disih +dis +dih +dflatflat +dflat +dff +df +dessess +dess +deses +deseh +des +deh +d +cx +ctqs +ctqf +css +csharpsharp +csharp +cs +crashcymbalb +crashcymbala +crashcymbal +cqs +cqf +cowbell +closedhihat +claves +cississ +ciss +cisis +cisih +cis +cih +chinesecymbal +cflatflat +cflat +cff +cf +cessess +cess +ceses +ceseh +ces +ceh +cabasa +c +bx +btqs +btqf +bss +bsharpsharp +bsharp +bs +bqs +bqf +bisis +bisih +bis +bih +bflatflat +bflat +bff +bf +bess +beses +beseh +bes +beh +bb +bassdrum +b +ax +atqs +atqf +assess +ass +asharpsharp +asharp +ases +aseh +asas +asah +as +aqs +aqf +aississ +aiss +aisis +aisih +ais +aih +aflatflat +aflat +aff +af +aessess +aess +aeses +aeseh +aes +aeh +acousticsnare +a diff --git a/dot_vim/syntax/lilypond-words.vim b/dot_vim/syntax/lilypond-words.vim new file mode 100644 index 0000000..cd4eb57 --- /dev/null +++ b/dot_vim/syntax/lilypond-words.vim @@ -0,0 +1,3 @@ +syn match lilyKeyword "[-_^]\?\\\(withMusicProperty\|with\|whiteTriangleMarkup\|voiceTwoStyle\|voiceTwo\|voiceThreeStyle\|voiceThree\|voiceOneStyle\|voiceOne\|voiceNeutralStyle\|voiceFourStyle\|voiceFour\|vocalName\|virgula\|virga\|verylongfermata\|verticallySpacedContexts\|versus\|version\|varcoda\|upprall\|upmordent\|upbow\|up\|unset\|unit\|unfoldRepeats\|unaCorda\|unHideNotes\|type\|tweak\|turn\|tupletUp\|tupletNeutral\|tupletDown\|trill\|treCorde\|transposition\|transposedCueDuring\|transpose\|tiny\|timing\|times\|time\|tildeSymbol\|tieWaitForNote\|tieUp\|tieSolid\|tieNeutral\|tieDown\|tieDotted\|tieDashed\|thumb\|textSpannerUp\|textSpannerNeutral\|textSpannerDown\|textLengthOn\|textLengthOff\|tenuto\|tempoWholesPerMinute\|tempo\|teeny\|tag\|tablatureFormat\|systemStartDelimiter\|sustainOn\|sustainOff\|subdivideBeams\|stropha\|strokeFingerOrientations\|stringTunings\|stringOneTopmost\|stringNumberOrientations\|stopped\|stopTrillSpan\|stopTextSpan\|stopStaff\|stopGroup\|stopGraceMusic\|stopAppoggiaturaMusic\|stopAcciaccaturaMusic\|stop\|stemUp\|stemNeutral\|stemDown\|startTrillSpan\|startTextSpan\|startStaff\|startGroup\|startGraceMusic\|startAppoggiaturaMusic\|startAcciaccaturaMusic\|start\|staccato\|staccatissimo\|squashedPosition\|spp\|spacingTweaks\|sp\|sostenutoOn\|sostenutoOff\|soloText\|soloIIText\|smaller\|small\|slurUp\|slurSolid\|slurNeutral\|slurDown\|slurDotted\|slurDashed\|skipTypesetting\|skip\|simultaneous\|signumcongruentiae\|showStaffSwitch\|shortfermata\|shortVocalName\|shortInstrumentName\|shiftOnnn\|shiftOnn\|shiftOn\|shiftOff\|shiftDurations\|sfz\|sfp\|sff\|sf\|setDefaultDurationToQuarter\|set\|sequential\|semicirculus\|semiGermanChords\|segno\|scriptDefinitions\|scoreTweak\|score\|scaleDurations\|sacredHarpHeads\|rtoe\|rightHandFinger\|right\|rheel\|rfz\|revert\|reverseturn\|rest\|responsum\|resetRelativeOctave\|repeatTie\|repeatCountVisibility\|repeat\|removeWithTag\|remove\|relative\|rehearsalMark\|quotedEventTypes\|quoteDuring\|quilisma\|pt\|printPartCombineTexts\|printKeyCancellation\|predefinedFretboardsOn\|predefinedFretboardsOff\|predefinedDiagramTable\|prallup\|prallprall\|prallmordent\|pralldown\|prall\|ppppp\|pppp\|ppp\|pp\|portato\|pointAndClickOn\|pointAndClickOff\|pitchedTrill\|pipeSymbol\|phrygian\|phrasingSlurUp\|phrasingSlurSolid\|phrasingSlurNeutral\|phrasingSlurDown\|phrasingSlurDotted\|phrasingSlurDashed\|pes\|pedalUnaCordaStyle\|pedalUnaCordaStrings\|pedalSustainStyle\|pedalSustainStrings\|pedalSostenutoStyle\|pedalSostenutoStrings\|partialJazzMusic\|partialJazzExceptions\|partial\|partcombine\|partCombineListener\|parenthesize\|parenthesisOpenSymbol\|parenthesisCloseSymbol\|parallelMusic\|paper\|pageTurn\|pageBreak\|p\|overrideProperty\|override\|ottava\|oriscus\|open\|oneVoice\|once\|octaveCheck\|objectid\|numericTimeSignature\|notemode\|noteToFretFunction\|normalsize\|noPageTurn\|noPageBreak\|noBreak\|noBeam\|newSpacingSection\|new\|neumeDemoLayout\|name\|musicMap\|mp\|mordent\|mm\|mixolydian\|minor\|midiInstrument\|midi\|middleCPosition\|middleCClefPosition\|mf\|metronomeMarkFormatter\|mergeDifferentlyHeadedOn\|mergeDifferentlyHeadedOff\|mergeDifferentlyDottedOn\|mergeDifferentlyDottedOff\|melismaEnd\|melismaBusyProperties\|melisma\|maxima\|markuplines\|markup\|markFormatter\|mark\|marcato\|makeClusters\|majorSevenSymbol\|major\|maininput\|lyricsto\|lyrics\|lyricmode\|lyricMelismaAlignment\|lydian\|ltoe\|longfermata\|longa\|locrian\|localKeySignature\|lineprall\|linea\|ligature\|lheel\|left\|layout\|large\|laissezVibrer\|label\|killCues\|keyAlterationOrder\|key\|keepWithTag\|keepAliveInterfaces\|italianChords\|ionian\|interscoreline\|instrumentTransposition\|instrumentSwitch\|instrumentName\|instrumentEqualizer\|indent\|includePageLayoutFile\|include\|inclinatum\|in\|improvisationOn\|improvisationOff\|implicitTimeSignatureVisibility\|ij\|iij\|ignoreFiguredBassRest\|ignoreBarChecks\|ignatzekExceptions\|ignatzekExceptionMusic\|ictus\|huge\|highStringOne\|hideStaffSwitch\|hideNotes\|header\|harmonicAccidentals\|harmonic\|grobdescriptions\|graceSettings\|grace\|glissando\|germanChords\|fz\|fullJazzExceptions\|frenchChords\|fp\|fontSize\|flexa\|flageolet\|firstClef\|fingeringOrientations\|finalis\|figures\|figuremode\|figuredBassFormatter\|ffff\|fff\|ff\|fermataMarkup\|fermata\|featherDurations\|f\|extraNatural\|explicitKeySignatureVisibility\|explicitClefVisibility\|expandFullBarRests\|espressivo\|escapedSmallerSymbol\|escapedParenthesisOpenSymbol\|escapedParenthesisCloseSymbol\|escapedExclamationSymbol\|escapedBiggerSymbol\|episemInitium\|episemFinis\|endincipit\|enddim\|enddecr\|endcresc\|endcr\|endSpanners\|easyHeadsOn\|easyHeadsOff\|dynamicUp\|dynamicNeutral\|dynamicDown\|dynamicAbsoluteVolumeFunction\|drums\|drummode\|drumStyleTable\|drumPitchTable\|downprall\|downmordent\|downbow\|down\|doubleRepeatType\|dotsUp\|dotsNeutral\|dotsDown\|dorian\|divisioMinima\|divisioMaxima\|divisioMaior\|displayMusic\|displayLilyMusic\|dimTextDim\|dimTextDecresc\|dimTextDecr\|dimHairpin\|dim\|description\|descendens\|denies\|deminutum\|defaultchild\|defaultTimeSignature\|defaultBarType\|default\|decrescendoSpanner\|decr\|dashUnderscore\|dashPlus\|dashLarger\|dashHat\|dashDot\|dashDash\|dashBar\|cueDuring\|crescendoSpanner\|crescTextCresc\|crescHairpin\|cresc\|createSpacing\|cr\|context\|consists\|compressFullBarRests\|coda\|cm\|clefPosition\|clefOctavation\|clefGlyph\|clef\|circulus\|chords\|chordmodifiers\|chordmode\|chordRootNamer\|chordPrefixSpacer\|chordNoteNamer\|chordNameSeparator\|chordNameFunction\|chordNameExceptionsPartial\|chordNameExceptionsFull\|chordNameExceptions\|change\|center\|cavum\|caesura\|cadenzaOn\|cadenzaOff\|breve\|breathe\|break\|bracketOpenSymbol\|bracketCloseSymbol\|bookpart\|book\|blackTriangleMarkup\|bigger\|bendAfter\|bassStaffProperties\|bassFigureStaffAlignmentUp\|bassFigureStaffAlignmentNeutral\|bassFigureStaffAlignmentDown\|bassFigureExtendersOn\|bassFigureExtendersOff\|barNumberVisibility\|barNumberCheck\|barCheckSynchronize\|barAlways\|bar\|balloonText\|balloonLengthOn\|balloonLengthOff\|balloonGrobText\|automaticBars\|autochange\|autoCautionaries\|autoBeaming\|autoBeamSettings\|autoBeamOn\|autoBeamOff\|autoBeamCheck\|autoAccidentals\|augmentum\|auctum\|assertBeamSlope\|assertBeamQuant\|ascendens\|arpeggioParenthesis\|arpeggioNormal\|arpeggioBracket\|arpeggioArrowUp\|arpeggioArrowDown\|arpeggio\|appoggiatura\|applyOutput\|applyMusic\|applyContext\|alternative\|allowPageTurn\|alias\|aikenHeads\|afterGraceFraction\|afterGrace\|aeolian\|addlyrics\|addQuote\|addInstrumentDefinition\|acciaccatura\|accepts\|accentus\|accent\|aDueText\|RemoveEmptyStaffContext\|RemoveEmptyRhythmicStaffContext\|IJ\|IIJ\|C\|B\|AncientRemoveEmptyStaffContext\|A\|n\)\(\A\|\n\)"me=e-1 +syn match lilyReservedWord "\(\A\|\n\)\(strings\|Volta_engraver\|Voice\|Vertically_spaced_contexts_engraver\|Vertical_align_engraver\|Vaticana_ligature_engraver\|VaticanaVoice\|VaticanaStaff\|Tweak_engraver\|Tuplet_engraver\|Trill_spanner_engraver\|Timing_translator\|Time_signature_performer\|Time_signature_engraver\|Tie_performer\|Tie_engraver\|Text_spanner_engraver\|Text_engraver\|Tempo_performer\|Tab_staff_symbol_engraver\|Tab_note_heads_engraver\|Tab_harmonic_engraver\|TabVoice\|TabStaff\|System_start_delimiter_engraver\|Swallow_performer\|Swallow_engraver\|String_number_engraver\|Stem_engraver\|Stanza_number_engraver\|Stanza_number_align_engraver\|Staff_symbol_engraver\|Staff_performer\|Staff_collecting_engraver\|StaffGroup\|Staff\|Spanner_break_forbid_engraver\|Span_bar_engraver\|Span_arpeggio_engraver\|Spacing_engraver\|Slur_performer\|Slur_engraver\|Slash_repeat_engraver\|Skip_event_swallow_translator\|Separating_line_group_engraver\|Script_row_engraver\|Script_engraver\|Script_column_engraver\|Score\|Rhythmic_column_engraver\|RhythmicStaff\|Rest_swallow_translator\|Rest_engraver\|Rest_collision_engraver\|Repeat_tie_engraver\|Repeat_acknowledge_engraver\|Pitched_trill_engraver\|Pitch_squash_engraver\|Piano_pedal_performer\|Piano_pedal_engraver\|Piano_pedal_align_engraver\|PianoStaff\|Phrasing_slur_engraver\|Percent_repeat_engraver\|Part_combine_engraver\|Parenthesis_engraver\|Paper_column_engraver\|Output_property_engraver\|Ottava_spanner_engraver\|Note_swallow_translator\|Note_spacing_engraver\|Note_performer\|Note_name_engraver\|Note_heads_engraver\|Note_head_line_engraver\|NoteNames\|New_fingering_engraver\|New_dynamic_engraver\|Multi_measure_rest_engraver\|Metronome_mark_engraver\|Mensural_ligature_engraver\|MensuralVoice\|MensuralStaff\|Mark_engraver\|Lyrics\|Lyric_performer\|Lyric_engraver\|Ligature_bracket_engraver\|Ledger_line_engraver\|Laissez_vibrer_engraver\|Key_performer\|Key_engraver\|Instrument_switch_engraver\|Instrument_name_engraver\|Hyphen_engraver\|Hara_kiri_engraver\|Grob_pq_engraver\|GregorianTranscriptionVoice\|GregorianTranscriptionStaff\|GrandStaff\|Grace_spacing_engraver\|Grace_engraver\|Grace_beam_engraver\|Global\|Glissando_engraver\|Fretboard_engraver\|FretBoards\|Forbid_line_break_engraver\|Font_size_engraver\|Fingering_engraver\|Figured_bass_position_engraver\|Figured_bass_engraver\|FiguredBass\|Extender_engraver\|Dynamic_performer\|Dynamic_align_engraver\|Drum_notes_engraver\|Drum_note_performer\|DrumVoice\|DrumStaff\|Dots_engraver\|Dot_column_engraver\|Devnull\|Default_bar_line_engraver\|Custos_engraver\|CueVoice\|Control_track_performer\|Collision_engraver\|Cluster_spanner_engraver\|Clef_engraver\|Chord_tremolo_engraver\|Chord_name_engraver\|ChordNames\|ChordNameVoice\|ChoirStaff\|Breathing_sign_engraver\|Break_align_engraver\|Bend_engraver\|Beam_performer\|Beam_engraver\|Bar_number_engraver\|Bar_engraver\|Axis_group_engraver\|Auto_beam_engraver\|Arpeggio_engraver\|Accidental_engraver\|Score\)\(\A\|\n\)"ms=s+1,me=e-1 +syn match lilyNote "\<\(\(\(vibraslap\|twoup\|twodown\|tt\|triangle\|threeup\|threedown\|tambourine\|splashcymbal\|solstqt\|solss\|solsqt\|solsd\|solsb\|sols\|solkk\|solk\|soldsd\|soldd\|sold\|solbtqt\|solbsb\|solbqt\|solbb\|solb\|sol\|snare\|sistqt\|siss\|sisqt\|sisd\|sisb\|sis\|sikk\|sik\|sidsd\|sidestick\|sidd\|sid\|sibtqt\|sibsb\|sibqt\|sibb\|sib\|si\|shortwhistle\|shortguiro\|ridecymbalb\|ridecymbala\|ridecymbal\|ridebell\|restqt\|ress\|resqt\|resd\|resb\|res\|rekk\|rek\|redsd\|redd\|red\|rebtqt\|rebsb\|rebqt\|rebb\|reb\|re\|pedalhihat\|opentriangle\|openloconga\|openlobongo\|openhihat\|openhiconga\|openhibongo\|opencuica\|oneup\|onedown\|mutetriangle\|muteloconga\|mutelobongo\|mutehiconga\|mutehibongo\|mutecuica\|mistqt\|miss\|misqt\|misd\|misb\|mis\|mikk\|mik\|midsd\|midd\|mid\|mibtqt\|mibsb\|mibqt\|mibb\|mib\|mi\|maracas\|lowtom\|lowoodblock\|lowmidtom\|lowfloortom\|lotimbale\|losidestick\|longwhistle\|longguiro\|loconga\|lobongo\|loagogo\|lastqt\|lass\|lasqt\|lasd\|lasb\|las\|lakk\|lak\|ladsd\|ladd\|lad\|labtqt\|labsb\|labqt\|labb\|lab\|la\|hiwoodblock\|hitimbale\|hississ\|hiss\|hisis\|hisih\|hisidestick\|his\|himidtom\|hihat\|hih\|hightom\|highfloortom\|hiconga\|hibongo\|hiagogo\|hessess\|heses\|heseh\|handclap\|halfopenhihat\|h\|gx\|guiro\|gtqs\|gtqf\|gss\|gsharpsharp\|gsharp\|gs\|gqs\|gqf\|gississ\|giss\|gisis\|gisih\|gis\|gih\|gflatflat\|gflat\|gff\|gf\|gessess\|gess\|geses\|geseh\|ges\|geh\|g\|fx\|ftqs\|ftqf\|fss\|fsharpsharp\|fsharp\|fs\|fqs\|fqf\|fourup\|fourdown\|fiveup\|fivedown\|fississ\|fiss\|fisis\|fisih\|fis\|fih\|fflatflat\|fflat\|fff\|ff\|fessess\|fess\|feses\|feseh\|fes\|feh\|fastqt\|fass\|fasqt\|fasd\|fasb\|fas\|fakk\|fak\|fadsd\|fadd\|fad\|fabtqt\|fabsb\|fabqt\|fabb\|fab\|fa\|f\|ex\|etqs\|etqf\|essess\|ess\|esharpsharp\|esharp\|eses\|eseh\|es\|eqs\|eqf\|electricsnare\|eississ\|eiss\|eisis\|eisih\|eis\|eih\|eflatflat\|eflat\|eff\|ef\|eessess\|eess\|eeses\|eeseh\|ees\|eeh\|e\|dx\|dtqs\|dtqf\|dss\|dsharpsharp\|dsharp\|ds\|dqs\|dqf\|dostqt\|doss\|dosqt\|dosd\|dosb\|dos\|dokk\|dok\|dodsd\|dodd\|dod\|dobtqt\|dobsb\|dobqt\|dobb\|dob\|do\|dississ\|diss\|disis\|disih\|dis\|dih\|dflatflat\|dflat\|dff\|df\|dessess\|dess\|deses\|deseh\|des\|deh\|d\|cx\|ctqs\|ctqf\|css\|csharpsharp\|csharp\|cs\|crashcymbalb\|crashcymbala\|crashcymbal\|cqs\|cqf\|cowbell\|closedhihat\|claves\|cississ\|ciss\|cisis\|cisih\|cis\|cih\|chinesecymbal\|cflatflat\|cflat\|cff\|cf\|cessess\|cess\|ceses\|ceseh\|ces\|ceh\|cabasa\|c\|bx\|btqs\|btqf\|bss\|bsharpsharp\|bsharp\|bs\|bqs\|bqf\|bisis\|bisih\|bis\|bih\|bflatflat\|bflat\|bff\|bf\|bess\|beses\|beseh\|bes\|beh\|bb\|bassdrum\|b\|ax\|atqs\|atqf\|assess\|ass\|asharpsharp\|asharp\|ases\|aseh\|asas\|asah\|as\|aqs\|aqf\|aississ\|aiss\|aisis\|aisih\|ais\|aih\|aflatflat\|aflat\|aff\|af\|aessess\|aess\|aeses\|aeseh\|aes\|aeh\|acousticsnare\|a\|a\)\([,']\)\{,4}\([?!]\)\?\)\|s\|r\)\(\(128\|64\|32\|16\|8\|4\|2\|1\|\\breve\|\\longa\|\\maxima\)[.]\{,8}\)\?\(\A\|\n\)"me=e-1 diff --git a/dot_vim/syntax/lilypond.vim b/dot_vim/syntax/lilypond.vim new file mode 100644 index 0000000..7d0a6d8 --- /dev/null +++ b/dot_vim/syntax/lilypond.vim @@ -0,0 +1,83 @@ +" LilyPond syntax file +" Language: LilyPond +" Maintainer: Heikki Junes +" Created: Oct 17, 2002 +" Last Change: Sep 23, 2003 +" Version: 6.1-1 +" +" Installed As: vim/syntax/lilypond.vim +" Uses Generated File: vim/syntax/lilypond-words.vim +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the LilyPond syntax match groups: +" lilyKeyword, lilyReservedWord, lilyNote +if version < 600 + so :p:h/lilypond-words.vim +else + runtime! syntax/lilypond-words.vim + if exists("b:current_syntax") + unlet b:current_syntax + endif +endif + +" Match also parethesis of angle type +setlocal mps+=<:> + +" Case matters +syn case match + +syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilyEquation,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord + +syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold +syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold +syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold + +syn region lilyString start=/"/ end=/"/ skip=/\\"/ +syn region lilyComment start="%{" skip="%$" end="%}" +syn region lilyComment start="%\([^{]\|$\)" end="$" + +syn match lilyNumber "[-_^.]\?\d\+[.]\?" +syn match lilyEquation "\(#['`]\)\?\(\a*[-]\)*\a*\s*=\s*\(#[#'`]\?\)\?\a*" +syn match lilySlur "[(~)]" +syn match lilySlur "\\[()]" +syn match lilySpecial "\\[\\]" +" avoid highlighting the extra character in situations like +" c--\mf c^^\mf c__\mf +syn match lilyArticulation "[-_^][-_^+|>.]" + +" Rest of syntax highlighting rules start here +" +" " Define the default highlighting. +" " 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_lily_syn_inits") + if version < 508 + let did_lily_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink Delimiter Identifier + + HiLink lilyString String + HiLink lilyComment Comment + + HiLink lilyNote Identifier + HiLink lilyArticulation PreProc + HiLink lilyKeyword Keyword + HiLink lilyReservedWord Type + + HiLink lilyNumber Constant + HiLink lilySpecial Special + HiLink lilySlur ModeMsg + + delcommand HiLink +endif diff --git a/dot_vim/syntax/mako.vim b/dot_vim/syntax/mako.vim new file mode 100644 index 0000000..a9244a2 --- /dev/null +++ b/dot_vim/syntax/mako.vim @@ -0,0 +1,83 @@ +" Vim syntax file +" Language: Mako +" Maintainer: Armin Ronacher +" URL: http://lucumr.pocoo.org/ +" Last Change: 2007 April 8 +" Version: 0.6 +" +" Known Limitations +" the <%text> block does not have correct attributes + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = "html" +endif + +"Source the html syntax file +ru! syntax/html.vim +unlet b:current_syntax + +"Put the python syntax file in @pythonTop +syn include @pythonTop syntax/python.vim + +" End keywords +syn keyword makoEnd contained endfor endwhile endif endtry enddef + +" Block rules +syn region makoLine matchgroup=makoDelim start=#%\s*# end=#$# keepend contains=@pythonTop,makoEnd +syn region makoBlock matchgroup=makoDelim start=#<%!\?# end=#%># keepend contains=@pythonTop,makoEnd + +" Variables +syn region makoNested start="{" end="}" transparent display contained contains=makoNested,@pythonTop +syn region makoVariable matchgroup=makoDelim start=#\${# end=#}# contains=makoNested,@pythonTop + +" Comments +syn region makoComment start="##" end="$" +syn region makoDocComment matchgroup=makoDelim start="<%doc>" end="" keepend + +" Literal Blocks +syn region makoText matchgroup=makoDelim start="<%text[^>]*>" end="" + +" Attribute Sublexing +syn match makoAttributeKey containedin=makoTag contained "[a-zA-Z_][a-zA-Z0-9_]*=" +syn region makoAttributeValue containedin=makoTag contained start=/"/ skip=/\\"/ end=/"/ +syn region makoAttributeValue containedin=MakoTag contained start=/'/ skip=/\\'/ end=/'/ + +" Tags +syn region makoTag matchgroup=makoDelim start="<%\(def\|call\|page\|include\|namespace\|inherit\)\>\s*" end="/\?>" +syn match makoDelim "" + +" Newline Escapes +syn match makoEscape /\\$/ + +" Default highlighting links +if version >= 508 || !exists("did_mako_syn_inits") + if version < 508 + let did_mako_syn_inits = 1 + com -nargs=+ HiLink hi link + else + com -nargs=+ HiLink hi def link + endif + + HiLink makoDocComment makoComment + HiLink makoDefEnd makoDelim + + HiLink makoAttributeKey Type + HiLink makoAttributeValue String + HiLink makoText Normal + HiLink makoDelim Preproc + HiLink makoEnd Keyword + HiLink makoComment Comment + HiLink makoEscape Special + + delc HiLink +endif + +let b:current_syntax = "mako" diff --git a/dot_vim/syntax/mediawiki.vim b/dot_vim/syntax/mediawiki.vim new file mode 100644 index 0000000..339993e --- /dev/null +++ b/dot_vim/syntax/mediawiki.vim @@ -0,0 +1,304 @@ +" Taken from http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Vim + +" Wikipedia syntax file for Vim +" Published on Wikipedia in 2003-04 and declared authorless. +" +" Based on the HTML syntax file. Probably too closely based, in fact. There +" may well be name collisions everywhere, but ignorance is bliss, so they say. +" +" To do: plug-in support for downloading and uploading to the server. + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif + let main_syntax = 'html' +endif + +if version < 508 + command! -nargs=+ HtmlHiLink hi link +else + command! -nargs=+ HtmlHiLink hi def link +endif + +syn case ignore +if v:version >= 700 + syn spell toplevel +endif + +" tags +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 +syn region htmlEndTag start=++ contains=htmlTagN + +syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlBadArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster + +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,htmlBadTag,@htmlTagNameCluster +syn match htmlTagN contained +]<"ms=s+1 +" This would highlight all tags and fragments that are not allowed. +"syn match htmlBadTag contained +<\s*[-a-zA-Z0-9]\++ms=s+1 +" Highlight only known disallowed HTML tags, so that not every "" +" fragment is flagged. +syn keyword htmlBadTag contained a acronym address applet area base basefont bdo body button col colgroup dfn dir fieldset form frame frameset head html iframe img input isindex kbd label legend link map menu meta noframes noscript object optgroup option param q script select style tbody textarea tfoot thead title +syn match htmlBadArg contained "\s\+[-a-zA-Z0-9]\+\s*="ms=s+1,me=e-1 + +" allowed HTML tag names +syn keyword htmlTagName contained b big blockquote br caption center cite code dd del div dl dt em font h1 h2 h3 h4 h5 h6 hr i ins li ol p pre rb rp rt ruby s small span strike strong sub sup table td th tr tt u ul var +" allowed Wiki tag names +syn keyword htmlTagName contained nowiki math references + +" allowed arg names +syn keyword htmlArg contained title align lang dir width height nowrap +syn keyword htmlArg contained bgcolor clear noshade +syn keyword htmlArg contained cite datetime size face color +syn keyword htmlArg contained type start value compact +syn keyword htmlArg contained summary border frame rules +syn keyword htmlArg contained cellspacing cellpadding valign char +syn keyword htmlArg contained charoff colgroup col span abbr axis +syn keyword htmlArg contained headers scope rowspan colspan +syn keyword htmlArg contained id class name style + +" special characters +syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" + +" comments +syn region htmlComment start=++ contains=htmlCommentPart,htmlCommentError +syn match htmlCommentError contained "[^>+ + +" HTML formatting +syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlComment,htmlLink + +syn region htmlBold start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic +syn region htmlBold start="" end=""me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic +syn region htmlBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic +syn region htmlBoldItalic contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldItalicUnderline +syn region htmlBoldItalic contained start="" end=""me=e-5 contains=@htmlTop,htmlBoldItalicUnderline +syn region htmlBoldUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlBoldUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop +syn region htmlBoldItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic + +syn region htmlUnderline start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic +syn region htmlUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic +syn region htmlUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic +syn region htmlUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop,htmUnderlineItalicBold +syn region htmlUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop,htmUnderlineItalicBold +syn region htmlUnderlineItalicBold contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlUnderlineItalicBold contained start="" end=""me=e-9 contains=@htmlTop +syn region htmlUnderlineBoldItalic contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlUnderlineBoldItalic contained start="" end=""me=e-5 contains=@htmlTop + +syn region htmlItalic start="" end=""me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline +syn region htmlItalic start="" end=""me=e-5 contains=@htmlTop +syn region htmlItalicBold contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicBoldUnderline +syn region htmlItalicBold contained start="" end=""me=e-9 contains=@htmlTop,htmlItalicBoldUnderline +syn region htmlItalicBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicUnderlineBold +syn region htmlItalicUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop +syn region htmlItalicUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop + +syn region htmlH1 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH2 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH3 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH4 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH5 start="" end=""me=e-5 contains=@htmlTop +syn region htmlH6 start="" end=""me=e-5 contains=@htmlTop +syn region htmlHead start="" end=""me=e-7 end=""me=e-5 end=""me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,cssStyle +syn region htmlTitle start="" end=""me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment + +" No htmlTop and wikiPre inside HTML preformatted areas, because Wikipedia +" renders everything in there literally (HTML tags and entities, too): +"
 tags work as the combination of  and the standard HTML 
+"   tag: the content will preformatted, and it will not be parsed, but shown as
+"   in the wikitext source.
+" With wikiPre, indented lines would be rendered differently from unindented
+" lines.
+syn match htmlPreTag /
/ contains=htmlTag
+syn match wikiNowikiTag // contains=htmlTag
+syn match wikiNowikiEndTag /<\/nowiki>/ contains=htmlEndTag
+" Note: Cannot use 'start="
"rs=e', so still have the 
 tag highlighted
+" correctly via separate syn-match. Unfortunately, this will also highlight
+" 
 tags inside the preformatted region. 
+syn region htmlPre start="
" end="
"me=e-6 contains=htmlPreTag +syn region wikiNowiki start="" end=""me=e-9 contains=wikiNowikiTag + +" wiki formatting +syn region wikiItalic start=+'\@.*" contains=@Spell,wikiLink,wikiItalicBold,wikiNowiki,wikiNowikiEndTag +syn region wikiBold start=+'''+ end=+'''+ skip=".*" contains=@Spell,wikiLink,wikiBoldItalic,wikiNowiki,wikiNowikiEndTag +syn region wikiBoldAndItalic start=+'''''+ end=+'''''+ skip=".*" contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag + +syn region wikiBoldItalic contained start=+'\@.*" contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiItalicBold contained start=+'''+ end=+'''+ skip=".*" contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag + +syn region wikiH1 start="^=" end="=" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiH2 start="^==" end="==" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiH3 start="^===" end="===" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiH4 start="^====" end="====" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiH5 start="^=====" end="=====" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiH6 start="^======" end="======" skip=".*" oneline contains=@Spell,wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[\[" end="\]\]\(s\|'s\|es\|ing\|\)" skip=".*" oneline contains=wikiLink,wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[http:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[https:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[ftp:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[gopher:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[news:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag +syn region wikiLink start="\[mailto:" end="\]" skip=".*" oneline contains=wikiNowiki,wikiNowikiEndTag +syn region wikiTemplate start="{{" end="}}" skip=".*" contains=wikiNowiki,wikiNowikiEndTag + +syn match wikiParaFormatChar /^[\:|\*|;|#]\+/ +syn match wikiParaFormatChar /^-----*/ +syn match wikiPre /^\ .*$/ contains=wikiNowiki,wikiNowikiEndTag + +syn include @TeX syntax/tex.vim +syntax region wikiTeX matchgroup=htmlTag start="" end="" skip=".*" contains=@TeX,wikiNowiki,wikiNowikiEndTag +syntax region wikiRef matchgroup=htmlTag start="" end="" skip=".*" contains=wikiNowiki,wikiNowikiEndTag + + +" HTML highlighting + +HtmlHiLink htmlTag Function +HtmlHiLink htmlEndTag Identifier +HtmlHiLink htmlArg Type +HtmlHiLink htmlTagName htmlStatement +HtmlHiLink htmlSpecialTagName Exception +HtmlHiLink htmlValue String +HtmlHiLink htmlSpecialChar Special + +HtmlHiLink htmlH1 Title +HtmlHiLink htmlH2 htmlH1 +HtmlHiLink htmlH3 htmlH2 +HtmlHiLink htmlH4 htmlH3 +HtmlHiLink htmlH5 htmlH4 +HtmlHiLink htmlH6 htmlH5 +HtmlHiLink htmlHead PreProc +HtmlHiLink htmlTitle Title +HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic +HtmlHiLink htmlUnderlineBold htmlBoldUnderline +HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic +HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic +HtmlHiLink htmlItalicUnderline htmlUnderlineItalic +HtmlHiLink htmlItalicBold htmlBoldItalic +HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic +HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + +HtmlHiLink htmlSpecial Special +HtmlHiLink htmlSpecialChar Special +HtmlHiLink htmlString String +HtmlHiLink htmlStatement Statement +HtmlHiLink htmlComment Comment +HtmlHiLink htmlCommentPart Comment +HtmlHiLink htmlValue String +HtmlHiLink htmlCommentError htmlError +HtmlHiLink htmlTagError htmlError +HtmlHiLink htmlBadTag htmlError +HtmlHiLink htmlBadArg htmlError +HtmlHiLink htmlEvent javaScript +HtmlHiLink htmlError Error + +HtmlHiLink htmlCssStyleComment Comment +HtmlHiLink htmlCssDefinition Special + +" The default highlighting. +if version >= 508 || !exists("did_html_syn_inits") + if version < 508 + let did_html_syn_inits = 1 + endif + HtmlHiLink htmlTag Function + HtmlHiLink htmlEndTag Identifier + HtmlHiLink htmlArg Type + HtmlHiLink htmlTagName htmlStatement + HtmlHiLink htmlSpecialTagName Exception + HtmlHiLink htmlValue String + HtmlHiLink htmlSpecialChar Special + +if !exists("html_no_rendering") + HtmlHiLink htmlH1 Title + HtmlHiLink htmlH2 htmlH1 + HtmlHiLink htmlH3 htmlH2 + HtmlHiLink htmlH4 htmlH3 + HtmlHiLink htmlH5 htmlH4 + HtmlHiLink htmlH6 htmlH5 + HtmlHiLink htmlHead PreProc + HtmlHiLink htmlTitle Title + HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBold htmlBoldUnderline + HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderline htmlUnderlineItalic + HtmlHiLink htmlItalicBold htmlBoldItalic + HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + HtmlHiLink htmlLink Underlined + if !exists("html_my_rendering") + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic + endif +endif + + HtmlHiLink htmlPreStmt PreProc + HtmlHiLink htmlPreError Error + HtmlHiLink htmlPreProc PreProc + HtmlHiLink htmlPreAttr String + HtmlHiLink htmlPreProcAttrName PreProc + HtmlHiLink htmlPreProcAttrError Error + HtmlHiLink htmlSpecial Special + HtmlHiLink htmlSpecialChar Special + HtmlHiLink htmlString String + HtmlHiLink htmlStatement Statement + HtmlHiLink htmlComment Comment + HtmlHiLink htmlCommentPart Comment + HtmlHiLink htmlValue String + HtmlHiLink htmlCommentError htmlError + HtmlHiLink htmlTagError htmlError + HtmlHiLink htmlBadTag htmlError + HtmlHiLink htmlBadArg htmlError + HtmlHiLink htmlEvent javaScript + HtmlHiLink htmlError Error + + HtmlHiLink javaScript Special + HtmlHiLink javaScriptExpression javaScript + HtmlHiLink htmlCssStyleComment Comment + HtmlHiLink htmlCssDefinition Special +endif + +" wiki highlighting + +HtmlHiLink wikiItalic htmlItalic +HtmlHiLink wikiBold htmlBold + +HtmlHiLink wikiBoldItalic htmlBoldItalic +HtmlHiLink wikiItalicBold htmlBoldItalic + +HtmlHiLink wikiBoldAndItalic htmlBoldItalic + +HtmlHiLink wikiH1 htmlH1 +HtmlHiLink wikiH2 htmlH2 +HtmlHiLink wikiH3 htmlH3 +HtmlHiLink wikiH4 htmlH4 +HtmlHiLink wikiH5 htmlH5 +HtmlHiLink wikiH6 htmlH6 +HtmlHiLink wikiLink Underlined +HtmlHiLink wikiTemplate Special +HtmlHiLink wikiParaFormatChar Special +HtmlHiLink wikiPre Constant +HtmlHiLink wikiRef Comment + + +let b:current_syntax = "html" + +delcommand HtmlHiLink + +if main_syntax == 'html' + unlet main_syntax +endif + diff --git a/dot_vim/syntax/mkd.vim b/dot_vim/syntax/mkd.vim new file mode 100644 index 0000000..ee22365 --- /dev/null +++ b/dot_vim/syntax/mkd.vim @@ -0,0 +1,104 @@ +" Vim syntax file +" Language: Markdown +" Maintainer: Ben Williams +" 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 :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 +else + command! -nargs=+ HtmlHiLink hi def link +endif + +syn spell toplevel +syn case ignore +syn sync linebreaks=1 + +"additions to HTML groups +syn region htmlBold start=/\\\@) +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=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell +syn region mkdCode start="]*>" end="
" +syn region mkdCode start="]*>" end="" + +"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 diff --git a/dot_vim/syntax/motd.vim b/dot_vim/syntax/motd.vim new file mode 100644 index 0000000..6a5afb9 --- /dev/null +++ b/dot_vim/syntax/motd.vim @@ -0,0 +1,23 @@ +" Vim syntax file +" Language: MotD Public +" Maintainer: David Bushong + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match motdSig "\(\s\s\+\|\t\)--\?.\+$\|\s--\?\w\+\s*$" +syn match motdThread "^\s\+\\[_-]" +syn match motdDate "^\d\+/\d\+\s" +syn match motdLink "https\?://\S\+" + +hi link motdSig String +hi link motdThread Type +hi link motdDate Number +hi link motdLink Underlined + +let b:current_syntax = "motd" diff --git a/dot_vim/syntax/nvpscript.vim b/dot_vim/syntax/nvpscript.vim new file mode 100644 index 0000000..a19e65d --- /dev/null +++ b/dot_vim/syntax/nvpscript.vim @@ -0,0 +1,72 @@ +" Vim syn file +" Language: NVISION Script +" Maintainer: Barak Michener +" Last Change: 2006 Jun 29 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +"this language is oblivious to case. +syn case ignore + + +" The only keywords +syn keyword nvpKeyword elseif else defsub endif msgbox for if +syn keyword nvpKeyword gosub endsub next print printn sleep +syn keyword nvpKeyword to wend while yesnobox + +syn keyword nvpFunction #flush #sendbreak #halt +" String contstants +syn region nvpString start=+"+ skip=+\\"+ end=+"+ +"integer number, or floating point number without a dot. +syn match nvpNumber "\<\d\+\>" +"floating point number, with dot +syn match nvpNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match nvpNumber "\.\d\+\>" +"hex number +syn match nvpNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +syn match nvpNumber "\<[0-9ABCDEF]{2}\>" + +syn region nvpComment start="!" end="$" +syn match nvpOperator "[+\-*/()%<>=\^]" + +syn match nvpVarPlain "$^[ADEFHILMOPSTWX]\=" +syn match nvpVarPlain "$[\\\"\[\]'&`+*.,;=%~?@$<>(-]" +syn match nvpVarPlain "$\(0\|[1-9]\d*\)" +syn region nvpSend start="<<" end="$" +syn region nvpRecv start="\d*: " end="$" + +" Define the default highlighting. +" 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_basic_syntax_inits") + if version < 508 + let did_basic_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + "My Highlighting + HiLink nvpFunction PreProc + HiLink nvpKeyword Statement + HiLink nvpString String + HiLink nvpNumber Number + HiLink nvpComment Comment + HiLink nvpOperator Operator + HiLink nvpVarPlain Identifier + HiLink nvpSend Include + HiLink nvpRecv SpecialChar + + delcommand HiLink +endif + +let b:current_syntax = "nvpscript" + +"vim: ts=4 diff --git a/dot_vim/syntax/proto.vim b/dot_vim/syntax/proto.vim new file mode 100644 index 0000000..23085a2 --- /dev/null +++ b/dot_vim/syntax/proto.vim @@ -0,0 +1,105 @@ +" Protocol Buffers - Google's data interchange format +" Copyright 2008 Google Inc. All rights reserved. +" https://developers.google.com/protocol-buffers/ +" +" Redistribution and use in source and binary forms, with or without +" modification, are permitted provided that the following conditions are +" met: +" +" * Redistributions of source code must retain the above copyright +" notice, this list of conditions and the following disclaimer. +" * Redistributions in binary form must reproduce the above +" copyright notice, this list of conditions and the following disclaimer +" in the documentation and/or other materials provided with the +" distribution. +" * Neither the name of Google Inc. nor the names of its +" contributors may be used to endorse or promote products derived from +" this software without specific prior written permission. +" +" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +" This is the Vim syntax file for Google Protocol Buffers. +" +" Usage: +" +" 1. cp proto.vim ~/.vim/syntax/ +" 2. Add the following to ~/.vimrc: +" +" augroup filetype +" au! BufRead,BufNewFile *.proto setfiletype proto +" augroup end +" +" Or just create a new file called ~/.vim/ftdetect/proto.vim with the +" previous lines on it. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +syn keyword pbTodo contained TODO FIXME XXX +syn cluster pbCommentGrp contains=pbTodo + +syn keyword pbSyntax syntax import option +syn keyword pbStructure package message group oneof +syn keyword pbRepeat optional required repeated +syn keyword pbDefault default +syn keyword pbExtend extend extensions to max +syn keyword pbRPC service rpc returns + +syn keyword pbType int32 int64 uint32 uint64 sint32 sint64 +syn keyword pbType fixed32 fixed64 sfixed32 sfixed64 +syn keyword pbType float double bool string bytes +syn keyword pbTypedef enum +syn keyword pbBool true false + +syn match pbInt /-\?\<\d\+\>/ +syn match pbInt /\<0[xX]\x+\>/ +syn match pbFloat /\<-\?\d*\(\.\d*\)\?/ +syn region pbComment start="\/\*" end="\*\/" contains=@pbCommentGrp +syn region pbComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp +syn region pbString start=/"/ skip=/\\./ end=/"/ +syn region pbString start=/'/ skip=/\\./ end=/'/ + +if version >= 508 || !exists("did_proto_syn_inits") + if version < 508 + let did_proto_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink pbTodo Todo + + HiLink pbSyntax Include + HiLink pbStructure Structure + HiLink pbRepeat Repeat + HiLink pbDefault Keyword + HiLink pbExtend Keyword + HiLink pbRPC Keyword + HiLink pbType Type + HiLink pbTypedef Typedef + HiLink pbBool Boolean + + HiLink pbInt Number + HiLink pbFloat Float + HiLink pbComment Comment + HiLink pbString String + + delcommand HiLink +endif + +let b:current_syntax = "proto" diff --git a/dot_vim/syntax/scala.vim b/dot_vim/syntax/scala.vim new file mode 100644 index 0000000..b19a04f --- /dev/null +++ b/dot_vim/syntax/scala.vim @@ -0,0 +1,153 @@ +" Vim syntax file +" Language : Scala (http://scala-lang.org/) +" Maintainers: Stefan Matthias Aust, Julien Wetterwald +" Last Change: 2007 June 13 +" Revision : $Id$ +" $URL$ + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match +syn sync minlines=50 + +" most Scala keywords +syn keyword scalaKeyword abstract case catch do else extends final finally for forSome if implicit lazy match new null override private protected requires return sealed super this throw try type while with yield +syn match scalaKeyword "=>" +syn match scalaKeyword "<-" +syn match scalaKeyword "\<_\>" + +syn match scalaOperator ":\{2,\}" "this is not a type + +" package and import statements +syn keyword scalaPackage package nextgroup=scalaFqn skipwhite +syn keyword scalaImport import nextgroup=scalaFqn skipwhite +syn match scalaFqn "\<[._$a-zA-Z0-9,]*" contained nextgroup=scalaFqnSet +syn region scalaFqnSet start="{" end="}" contained + +" boolean literals +syn keyword scalaBoolean true false + +" definitions +syn keyword scalaDef def nextgroup=scalaDefName skipwhite +syn keyword scalaVal val nextgroup=scalaValName skipwhite +syn keyword scalaVar var nextgroup=scalaVarName skipwhite +syn keyword scalaClass class nextgroup=scalaClassName skipwhite +syn keyword scalaObject object nextgroup=scalaClassName skipwhite +syn keyword scalaTrait trait nextgroup=scalaClassName skipwhite +syn match scalaDefName "[^ =:;([]\+" contained nextgroup=scalaDefSpecializer skipwhite +syn match scalaValName "[^ =:;([]\+" contained +syn match scalaVarName "[^ =:;([]\+" contained +syn match scalaClassName "[^ =:;(\[]\+" contained nextgroup=scalaClassSpecializer skipwhite +syn region scalaDefSpecializer start="\[" end="\]" contained contains=scalaDefSpecializer +syn region scalaClassSpecializer start="\[" end="\]" contained contains=scalaClassSpecializer + +" type constructor (actually anything with an uppercase letter) +syn match scalaConstructor "\<[A-Z][_$a-zA-Z0-9]*\>" nextgroup=scalaConstructorSpecializer +syn region scalaConstructorSpecializer start="\[" end="\]" contained contains=scalaConstructorSpecializer + +" method call +syn match scalaRoot "\<[a-zA-Z][_$a-zA-Z0-9]*\."me=e-1 +syn match scalaMethodCall "\.[a-z][_$a-zA-Z0-9]*"ms=s+1 + +" type declarations in val/var/def +syn match scalaType ":\s*\(=>\s*\)\?[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)\?\(\s*\(<:\|>:\|#\|=>\)\s*[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)*\)*"ms=s+1 + +" comments +syn match scalaTodo "[tT][oO][dD][oO]" contained +syn match scalaLineComment "//.*" contains=scalaTodo +syn region scalaComment start="/\*" end="\*/" contains=scalaTodo +syn case ignore +syn include @scalaHtml syntax/html.vim +unlet b:current_syntax +syn case match +syn region scalaDocComment start="/\*\*" end="\*/" contains=scalaDocTags,scalaTodo,@scalaHtml keepend +syn region scalaDocTags start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" contained +syn match scalaDocTags "@[a-z]\+" contained + +syn match scalaEmptyString "\"\"" + +" multi-line string literals +syn region scalaMultiLineString start="\"\"\"" end="\"\"\"" contains=scalaUnicode +syn match scalaUnicode "\\u[0-9a-fA-F]\{4}" contained + +" string literals with escapes +syn region scalaString start="\"[^"]" skip="\\\"" end="\"" contains=scalaStringEscape " TODO end \n or not? +syn match scalaStringEscape "\\u[0-9a-fA-F]\{4}" contained +syn match scalaStringEscape "\\[nrfvb\\\"]" contained + +" symbol and character literals +syn match scalaSymbol "'[_a-zA-Z0-9][_a-zA-Z0-9]*\>" +syn match scalaChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'" + +" number literals +syn match scalaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match scalaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match scalaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match scalaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" xml literals +syn match scalaXmlTag "<[a-zA-Z]\_[^>]*/>" contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString +syn region scalaXmlString start="\"" end="\"" contained +syn match scalaXmlStart "<[a-zA-Z]\_[^>]*>" contained contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString +syn region scalaXml start="<\([a-zA-Z]\_[^>]*\_[^/]\|[a-zA-Z]\)>" matchgroup=scalaXmlStart end="]\+>" contains=scalaXmlEscape,scalaXmlQuote,scalaXml,scalaXmlStart,scalaXmlComment +syn region scalaXmlEscape matchgroup=scalaXmlEscapeSpecial start="{" matchgroup=scalaXmlEscapeSpecial end="}" contained contains=TOP +syn match scalaXmlQuote "&[^;]\+;" contained +syn match scalaXmlComment "" contained + +syn sync fromstart + +" map Scala groups to standard groups +hi link scalaKeyword Keyword +hi link scalaPackage Include +hi link scalaImport Include +hi link scalaBoolean Boolean +hi link scalaOperator Normal +hi link scalaNumber Number +hi link scalaEmptyString String +hi link scalaString String +hi link scalaChar String +hi link scalaMultiLineString String +hi link scalaStringEscape Special +hi link scalaSymbol Special +hi link scalaUnicode Special +hi link scalaComment Comment +hi link scalaLineComment Comment +hi link scalaDocComment Comment +hi link scalaDocTags Special +hi link scalaTodo Todo +hi link scalaType Type +hi link scalaTypeSpecializer scalaType +hi link scalaXml String +hi link scalaXmlTag Include +hi link scalaXmlString String +hi link scalaXmlStart Include +hi link scalaXmlEscape Normal +hi link scalaXmlEscapeSpecial Special +hi link scalaXmlQuote Special +hi link scalaXmlComment Comment +hi link scalaDef Keyword +hi link scalaVar Keyword +hi link scalaVal Keyword +hi link scalaClass Keyword +hi link scalaObject Keyword +hi link scalaTrait Keyword +hi link scalaDefName Function +hi link scalaDefSpecializer Function +hi link scalaClassName Special +hi link scalaClassSpecializer Special +hi link scalaConstructor Special +hi link scalaConstructorSpecializer scalaConstructor + +let b:current_syntax = "scala" + +" you might like to put these lines in your .vimrc +" +" customize colors a little bit (should be a different file) +" hi scalaNew gui=underline +" hi scalaMethodCall gui=italic +" hi scalaValName gui=underline +" hi scalaVarName gui=underline diff --git a/dot_vim/syntax/snippet.vim b/dot_vim/syntax/snippet.vim new file mode 100644 index 0000000..5e919e7 --- /dev/null +++ b/dot_vim/syntax/snippet.vim @@ -0,0 +1,19 @@ +" Syntax highlighting for snippet files (used for snipMate.vim) +" Hopefully this should make snippets a bit nicer to write! +syn match snipComment '^#.*' +syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand +syn match tabStop '\$\d\+' +syn match snipCommand '`.\{-}`' +syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword +syn match multiSnipText '\S\+ \zs.*' contained +syn match snipKeyword '^snippet'me=s+8 contained +syn match snipError "^[^#s\t].*$" + +hi link snipComment Comment +hi link multiSnipText String +hi link snipKeyword Keyword +hi link snipComment Comment +hi link placeHolder Special +hi link tabStop Special +hi link snipCommand String +hi link snipError Error diff --git a/dot_vim/syntax/svkannotate.vim b/dot_vim/syntax/svkannotate.vim new file mode 100644 index 0000000..3c53c3c --- /dev/null +++ b/dot_vim/syntax/svkannotate.vim @@ -0,0 +1,42 @@ +" Vim syntax file +" Language: SVK annotate output +" Maintainer: Bob Hiestand +" Remark: Used by the vcscommand plugin. +" License: +" Copyright (c) 2007 Bob Hiestand +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. + +if exists("b:current_syntax") + finish +endif + +syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained +syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite +syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite +syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline + +if !exists("did_svkannotate_syntax_inits") + let did_svkannotate_syntax_inits = 1 + hi link svkName Type + hi link svkDate Comment + hi link svkVer Statement +endif + +let b:current_syntax="svkAnnotate" diff --git a/dot_vim/syntax/svnannotate.vim b/dot_vim/syntax/svnannotate.vim new file mode 100644 index 0000000..d46f771 --- /dev/null +++ b/dot_vim/syntax/svnannotate.vim @@ -0,0 +1,40 @@ +" Vim syntax file +" Language: SVN annotate output +" Maintainer: Bob Hiestand +" Remark: Used by the vcscommand plugin. +" License: +" Copyright (c) 2007 Bob Hiestand +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. + +if exists("b:current_syntax") + finish +endif + +syn match svnName /\S\+/ contained +syn match svnVer /^\s\+\zs\d\+/ contained nextgroup=svnName skipwhite +syn match svnHead /^\s\+\d\+\s\+\S\+/ contains=svnVer,svnName + +if !exists("did_svnannotate_syntax_inits") + let did_svnannotate_syntax_inits = 1 + hi link svnName Type + hi link svnVer Statement +endif + +let b:current_syntax="svnAnnotate" diff --git a/dot_vim/syntax/vcscommit.vim b/dot_vim/syntax/vcscommit.vim new file mode 100644 index 0000000..0cd4c5e --- /dev/null +++ b/dot_vim/syntax/vcscommit.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: VCS commit file +" Maintainer: Bob Hiestand (bob.hiestand@gmail.com) +" License: +" Copyright (c) 2007 Bob Hiestand +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. + +if exists("b:current_syntax") + finish +endif + +syntax region vcsComment start="^VCS: " end="$" +highlight link vcsComment Comment +let b:current_syntax = "vcscommit" diff --git a/dot_vim/syntax_checkers/go/golintc.vim b/dot_vim/syntax_checkers/go/golintc.vim new file mode 100644 index 0000000..58e6102 --- /dev/null +++ b/dot_vim/syntax_checkers/go/golintc.vim @@ -0,0 +1,42 @@ +"============================================================================ +"File: golintc.vim +"Description: Check go syntax using 'golintc' +"Maintainer: Hiroshi Ioka +"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. +" +"============================================================================ + +if exists("g:loaded_syntastic_go_golintc_checker") + finish +endif +let g:loaded_syntastic_go_golintc_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_go_golintc_GetLocList() dict + let makeprg = self.makeprgBuild({}) + + let errorformat = + \ '%f:%l:%c: %m,' . + \ '%-G%.%#' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'defaults': {'type': 'w'}, + \ 'subtype': 'Style' }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'golintc'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set sw=4 sts=4 et fdm=marker: diff --git a/dot_vim/syntax_checkers/go/gonyet.vim b/dot_vim/syntax_checkers/go/gonyet.vim new file mode 100644 index 0000000..3c703c5 --- /dev/null +++ b/dot_vim/syntax_checkers/go/gonyet.vim @@ -0,0 +1,49 @@ +"============================================================================ +"File: gonyet.vim +"Description: Perform static analysis of Go code with the go-nyet tool +"Maintainer: Barak Michener +"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. +" +"============================================================================ + +if exists("g:loaded_syntastic_go_gonyet_checker") + finish +endif +let g:loaded_syntastic_go_gonyet_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_go_gonyet_IsAvailable() dict + return executable('go-nyet') +endfunction + +function! SyntaxCheckers_go_gonyet_GetLocList() dict + let makeprg = 'go-nyet ' . expand('%:p') + let errorformat = '%f:%l:%c:%m' + + " The go compiler needs to either be run with an import path as an + " argument or directly from the package directory. Since figuring out + " the proper import path is fickle, just cwd to the package. + + let errors = SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'cwd': expand('%:p:h'), + \ 'defaults': {'type': 'w'} }) + + return errors +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'gonyet'}) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/dot_vim/syntax_checkers/go/govetshadow.vim b/dot_vim/syntax_checkers/go/govetshadow.vim new file mode 100644 index 0000000..24e1249 --- /dev/null +++ b/dot_vim/syntax_checkers/go/govetshadow.vim @@ -0,0 +1,52 @@ +"============================================================================ +"File: govetshadow.vim +"Description: Perform static analysis of Go code with the vet tool +"Maintainer: Kamil Kisiel +"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. +" +"============================================================================ + +if exists("g:loaded_syntastic_go_govetshadow_checker") + finish +endif +let g:loaded_syntastic_go_govetshadow_checker = 1 + +let s:save_cpo = &cpo +set cpo&vim + +function! SyntaxCheckers_go_govetshadow_IsAvailable() dict + return executable(self.getExec()) +endfunction + +function! SyntaxCheckers_go_govetshadow_GetLocList() dict + let makeprg = self.getExec() . ' tool vet -shadow ' . expand('%:p') + + let errorformat = + \ '%Evet: %.%\+: %f:%l:%c: %m,' . + \ '%W%f:%l: %m,' . + \ '%-G%.%#' + + " The go compiler needs to either be run with an import path as an + " argument or directly from the package directory. Since figuring out + " the proper import path is fickle, just cwd to the package. + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'cwd': expand('%:p:h', 1), + \ 'defaults': {'type': 'w'} }) +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'go', + \ 'name': 'govetshadow', + \ 'exec': 'go' }) + +let &cpo = s:save_cpo +unlet s:save_cpo + +" diff --git a/dot_vim/tabbar.vim b/dot_vim/tabbar.vim new file mode 100644 index 0000000..b914734 --- /dev/null +++ b/dot_vim/tabbar.vim @@ -0,0 +1,1646 @@ +" Copyright: Copyright (C) 2005 Marius Groleo +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" tabbar.vim is provided *AS IS* and comes with no warranty of +" any kind, either expressed or implied. In no event will the +" copyright holder be liable for any damamges resulting from the +" use of this software. +" +" Derived from Bindu Wavell miniBufExplorer.vim version 6.3.2 + + +" Version: 0.7 +" Maintainer: Marius Groleo < groleo@gmail.com > +" Description: TabBar buffer explorer Vim Plugin +" Name Of File: tabbar.vim + +" DOCUMENTATION: is at line :1445 + +" press zR , in normal mode to OPEN all folds +" press zM , in normal mode to CLOSE all folds + +" Already been loaded? ~~ +if exists('Tb_loaded') + finish +else + let Tb_loaded= 1 +endif "%% + + +" Debug Level ~~ +" 0 = no logging +" 1-5 = errors ; 1 is the most important +" 5-9 = info ; 5 is the most important +" 10 = Entry/Exit +if !exists('g:Tb_DBG_LVL') + let g:Tb_DBG_LVL = 0 +endif" %% + + +" Logging method ~~ +" 0 = log to a window +" 1 = log with vim's echo facility +" 2 = log to a file named TabBar.DBG +" in the directory where vim was started +" THIS IS VERY SLOW +" 3 = log into g:Tb_DbgOutput +" global variable [This is the default] +if !exists('g:Tb_DebugMode') + let g:Tb_DebugMode = 0 +endif" %% + + +" Mappings and Commands +" TabBar Keyboard Mappings ~~ +if ! hasmapto('1') || !hasmapto('') + "gui bindings containing META key, are different from terminal bindings + if has('gui_running') + "NORMAL mode bindings for gvim + noremap