├── .gitignore ├── README.md ├── after ├── objc_enhanced.vim ├── plugin │ └── snipMate.vim └── syntax │ ├── cocoa_keywords.vim │ ├── css.vim │ ├── haml.vim │ ├── html.vim │ └── objc_enhanced.vim ├── autoload ├── acp.vim ├── checksyntax.vim ├── conque_term.vim ├── conque_term │ ├── conque.py │ ├── conque_globals.py │ ├── conque_screen.py │ ├── conque_sole.py │ ├── conque_sole_communicator.py │ ├── conque_sole_shared_memory.py │ ├── conque_sole_subprocess.py │ ├── conque_sole_wrapper.py │ ├── conque_subprocess.py │ └── conque_win32_util.py ├── fuf.vim ├── fuf │ ├── bookmark.vim │ ├── buffer.vim │ ├── callbackfile.vim │ ├── callbackitem.vim │ ├── changelist.vim │ ├── dir.vim │ ├── file.vim │ ├── givencmd.vim │ ├── givendir.vim │ ├── givenfile.vim │ ├── help.vim │ ├── jumplist.vim │ ├── line.vim │ ├── mrucmd.vim │ ├── mrufile.vim │ ├── quickfix.vim │ ├── tag.vim │ └── taggedfile.vim ├── genutils.vim ├── go │ └── complete.vim ├── htmlcomplete.vim ├── lookupfile.vim ├── mark.vim ├── objc │ ├── cocoacomplete.vim │ ├── man.vim │ ├── method_builder.vim │ ├── method_list.vim │ └── pum_snippet.vim ├── pathogen.vim ├── rails.vim ├── snipMate.vim ├── vst │ ├── default.css │ ├── lightblue.css │ ├── myhtmlvst.vim │ ├── s5ui │ │ ├── blank.gif │ │ ├── framing.css │ │ ├── iepngfix.htc │ │ ├── opera.css │ │ ├── outline.css │ │ ├── pretty.css │ │ ├── print.css │ │ ├── s5-core.css │ │ ├── slides.css │ │ └── slides.js │ └── vst.vim └── zencoding.vim ├── colors ├── ir_black.vim ├── molokai.vim ├── solarized.vim ├── vivi.vim ├── wombat.vim └── yytextmate.vim ├── compiler ├── coffee.vim └── pylint.vim ├── dict ├── dicts.txt ├── php_functions.txt └── words ├── doc ├── Align.txt ├── HTML.txt ├── IndentAnything.txt ├── NERD_commenter.txt ├── NERD_tree.txt ├── acp.jax ├── acp.txt ├── arabic.cnx ├── autocmd.cnx ├── bufexplorer.txt ├── change.cnx ├── checksyntax.txt ├── cmdline.cnx ├── cocoa.txt ├── coffee-script.txt ├── command-t.txt ├── conque_term.txt ├── csscomb.txt ├── csupport.txt ├── debug.cnx ├── debugger.cnx ├── develop.cnx ├── diff.cnx ├── digraph.cnx ├── editing.cnx ├── eval.cnx ├── farsi.cnx ├── filetype.cnx ├── fold.cnx ├── ft_ada.cnx ├── ft_sql.cnx ├── fuf.jax ├── fuf.txt ├── gui.cnx ├── gui_w16.cnx ├── gui_w32.cnx ├── gui_x11.cnx ├── hangulin.cnx ├── hebrew.cnx ├── help.cnx ├── helphelp.cnx ├── howto.cnx ├── if_cscop.cnx ├── if_lua.cnx ├── if_mzsch.cnx ├── if_ole.cnx ├── if_perl.cnx ├── if_pyth.cnx ├── if_ruby.cnx ├── if_sniff.cnx ├── if_tcl.cnx ├── indent.cnx ├── index.cnx ├── insert.cnx ├── intro.cnx ├── lookupfile.txt ├── map.cnx ├── mark.txt ├── matchit.txt ├── mbyte.cnx ├── message.cnx ├── mlang.cnx ├── motion.cnx ├── netbeans.cnx ├── options.cnx ├── os_390.cnx ├── os_amiga.cnx ├── os_beos.cnx ├── os_dos.cnx ├── os_mac.cnx ├── os_mint.cnx ├── os_msdos.cnx ├── os_os2.cnx ├── os_qnx.cnx ├── os_risc.cnx ├── os_unix.cnx ├── os_vms.cnx ├── os_win32.cnx ├── pattern.cnx ├── php_manual.txt ├── pi_getscript.cnx ├── pi_gzip.cnx ├── pi_netrw.cnx ├── pi_netrw.txt ├── pi_paren.cnx ├── pi_spec.cnx ├── pi_tar.cnx ├── pi_vimball.cnx ├── pi_zip.cnx ├── print.cnx ├── project.txt ├── quickfix.cnx ├── quickref.cnx ├── quotes.cnx ├── rails.txt ├── recover.cnx ├── remote.cnx ├── repeat.cnx ├── rileft.cnx ├── russian.cnx ├── scroll.cnx ├── sign.cnx ├── snipMate.txt ├── snippets_emu.txt ├── spell.cnx ├── sponsor.cnx ├── starting.cnx ├── supertab.txt ├── syntax.cnx ├── tabpage.cnx ├── tagbar.txt ├── taglist.txt ├── tagsrch.cnx ├── term.cnx ├── textile.txt ├── tips.cnx ├── todo.cnx ├── uganda.cnx ├── undo.cnx ├── usr_01.cnx ├── usr_02.cnx ├── usr_03.cnx ├── usr_04.cnx ├── usr_05.cnx ├── usr_06.cnx ├── usr_07.cnx ├── usr_08.cnx ├── usr_09.cnx ├── usr_10.cnx ├── usr_11.cnx ├── usr_12.cnx ├── usr_20.cnx ├── usr_21.cnx ├── usr_22.cnx ├── usr_23.cnx ├── usr_24.cnx ├── usr_25.cnx ├── usr_26.cnx ├── usr_27.cnx ├── usr_28.cnx ├── usr_29.cnx ├── usr_30.cnx ├── usr_31.cnx ├── usr_32.cnx ├── usr_40.cnx ├── usr_41.cnx ├── usr_42.cnx ├── usr_43.cnx ├── usr_44.cnx ├── usr_45.cnx ├── usr_90.cnx ├── usr_toc.cnx ├── various.cnx ├── vcscommand.txt ├── version4.cnx ├── version5.cnx ├── version6.cnx ├── version7.cnx ├── vi_diff.cnx ├── visual.cnx ├── vst.txt ├── windows.cnx ├── workshop.cnx └── zencoding.txt ├── extra ├── font │ ├── Consolas.ttf │ └── Inconsolata.otf ├── jslint │ ├── jsl │ ├── jsl-sample.bat │ ├── jsl-test.js │ ├── jsl.conf │ └── jsl.exe ├── python │ └── pep8.py └── session.vim ├── ftdetect ├── coffee.vim ├── eco.vim ├── gofiletype.vim ├── jade.vim ├── less.vim └── swift.vim ├── ftplugin ├── autotags.vim ├── coffee.vim ├── django.vim ├── go │ ├── fmt.vim │ ├── godoc.vim │ └── import.vim ├── html │ └── HTML.vim ├── html_snip_helper.vim ├── jade.vim ├── less.vim ├── objc_cocoa_mappings.vim ├── python │ ├── README.rst │ ├── pyflakes.vim │ └── pyflakes │ │ ├── LICENSE │ │ ├── NEWS.txt │ │ ├── README.rst │ │ ├── TODO │ │ ├── bin │ │ └── pyflakes │ │ ├── pyflakes │ │ ├── __init__.py │ │ ├── ast.py │ │ ├── checker.py │ │ ├── messages.py │ │ ├── scripts │ │ │ ├── __init__.py │ │ │ └── pyflakes.py │ │ └── test │ │ │ ├── __init__.py │ │ │ ├── harness.py │ │ │ ├── test_imports.py │ │ │ ├── test_other.py │ │ │ ├── test_script.py │ │ │ └── test_undefined_names.py │ │ └── setup.py └── textile.vim ├── gvimrc ├── indent ├── IndentAnything_html.vim ├── coffee.vim ├── go.vim ├── jade.vim ├── javascript.vim ├── less.vim ├── php.vim ├── python.vim └── swift.vim ├── lib ├── cocoa_indexes │ ├── classes.txt │ ├── cocoa_indexes │ │ ├── classes.txt │ │ ├── constants.txt │ │ ├── functions.txt │ │ ├── methods.txt.gz │ │ ├── notifications.txt │ │ └── types.txt │ ├── constants.txt │ ├── functions.txt │ ├── methods.txt.gz │ ├── notifications.txt │ └── types.txt ├── extras │ ├── README-if-you-like │ ├── README_if_you_like │ ├── build_syntaxfile.py │ ├── cocoa_classes.py │ ├── cocoa_definitions.py │ ├── cocoa_indexes │ │ ├── classes.txt │ │ ├── constants.txt │ │ ├── functions.txt │ │ ├── methods.txt.gz │ │ ├── notifications.txt │ │ └── types.txt │ ├── cocoa_methods.py │ ├── superclasses │ └── superclasses.m └── get_methods.sh ├── plugin ├── Alipay.uisvr.vim ├── DoxygenToolkit.vim ├── IndentAnything.vim ├── NERD_commenter.vim ├── NERD_tree.vim ├── QuickTemplate.vim ├── TransferChinese.vim ├── a.vim ├── acp.vim ├── autotag.vim ├── bufexplorer.vim ├── calendar.vim ├── checksyntax.vim ├── closetag.vim ├── cocoa.vim ├── colorizer.vim ├── conque_term.vim ├── csscomb.vim ├── exec.php ├── fencview.vim ├── fuf.vim ├── genutils.vim ├── gjslint.vim ├── godoc.vim ├── javaScriptLint.vim ├── jsbeautify.vim ├── lib │ └── csscomb.php ├── lookupfile.vim ├── matchit.vim ├── matrix.vim ├── mru.vim ├── pep8.vim ├── powertab.vim ├── project.vim ├── rails.vim ├── snipMate.vim ├── tagbar.vim ├── taglist.vim ├── tags ├── textile.vim ├── uisvr.vim ├── vcsbzr.vim ├── vcscommand.vim ├── vcscvs.vim ├── vcsgit.vim ├── vcshg.vim ├── vcssvk.vim ├── vcssvn.vim ├── vimcdoc.vim ├── vimim.vim ├── vstplugin.vim └── zencoding.vim ├── snippets ├── _.snippets ├── autoit.snippets ├── c.snippets ├── cpp.snippets ├── css.snippets ├── django.snippets ├── django_template.snippets ├── erlang.snippets ├── html.snippets ├── java.snippets ├── javascript.snippets ├── mako.snippets ├── objc.snippets ├── perl.snippets ├── php.snippets ├── python.snippets ├── ruby.snippets ├── sh.snippets ├── snippet.snippets ├── tcl.snippets ├── tex.snippets ├── vim.snippets └── zsh.snippets ├── syntax ├── actionscript.vim ├── autoit.vim ├── coffee.vim ├── conque_term.vim ├── cvsannotate.vim ├── django.vim ├── eco.vim ├── eruby.vim ├── gitannotate.vim ├── go.vim ├── godoc.vim ├── help_cn.vim ├── hgannotate.vim ├── html.vim ├── jade.vim ├── javascript.vim ├── jquery.vim ├── json.vim ├── less.vim ├── log.vim ├── nginx.vim ├── python.vim ├── ruby.vim ├── snippet.vim ├── svkannotate.vim ├── svnannotate.vim ├── swift.vim ├── tagbar.vim ├── textile.vim ├── txt.vim ├── vcscommit.vim └── velocity.vim ├── template ├── css.tpl ├── html.tpl ├── javascript.tpl ├── php.tpl ├── text.tpl └── xhtml.tpl ├── vimrc └── vimrc_mini /.gitignore: -------------------------------------------------------------------------------- 1 | # Misc 2 | *~ 3 | *.[oa] 4 | *.pyc 5 | *.svn 6 | *.bak 7 | .*.swp 8 | .Trash/ 9 | _site/ 10 | 11 | # Node 12 | node_modules/ 13 | nohup.out 14 | 15 | # Created by http://www.gitignore.io/api/xcode,objective-c 16 | 17 | ### Xcode ### 18 | build 19 | *.xcodeproj/* 20 | !*.xcodeproj/project.pbxproj 21 | !*.xcworkspace/contents.xcworkspacedata 22 | 23 | 24 | ### Objective-C ### 25 | # OS X 26 | .DS_Store 27 | 28 | # Xcode 29 | build/ 30 | *.pbxuser 31 | !default.pbxuser 32 | *.mode1v3 33 | !default.mode1v3 34 | *.mode2v3 35 | !default.mode2v3 36 | *.perspectivev3 37 | !default.perspectivev3 38 | xcuserdata 39 | *.xccheckout 40 | profile 41 | *.moved-aside 42 | DerivedData 43 | *.hmap 44 | *.ipa 45 | 46 | # CocoaPods 47 | Pods 48 | 49 | 50 | # Vim 51 | doc/tags 52 | tags-* 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Usage 2 | ``` 3 | git clone git@github.com:vingel/vim.git 4 | ln -s vim ~/.vim 5 | ln -s ~/.vim/vimrc ~/.vimrc 6 | ln -s ~/.vim/gvimrc ~/.gvimrc 7 | ``` 8 | 9 | Owner: Vingel 10 | -------------------------------------------------------------------------------- /after/objc_enhanced.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Sanders (msanders42 [at] gmail [dot] com) 2 | " Description: Better syntax highlighting for Objective-C files (part of the 3 | " cocoa.vim plugin). 4 | " Last Updated: June 23, 2009 5 | 6 | " NOTE: This next file (cocoa_keywords.vim) is rather large and may slow 7 | " things down. Loading it seems to take less than 0.5 microseconds 8 | " on my machine, but I'm not sure of the consequences; if it is slow 9 | " for you, just comment out the next line. 10 | ru after/syntax/cocoa_keywords.vim 11 | 12 | syn match objcDirective '@synthesize\|@property' display 13 | syn keyword objcType IBOutlet IBAction Method 14 | syn keyword objcConstant YES NO TRUE FALSE 15 | 16 | syn region objcImp start='@implementation' end='@end' transparent 17 | syn region objcHeader start='@interface' end='@end' transparent 18 | 19 | " I make this typo sometimes so it's nice to have it highlighted. 20 | syn match objcError '\v(NSLogv=\(\s*)@<=[^@]=["'].*'me=e-1 21 | 22 | syn match objcSubclass '\(@implementation\|@interface\)\@<=\s*\k\+' display contained containedin=objcImp,objcHeader 23 | syn match objcSuperclass '\(@\(implementation\|interface\)\s*\k\+\s*:\)\@<=\s*\k*' display contained containedin=objcImp,objcHeader 24 | 25 | " Matches "- (void) foo: (int) bar and: (float) foobar" 26 | syn match objcMethod '^\s*[-+]\s*\_.\{-}[\{;]'me=e-1 transparent contains=cParen,objcInstMethod,objcFactMethod 27 | " Matches "bar & foobar" in above 28 | syn match objcMethodArg ')\@<=\s*\k\+' contained containedin=objcMethod 29 | " Matches "foo:" & "and:" in above 30 | syn match objcMethodName '\(^\s*[-+]\s*(\_[^)]*)\)\@<=\_\s*\_\k\+' contained containedin=objcMethod 31 | syn match objcMethodColon '\k\+\s*:' contained containedin=objcMethod 32 | " Don't match these groups in cParen "(...)" 33 | syn cluster cParenGroup add=objcMethodName,objcMethodArg,objcMethodColon 34 | " This fixes a bug with completion inside parens (e.g. if ([NSString ])) 35 | syn cluster cParenGroup remove=objcMessage 36 | 37 | " Matches "bar" in "[NSObject bar]" or "bar" in "[[NSObject foo: baz] bar]", 38 | " but NOT "bar" in "[NSObject foo: bar]". 39 | syn match objcMessageName '\(\[\s*\k\+\s\+\|\]\s*\)\@<=\k*\s*\]'me=e-1 display contained containedin=objcMessage 40 | " Matches "foo:" in "[NSObject foo: bar]" or "[[NSObject new] foo: bar]" 41 | syn match objcMessageColon '\(\_\S\+\_\s\+\)\@<=\k\+\s*:' display contained containedin=objcMessage 42 | 43 | " Don't match these in this strange group for edge cases... 44 | syn cluster cMultiGroup add=objcMessageColon,objcMessageName,objcMethodName,objcMethodArg,objcMethodColon 45 | 46 | " You may want to customize this one. I couldn't find a default group to suit 47 | " it, but you can modify your colorscheme to make this a different color. 48 | hi link objcMethodName Special 49 | hi link objcMethodColon objcMethodName 50 | 51 | hi link objcMethodArg Identifier 52 | 53 | hi link objcMessageName objcMethodArg 54 | hi link objcMessageColon objcMessageName 55 | 56 | hi link objcSubclass objcMethodName 57 | hi link objcSuperclass String 58 | 59 | hi link objcError Error 60 | -------------------------------------------------------------------------------- /after/plugin/snipMate.vim: -------------------------------------------------------------------------------- 1 | " These are the mappings for snipMate.vim. Putting it here ensures that it 2 | " will be mapped after other plugins such as supertab.vim. 3 | if !exists('loaded_snips') || exists('s:did_snips_mappings') 4 | finish 5 | endif 6 | let s:did_snips_mappings = 1 7 | 8 | ino =TriggerSnippet() 9 | snor i=TriggerSnippet() 10 | ino =BackwardsSnippet() 11 | snor i=BackwardsSnippet() 12 | ino =ShowAvailableSnips() 13 | 14 | " The default mappings for these are annoying & sometimes break snipMate. 15 | " You can change them back if you want, I've put them here for convenience. 16 | snor b 17 | snor a 18 | snor bi 19 | snor ' b' 20 | snor ` b` 21 | snor % b% 22 | snor U bU 23 | snor ^ b^ 24 | snor \ b\ 25 | snor b 26 | 27 | " By default load snippets in snippets_dir 28 | if empty(snippets_dir) 29 | finish 30 | endif 31 | 32 | call GetSnippets(snippets_dir, '_') " Get global snippets 33 | 34 | au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif 35 | " vim:noet:sw=4:ts=4:ft=vim 36 | -------------------------------------------------------------------------------- /after/syntax/haml.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Sven Felix Oberquelle 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | " Inherit coffee from html so coffeeComment isn't redefined and given higher 7 | " priority than hamlInterpolation. 8 | syn cluster hamlCoffeescript contains=@htmlCoffeeScript 9 | syn region hamlCoffeescriptFilter matchgroup=hamlFilter start="^\z(\s*\):coffeescript\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlCoffeeScript,hamlInterpolation keepend 10 | -------------------------------------------------------------------------------- /after/syntax/html.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | " Syntax highlighting for text/coffeescript script tags 7 | syn include @htmlCoffeeScript syntax/coffee.vim 8 | syn region coffeeScript start=++me=s-1 keepend 10 | \ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc 11 | \ containedin=htmlHead 12 | -------------------------------------------------------------------------------- /after/syntax/objc_enhanced.vim: -------------------------------------------------------------------------------- 1 | " Author: Michael Sanders (msanders42 [at] gmail [dot] com) 2 | " Description: Better syntax highlighting for Objective-C files (part of the 3 | " cocoa.vim plugin). 4 | " Last Updated: June 23, 2009 5 | 6 | " NOTE: This next file (cocoa_keywords.vim) is rather large and may slow 7 | " things down. Loading it seems to take less than 0.5 microseconds 8 | " on my machine, but I'm not sure of the consequences; if it is slow 9 | " for you, just comment out the next line. 10 | ru after/syntax/cocoa_keywords.vim 11 | 12 | syn match objcDirective '@synthesize\|@property\|@optional\|@required' display 13 | syn keyword objcType IBOutlet IBAction Method 14 | syn keyword objcConstant YES NO TRUE FALSE 15 | 16 | syn region objcImp start='@implementation' end='@end' transparent 17 | syn region objcHeader start='@interface' end='@end' transparent 18 | 19 | " I make this typo sometimes so it's nice to have it highlighted. 20 | syn match objcError '\v(NSLogv=\(\s*)@<=[^@]=["'].*'me=e-1 21 | 22 | syn match objcSubclass '\(@implementation\|@interface\)\@<=\s*\k\+' display contained containedin=objcImp,objcHeader 23 | syn match objcSuperclass '\(@\(implementation\|interface\)\s*\k\+\s*:\)\@<=\s*\k*' display contained containedin=objcImp,objcHeader 24 | 25 | " Matches "- (void) foo: (int) bar and: (float) foobar" 26 | syn match objcMethod '^\s*[-+]\s*\_.\{-}[\{;]'me=e-1 transparent contains=cParen,objcInstMethod,objcFactMethod 27 | " Matches "bar & foobar" in above 28 | syn match objcMethodArg ')\@<=\s*\k\+' contained containedin=objcMethod 29 | " Matches "foo:" & "and:" in above 30 | syn match objcMethodName '\(^\s*[-+]\s*(\_[^)]*)\)\@<=\_\s*\_\k\+' contained containedin=objcMethod 31 | syn match objcMethodColon '\k\+\s*:' contained containedin=objcMethod 32 | " Don't match these groups in cParen "(...)" 33 | syn cluster cParenGroup add=objcMethodName,objcMethodArg,objcMethodColon 34 | " This fixes a bug with completion inside parens (e.g. if ([NSString ])) 35 | syn cluster cParenGroup remove=objcMessage 36 | 37 | " Matches "bar" in "[NSObject bar]" or "bar" in "[[NSObject foo: baz] bar]", 38 | " but NOT "bar" in "[NSObject foo: bar]". 39 | syn match objcMessageName '\(\[\s*\k\+\s\+\|\]\s*\)\@<=\k*\s*\]'me=e-1 display contained containedin=objcMessage 40 | " Matches "foo:" in "[NSObject foo: bar]" or "[[NSObject new] foo: bar]" 41 | syn match objcMessageColon '\(\_\S\+\_\s\+\)\@<=\k\+\s*:' display contained containedin=objcMessage 42 | 43 | " Don't match these in this strange group for edge cases... 44 | syn cluster cMultiGroup add=objcMessageColon,objcMessageName,objcMethodName,objcMethodArg,objcMethodColon 45 | 46 | " You may want to customize this one. I couldn't find a default group to suit 47 | " it, but you can modify your colorscheme to make this a different color. 48 | hi link objcMethodName Special 49 | hi link objcMethodColon objcMethodName 50 | 51 | hi link objcMethodArg Identifier 52 | 53 | hi link objcMessageName objcMethodArg 54 | hi link objcMessageColon objcMessageName 55 | 56 | hi link objcSubclass objcMethodName 57 | hi link objcSuperclass String 58 | 59 | hi link objcError Error 60 | -------------------------------------------------------------------------------- /autoload/fuf/givencmd.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " Copyright (c) 2007-2009 Takeshi NISHIDA 3 | " 4 | "============================================================================= 5 | " LOAD GUARD {{{1 6 | 7 | if exists('g:loaded_autoload_fuf_givencmd') || v:version < 702 8 | finish 9 | endif 10 | let g:loaded_autoload_fuf_givencmd = 1 11 | 12 | " }}}1 13 | "============================================================================= 14 | " GLOBAL FUNCTIONS {{{1 15 | 16 | " 17 | function fuf#givencmd#createHandler(base) 18 | return a:base.concretize(copy(s:handler)) 19 | endfunction 20 | 21 | " 22 | function fuf#givencmd#getSwitchOrder() 23 | return -1 24 | endfunction 25 | 26 | " 27 | function fuf#givencmd#renewCache() 28 | endfunction 29 | 30 | " 31 | function fuf#givencmd#requiresOnCommandPre() 32 | return 0 33 | endfunction 34 | 35 | " 36 | function fuf#givencmd#onInit() 37 | endfunction 38 | 39 | " 40 | function fuf#givencmd#launch(initialPattern, partialMatching, prompt, items) 41 | let s:prompt = (empty(a:prompt) ? '>' : a:prompt) 42 | let s:items = copy(a:items) 43 | call map(s:items, 'fuf#makeNonPathItem(v:val, "")') 44 | call fuf#mapToSetSerialIndex(s:items, 1) 45 | call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') 46 | call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) 47 | endfunction 48 | 49 | " }}}1 50 | "============================================================================= 51 | " LOCAL FUNCTIONS/VARIABLES {{{1 52 | 53 | let s:MODE_NAME = expand(':t:r') 54 | 55 | " }}}1 56 | "============================================================================= 57 | " s:handler {{{1 58 | 59 | let s:handler = {} 60 | 61 | " 62 | function s:handler.getModeName() 63 | return s:MODE_NAME 64 | endfunction 65 | 66 | " 67 | function s:handler.getPrompt() 68 | return fuf#formatPrompt(s:prompt, self.partialMatching) 69 | endfunction 70 | 71 | " 72 | function s:handler.getPreviewHeight() 73 | return 0 74 | endfunction 75 | 76 | " 77 | function s:handler.targetsPath() 78 | return 0 79 | endfunction 80 | 81 | " 82 | function s:handler.makePatternSet(patternBase) 83 | return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', 84 | \ self.partialMatching) 85 | endfunction 86 | 87 | " 88 | function s:handler.makePreviewLines(word, count) 89 | return [] 90 | endfunction 91 | 92 | " 93 | function s:handler.getCompleteItems(patternPrimary) 94 | return s:items 95 | endfunction 96 | 97 | " 98 | function s:handler.onOpen(word, mode) 99 | if a:word[0] =~# '[:/?]' 100 | call histadd(a:word[0], a:word[1:]) 101 | endif 102 | call feedkeys(a:word . "\", 'n') 103 | endfunction 104 | 105 | " 106 | function s:handler.onModeEnterPre() 107 | endfunction 108 | 109 | " 110 | function s:handler.onModeEnterPost() 111 | endfunction 112 | 113 | " 114 | function s:handler.onModeLeavePost(opened) 115 | endfunction 116 | 117 | " }}}1 118 | "============================================================================= 119 | " vim: set fdm=marker: 120 | -------------------------------------------------------------------------------- /autoload/fuf/givendir.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " Copyright (c) 2007-2009 Takeshi NISHIDA 3 | " 4 | "============================================================================= 5 | " LOAD GUARD {{{1 6 | 7 | if exists('g:loaded_autoload_fuf_givendir') || v:version < 702 8 | finish 9 | endif 10 | let g:loaded_autoload_fuf_givendir = 1 11 | 12 | " }}}1 13 | "============================================================================= 14 | " GLOBAL FUNCTIONS {{{1 15 | 16 | " 17 | function fuf#givendir#createHandler(base) 18 | return a:base.concretize(copy(s:handler)) 19 | endfunction 20 | 21 | " 22 | function fuf#givendir#getSwitchOrder() 23 | return -1 24 | endfunction 25 | 26 | " 27 | function fuf#givendir#renewCache() 28 | endfunction 29 | 30 | " 31 | function fuf#givendir#requiresOnCommandPre() 32 | return 0 33 | endfunction 34 | 35 | " 36 | function fuf#givendir#onInit() 37 | endfunction 38 | 39 | " 40 | function fuf#givendir#launch(initialPattern, partialMatching, prompt, items) 41 | let s:prompt = (empty(a:prompt) ? '>' : a:prompt) 42 | let s:items = map(copy(a:items), 'substitute(v:val, ''[/\\]\?$'', "", "")') 43 | let s:items = map(s:items, 'fuf#makePathItem(v:val, "", 0)') 44 | call fuf#mapToSetSerialIndex(s:items, 1) 45 | call fuf#mapToSetAbbrWithSnippedWordAsPath(s:items) 46 | call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) 47 | endfunction 48 | 49 | " }}}1 50 | "============================================================================= 51 | " LOCAL FUNCTIONS/VARIABLES {{{1 52 | 53 | let s:MODE_NAME = expand(':t:r') 54 | 55 | " }}}1 56 | "============================================================================= 57 | " s:handler {{{1 58 | 59 | let s:handler = {} 60 | 61 | " 62 | function s:handler.getModeName() 63 | return s:MODE_NAME 64 | endfunction 65 | 66 | " 67 | function s:handler.getPrompt() 68 | return fuf#formatPrompt(s:prompt, self.partialMatching) 69 | endfunction 70 | 71 | " 72 | function s:handler.getPreviewHeight() 73 | return g:fuf_previewHeight 74 | endfunction 75 | 76 | " 77 | function s:handler.targetsPath() 78 | return 1 79 | endfunction 80 | 81 | " 82 | function s:handler.makePatternSet(patternBase) 83 | return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', 84 | \ self.partialMatching) 85 | endfunction 86 | 87 | " 88 | function s:handler.makePreviewLines(word, count) 89 | return fuf#makePreviewLinesAround( 90 | \ split(glob(fnamemodify(a:word, ':p') . '*'), "\n"), 91 | \ [], a:count, self.getPreviewHeight()) 92 | return 93 | endfunction 94 | 95 | " 96 | function s:handler.getCompleteItems(patternPrimary) 97 | return s:items 98 | endfunction 99 | 100 | " 101 | function s:handler.onOpen(word, mode) 102 | execute ':cd ' . fnameescape(a:word) 103 | endfunction 104 | 105 | " 106 | function s:handler.onModeEnterPre() 107 | endfunction 108 | 109 | " 110 | function s:handler.onModeEnterPost() 111 | endfunction 112 | 113 | " 114 | function s:handler.onModeLeavePost(opened) 115 | endfunction 116 | 117 | " }}}1 118 | "============================================================================= 119 | " vim: set fdm=marker: 120 | -------------------------------------------------------------------------------- /autoload/fuf/givenfile.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " Copyright (c) 2007-2009 Takeshi NISHIDA 3 | " 4 | "============================================================================= 5 | " LOAD GUARD {{{1 6 | 7 | if exists('g:loaded_autoload_fuf_givenfile') || v:version < 702 8 | finish 9 | endif 10 | let g:loaded_autoload_fuf_givenfile = 1 11 | 12 | " }}}1 13 | "============================================================================= 14 | " GLOBAL FUNCTIONS {{{1 15 | 16 | " 17 | function fuf#givenfile#createHandler(base) 18 | return a:base.concretize(copy(s:handler)) 19 | endfunction 20 | 21 | " 22 | function fuf#givenfile#getSwitchOrder() 23 | return -1 24 | endfunction 25 | 26 | " 27 | function fuf#givenfile#renewCache() 28 | endfunction 29 | 30 | " 31 | function fuf#givenfile#requiresOnCommandPre() 32 | return 0 33 | endfunction 34 | 35 | " 36 | function fuf#givenfile#onInit() 37 | endfunction 38 | 39 | " 40 | function fuf#givenfile#launch(initialPattern, partialMatching, prompt, items) 41 | let s:prompt = (empty(a:prompt) ? '>' : a:prompt) 42 | let s:items = map(copy(a:items), 'fuf#makePathItem(v:val, "", 0)') 43 | call fuf#mapToSetSerialIndex(s:items, 1) 44 | call map(s:items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') 45 | call fuf#launch(s:MODE_NAME, a:initialPattern, a:partialMatching) 46 | endfunction 47 | 48 | 49 | " }}}1 50 | "============================================================================= 51 | " LOCAL FUNCTIONS/VARIABLES {{{1 52 | 53 | let s:MODE_NAME = expand(':t:r') 54 | 55 | " }}}1 56 | "============================================================================= 57 | " s:handler {{{1 58 | 59 | let s:handler = {} 60 | 61 | " 62 | function s:handler.getModeName() 63 | return s:MODE_NAME 64 | endfunction 65 | 66 | " 67 | function s:handler.getPrompt() 68 | return fuf#formatPrompt(s:prompt, self.partialMatching) 69 | endfunction 70 | 71 | " 72 | function s:handler.getPreviewHeight() 73 | return g:fuf_previewHeight 74 | endfunction 75 | 76 | " 77 | function s:handler.targetsPath() 78 | return 1 79 | endfunction 80 | 81 | " 82 | function s:handler.makePatternSet(patternBase) 83 | return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForPath', 84 | \ self.partialMatching) 85 | endfunction 86 | 87 | " 88 | function s:handler.makePreviewLines(word, count) 89 | return fuf#makePreviewLinesForFile(a:word, a:count, self.getPreviewHeight()) 90 | endfunction 91 | 92 | " 93 | function s:handler.getCompleteItems(patternPrimary) 94 | return s:items 95 | endfunction 96 | 97 | " 98 | function s:handler.onOpen(word, mode) 99 | call fuf#openFile(a:word, a:mode, g:fuf_reuseWindow) 100 | endfunction 101 | 102 | 103 | " 104 | function s:handler.onModeEnterPre() 105 | endfunction 106 | 107 | " 108 | function s:handler.onModeEnterPost() 109 | endfunction 110 | 111 | " 112 | function s:handler.onModeLeavePost(opened) 113 | endfunction 114 | 115 | " }}}1 116 | "============================================================================= 117 | " vim: set fdm=marker: 118 | -------------------------------------------------------------------------------- /autoload/fuf/mrucmd.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " Copyright (c) 2007-2009 Takeshi NISHIDA 3 | " 4 | "============================================================================= 5 | " LOAD GUARD {{{1 6 | 7 | if exists('g:loaded_autoload_fuf_mrucmd') || v:version < 702 8 | finish 9 | endif 10 | let g:loaded_autoload_fuf_mrucmd = 1 11 | 12 | " }}}1 13 | "============================================================================= 14 | " GLOBAL FUNCTIONS {{{1 15 | 16 | " 17 | function fuf#mrucmd#createHandler(base) 18 | return a:base.concretize(copy(s:handler)) 19 | endfunction 20 | 21 | " 22 | function fuf#mrucmd#getSwitchOrder() 23 | return g:fuf_mrucmd_switchOrder 24 | endfunction 25 | 26 | " 27 | function fuf#mrucmd#renewCache() 28 | endfunction 29 | 30 | " 31 | function fuf#mrucmd#requiresOnCommandPre() 32 | return 1 33 | endfunction 34 | 35 | " 36 | function fuf#mrucmd#onInit() 37 | call fuf#defineLaunchCommand('FufMruCmd', s:MODE_NAME, '""') 38 | endfunction 39 | 40 | " 41 | function fuf#mrucmd#onCommandPre(cmd) 42 | if getcmdtype() =~# '^[:/?]' 43 | call s:updateInfo(a:cmd) 44 | endif 45 | endfunction 46 | 47 | 48 | " }}}1 49 | "============================================================================= 50 | " LOCAL FUNCTIONS/VARIABLES {{{1 51 | 52 | let s:MODE_NAME = expand(':t:r') 53 | 54 | " 55 | function s:updateInfo(cmd) 56 | let info = fuf#loadInfoFile(s:MODE_NAME) 57 | let info.data = fuf#updateMruList( 58 | \ info.data, { 'word' : a:cmd, 'time' : localtime() }, 59 | \ g:fuf_mrucmd_maxItem, g:fuf_mrucmd_exclude) 60 | call fuf#saveInfoFile(s:MODE_NAME, info) 61 | endfunction 62 | 63 | " }}}1 64 | "============================================================================= 65 | " s:handler {{{1 66 | 67 | let s:handler = {} 68 | 69 | " 70 | function s:handler.getModeName() 71 | return s:MODE_NAME 72 | endfunction 73 | 74 | " 75 | function s:handler.getPrompt() 76 | return fuf#formatPrompt(g:fuf_mrucmd_prompt, self.partialMatching) 77 | endfunction 78 | 79 | " 80 | function s:handler.getPreviewHeight() 81 | return 0 82 | endfunction 83 | 84 | " 85 | function s:handler.targetsPath() 86 | return 0 87 | endfunction 88 | 89 | " 90 | function s:handler.makePatternSet(patternBase) 91 | return fuf#makePatternSet(a:patternBase, 's:interpretPrimaryPatternForNonPath', 92 | \ self.partialMatching) 93 | endfunction 94 | 95 | " 96 | function s:handler.makePreviewLines(word, count) 97 | return [] 98 | endfunction 99 | 100 | " 101 | function s:handler.getCompleteItems(patternPrimary) 102 | return self.items 103 | endfunction 104 | 105 | " 106 | function s:handler.onOpen(word, mode) 107 | call s:updateInfo(a:word) 108 | call histadd(a:word[0], a:word[1:]) 109 | call feedkeys(a:word . "\", 'n') 110 | endfunction 111 | 112 | " 113 | function s:handler.onModeEnterPre() 114 | endfunction 115 | 116 | " 117 | function s:handler.onModeEnterPost() 118 | let self.items = copy(self.info.data) 119 | call map(self.items, 'fuf#makeNonPathItem(v:val.word, strftime(g:fuf_timeFormat, v:val.time))') 120 | call fuf#mapToSetSerialIndex(self.items, 1) 121 | call map(self.items, 'fuf#setAbbrWithFormattedWord(v:val, 1)') 122 | endfunction 123 | 124 | " 125 | function s:handler.onModeLeavePost(opened) 126 | endfunction 127 | 128 | " }}}1 129 | "============================================================================= 130 | " vim: set fdm=marker: 131 | -------------------------------------------------------------------------------- /autoload/go/complete.vim: -------------------------------------------------------------------------------- 1 | " Copyright 2011 The Go Authors. All rights reserved. 2 | " Use of this source code is governed by a BSD-style 3 | " license that can be found in the LICENSE file. 4 | " 5 | " This file provides a utility function that performs auto-completion of 6 | " package names, for use by other commands. 7 | 8 | let s:goos = $GOOS 9 | let s:goarch = $GOARCH 10 | 11 | if len(s:goos) == 0 12 | if exists('g:golang_goos') 13 | let s:goos = g:golang_goos 14 | elseif has('win32') || has('win64') 15 | let s:goos = 'windows' 16 | elseif has('macunix') 17 | let s:goos = 'darwin' 18 | else 19 | let s:goos = '*' 20 | endif 21 | endif 22 | 23 | if len(s:goarch) == 0 24 | if exists('g:golang_goarch') 25 | let s:goarch = g:golang_goarch 26 | else 27 | let s:goarch = '*' 28 | endif 29 | endif 30 | 31 | function! go#complete#Package(ArgLead, CmdLine, CursorPos) 32 | let goroot = $GOROOT 33 | if len(goroot) == 0 34 | " should not occur. 35 | return [] 36 | endif 37 | let ret = {} 38 | let root = expand(goroot.'/pkg/'.s:goos.'_'.s:goarch) 39 | for i in split(globpath(root, a:ArgLead.'*'), "\n") 40 | if isdirectory(i) 41 | let i .= '/' 42 | elseif i !~ '\.a$' 43 | continue 44 | endif 45 | let i = substitute(substitute(i[len(root)+1:], '[\\]', '/', 'g'), '\.a$', '', 'g') 46 | let ret[i] = i 47 | endfor 48 | return sort(keys(ret)) 49 | endfunction 50 | -------------------------------------------------------------------------------- /autoload/objc/pum_snippet.vim: -------------------------------------------------------------------------------- 1 | " File: pum_snippet.vim 2 | " Author: Michael Sanders (msanders42 [at] gmail [dot] com) 3 | " Last Updated: June 12, 2009 4 | " Description: Uses snipMate to jump through function or method objc 5 | " parameters when autocompleting. Used in cocoacomplete.vim. 6 | 7 | " This function is invoked whenever pum_snippet is to be used; the keys are 8 | " only mapped when used as the trigger, and then immediately unmapped to avoid 9 | " breaking abbreviations, as well as other things. 10 | fun! objc#pum_snippet#Map() 11 | ino =objc#pum_snippet#Trigger(' ') 12 | if !exists('g:SuperTabMappingForward') " Only map tab if not using supertab. 13 | \ || (g:SuperTabMappingForward != '' && g:SuperTabMappingForward != '') 14 | ino =objc#pum_snippet#Trigger("\t") 15 | endif 16 | ino =objc#pum_snippet#Trigger("\n") 17 | let s:start = col('.') 18 | " Completion menu can only be detected when the popup menu is visible, so 19 | " 'menuone' needs to be temporarily set: 20 | let s:cot = &cot 21 | set cot+=menuone 22 | endf 23 | 24 | fun! objc#pum_snippet#Unmap() 25 | call s:UnmapKey('') 26 | call s:UnmapKey('') 27 | call s:UnmapKey('') 28 | endf 29 | 30 | fun s:UnmapKey(key) 31 | if maparg(a:key, 'i') =~? '^=objc#pum_snippet#Trigger(' 32 | sil exe 'iunmap '.a:key 33 | endif 34 | endf 35 | 36 | fun! objc#pum_snippet#Trigger(key) 37 | call objc#pum_snippet#Unmap() 38 | if pumvisible() 39 | let line = getline('.') 40 | let col = col('.') 41 | let word = matchstr(line, '\%'.s:start.'c\k\+(.\{-})\%'.col.'c') 42 | if word != '' 43 | let ConvertWord = function('s:ConvertFunction') 44 | elseif match(line, '\%'.s:start.'c\k\+[^()]*:[^()]*\%'.col.'c') != -1 45 | let word = matchstr(line, '\%'.s:start.'c\k\+[^()]*\%'.col.'c') 46 | let ConvertWord = function('s:ConvertMethod') 47 | endif 48 | if word != '' 49 | call s:ResetOptions() 50 | let col -= len(word) 51 | sil exe 's/\V'.escape(word, '\/').'\%#//' 52 | return snipMate#expandSnip(ConvertWord(word), col) 53 | endif 54 | endif 55 | call s:ResetOptions() 56 | return a:key 57 | endf 58 | 59 | fun s:ResetOptions() 60 | let &cot = s:cot 61 | unl s:start s:cot 62 | endf 63 | 64 | fun s:ConvertFunction(function) 65 | let name = matchstr(a:function, '^\k\+') 66 | let params = matchstr(a:function, '^\k\+(\zs.*') 67 | let snippet = name.'('.substitute(params, '\v(.{-1})(, |\))', '${0:\1}\2', 'g').'${0}' 68 | return s:OrderSnippet(snippet) 69 | endf 70 | 71 | fun s:ConvertMethod(method) 72 | if stridx(a:method, ':') == -1 | return a:method | endif 73 | let snippet = substitute(a:method, '\v\k+:\zs.{-}\ze(\s*\k+:|$)', '${0:&}', 'g') 74 | return s:OrderSnippet(snippet) 75 | endf 76 | 77 | " Converts "${0} foo ${0} bar ..." to "${1} foo ${2} bar", etc. 78 | fun s:OrderSnippet(snippet) 79 | let snippet = a:snippet 80 | let i = 1 81 | while stridx(snippet, '${0') != -1 82 | let snippet = substitute(snippet, '${0', '${'.i, '') 83 | let i += 1 84 | endw 85 | return snippet 86 | endf 87 | " vim:noet:sw=4:ts=4:ft=vim 88 | -------------------------------------------------------------------------------- /autoload/vst/myhtmlvst.vim: -------------------------------------------------------------------------------- 1 | " Author: Mikolaj Machowski 2 | " Example of macro for g:vst_html_post file 3 | call cursor(1,1) 4 | while search('^\s*{read\w\{-}:.\{-}}\s*$', 'W') 5 | let data = matchlist(getline('.'), '^\s*{read\(\w\{-}\):\(.\{-}\)}\s*$') 6 | silent s/.*//ge 7 | if data[1] == '' 8 | let output = readfile(data[2]) 9 | else 10 | if data[1] == 'bang' 11 | let data[1] = '' 12 | endif 13 | let output = split(system(data[1].' '.data[2]), "\n") 14 | endif 15 | call map(output, "' '.v:val") 16 | let jout = "
\n".join(output, "\n")."\n
" 17 | put =jout 18 | endwhile 19 | -------------------------------------------------------------------------------- /autoload/vst/s5ui/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/autoload/vst/s5ui/blank.gif -------------------------------------------------------------------------------- /autoload/vst/s5ui/framing.css: -------------------------------------------------------------------------------- 1 | /* The following styles size, place, and layer the slide components. 2 | Edit these if you want to change the overall slide layout. 3 | The commented lines can be uncommented (and modified, if necessary) 4 | to help you with the rearrangement process. */ 5 | 6 | /* target = 1024x768 */ 7 | 8 | div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} 9 | div#header {top: 0; height: 3em; z-index: 1;} 10 | div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;} 11 | .slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;} 12 | div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} 13 | div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; 14 | margin: 0;} 15 | #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;} 16 | html>body #currentSlide {position: fixed;} 17 | 18 | /* 19 | div#header {background: #FCC;} 20 | div#footer {background: #CCF;} 21 | div#controls {background: #BBD;} 22 | div#currentSlide {background: #FFC;} 23 | */ 24 | -------------------------------------------------------------------------------- /autoload/vst/s5ui/iepngfix.htc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 42 | -------------------------------------------------------------------------------- /autoload/vst/s5ui/opera.css: -------------------------------------------------------------------------------- 1 | /* DO NOT CHANGE THESE unless you really want to break Opera Show */ 2 | .slide { 3 | visibility: visible !important; 4 | position: static !important; 5 | page-break-before: always; 6 | } 7 | #slide0 {page-break-before: avoid;} 8 | -------------------------------------------------------------------------------- /autoload/vst/s5ui/outline.css: -------------------------------------------------------------------------------- 1 | /* don't change this unless you want the layout stuff to show up in the outline view! */ 2 | 3 | .layout div, #footer *, #controlForm * {display: none;} 4 | #footer, #controls, #controlForm, #navLinks, #toggle { 5 | display: block; visibility: visible; margin: 0; padding: 0;} 6 | #toggle {float: right; padding: 0.5em;} 7 | html>body #toggle {position: fixed; top: 0; right: 0;} 8 | 9 | /* making the outline look pretty-ish */ 10 | 11 | #slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;} 12 | #slide0 h1 {padding-top: 1.5em;} 13 | .slide h1 {margin: 1.5em 0 0; padding-top: 0.25em; 14 | border-top: 1px solid #888; border-bottom: 1px solid #AAA;} 15 | #toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;} 16 | -------------------------------------------------------------------------------- /autoload/vst/s5ui/print.css: -------------------------------------------------------------------------------- 1 | /* The following rule is necessary to have all slides appear in print! DO NOT REMOVE IT! */ .slide, ul {page-break-inside: avoid; visibility: visible !important;} h1 {page-break-after: avoid;} body {font-size: 12pt; background: white;} * {color: black;} #slide0 h1 {font-size: 200%; border: none; margin: 0.5em 0 0.25em;} #slide0 h3 {margin: 0; padding: 0;} #slide0 h4 {margin: 0 0 0.5em; padding: 0;} #slide0 {margin-bottom: 3em;} h1 {border-top: 2pt solid gray; border-bottom: 1px dotted silver;} .extra {background: transparent !important;} div.extra, pre.extra, .example {font-size: 10pt; color: #333;} ul.extra a {font-weight: bold;} p.example {display: none;} #header {display: none;} #footer h1 {margin: 0; border-bottom: 1px solid; color: gray; font-style: italic;} #footer h2, #controls {display: none;} /* The following rule keeps the layout stuff out of print. Remove at your own risk! */ .layout, .layout * {display: none !important;} -------------------------------------------------------------------------------- /autoload/vst/s5ui/s5-core.css: -------------------------------------------------------------------------------- 1 | /* Do not edit or override these styles! The system will likely break if you do. */ 2 | 3 | div#header, div#footer, div#controls, .slide {position: absolute;} 4 | html>body div#header, html>body div#footer, 5 | html>body div#controls, html>body .slide {position: fixed;} 6 | .handout {display: none;} 7 | .layout {display: block;} 8 | .slide, .hideme, .incremental {visibility: hidden;} 9 | #slide0 {visibility: visible;} 10 | -------------------------------------------------------------------------------- /autoload/vst/s5ui/slides.css: -------------------------------------------------------------------------------- 1 | @import url(s5-core.css); /* required to make the slide show run at all */ 2 | @import url(framing.css); /* sets basic placement and size of slide components */ 3 | @import url(pretty.css); /* stuff that makes the slides look better than blah */ -------------------------------------------------------------------------------- /autoload/vst/vst.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/autoload/vst/vst.vim -------------------------------------------------------------------------------- /colors/vivi.vim: -------------------------------------------------------------------------------- 1 | " Vim color scheme 2 | " 3 | " Name: vivi.vim 4 | " Maintainer: Vingel 5 | " Last Change: 2009-06-05 13:36:29 6 | " License: public domain 7 | " Version: 1.0 8 | " 9 | " This scheme should work in the GUI and in xterm's 256 color mode. It 10 | " won't work in 8/16 color terminals. 11 | " 12 | " I based it on John Lam's initial Vibrant Ink port to Vim [1]. Thanks 13 | " to a great tutorial [2], I was able to convert it to xterm 256 color 14 | " mode. And of course, credits go to Justin Palmer for creating the 15 | " original Vibrant Ink TextMate color scheme [3]. 16 | " 17 | " [1] http://www.iunknown.com/articles/2006/09/04/vim-can-save-your-hands-too 18 | " [2] http://frexx.de/xterm-256-notes/ 19 | " [3] http://encytemedia.com/blog/articles/2006/01/03/textmate-vibrant-ink-theme-and-prototype-bundle 20 | " [4] http://www.vim.org/scripts/script.php?script_id=1794 21 | 22 | set background=dark 23 | hi clear 24 | if exists("syntax_on") 25 | syntax reset 26 | endif 27 | 28 | let g:colors_name = "vivi" 29 | 30 | if has("gui_running") 31 | highlight Normal guifg=White guibg=grey20 32 | highlight Cursor guifg=Black guibg=Yellow 33 | highlight Keyword guifg=#FF6600 34 | highlight Define guifg=#FF6600 35 | highlight Comment guifg=#9933CC 36 | highlight Type guifg=White gui=NONE 37 | highlight Identifier guifg=White gui=NONE 38 | highlight Constant guifg=#FFEE98 39 | highlight Function guifg=#FFCC00 gui=NONE 40 | highlight Include guifg=#FFCC00 gui=NONE 41 | highlight Statement guifg=#FF6600 gui=NONE 42 | highlight String guifg=#66FF00 43 | highlight Search guibg=White 44 | highlight CursorLine guibg=#323300 45 | highlight PreProc guifg=#96CBFE 46 | highlight rubyInterpolation guifg=White 47 | highlight rubyPseudoVariable guifg=#339999 48 | highlight rubyStringDelimiter guifg=#66FF00 49 | highlight rubySymbol guifg=#339999 gui=NONE 50 | else 51 | set t_Co=256 52 | highlight Normal ctermfg=White ctermbg=Black 53 | highlight Cursor ctermfg=Black ctermbg=Yellow 54 | highlight Keyword ctermfg=202 55 | highlight Define ctermfg=202 56 | highlight Comment ctermfg=98 57 | highlight Type ctermfg=White 58 | highlight Identifier ctermfg=White 59 | highlight Constant ctermfg=228 60 | highlight Function ctermfg=220 61 | highlight Include ctermfg=220 62 | highlight Statement ctermfg=202 63 | highlight String ctermfg=82 64 | highlight Search ctermbg=White 65 | highlight CursorLine cterm=NONE ctermbg=235 66 | highlight rubyInterpolation ctermfg=White 67 | highlight rubyPseudoVariable ctermfg=66 68 | highlight rubyStringDelimiter ctermfg=82 69 | highlight rubySymbol ctermfg=66 70 | endif 71 | -------------------------------------------------------------------------------- /colors/wombat.vim: -------------------------------------------------------------------------------- 1 | " Maintainer: Lars H. Nielsen (dengmao@gmail.com) 2 | " Last Change: January 22 2007 3 | 4 | set background=dark 5 | 6 | hi clear 7 | 8 | if exists("syntax_on") 9 | syntax reset 10 | endif 11 | 12 | let colors_name = "wombat" 13 | 14 | 15 | " Vim >= 7.0 specific colors 16 | if version >= 700 17 | hi CursorLine guibg=#2d2d2d 18 | hi CursorColumn guibg=#2d2d2d 19 | hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold 20 | hi Pmenu guifg=#f6f3e8 guibg=#444444 21 | hi PmenuSel guifg=#000000 guibg=#cae682 22 | endif 23 | 24 | " General colors 25 | hi Cursor guifg=NONE guibg=#656565 gui=none 26 | hi Normal guifg=#f6f3e8 guibg=#242424 gui=none 27 | hi NonText guifg=#808080 guibg=#303030 gui=none 28 | hi LineNr guifg=#857b6f guibg=#000000 gui=none 29 | hi StatusLine guifg=#f6f3e8 guibg=#444444 gui=italic 30 | hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none 31 | hi VertSplit guifg=#444444 guibg=#444444 gui=none 32 | hi Folded guibg=#384048 guifg=#a0a8b0 gui=none 33 | hi Title guifg=#f6f3e8 guibg=NONE gui=bold 34 | hi Visual guifg=#f6f3e8 guibg=#444444 gui=none 35 | hi SpecialKey guifg=#808080 guibg=#343434 gui=none 36 | 37 | " Syntax highlighting 38 | hi Comment guifg=#99968b gui=italic 39 | hi Todo guifg=#8f8f8f gui=italic 40 | hi Constant guifg=#e5786d gui=none 41 | hi String guifg=#95e454 gui=italic 42 | hi Identifier guifg=#cae682 gui=none 43 | hi Function guifg=#cae682 gui=none 44 | hi Type guifg=#cae682 gui=none 45 | hi Statement guifg=#8ac6f2 gui=none 46 | hi Keyword guifg=#8ac6f2 gui=none 47 | hi PreProc guifg=#e5786d gui=none 48 | hi Number guifg=#e5786d gui=none 49 | hi Special guifg=#e7f6da gui=none 50 | 51 | 52 | -------------------------------------------------------------------------------- /colors/yytextmate.vim: -------------------------------------------------------------------------------- 1 | " Vim color scheme 2 | " Name: yytextmate.vim 3 | " Maintainer: Dexter.Yy 4 | " Link: http://www.limboy.com 5 | " (originally looked at Ralph Amissah ) 6 | 7 | :set background=dark 8 | :highlight clear 9 | if version > 580 10 | hi clear 11 | if exists("syntax_on") 12 | syntax reset 13 | endif 14 | endif 15 | if has("gui_running") 16 | :hi Normal guifg=#F8F8F8 guibg=#090B18 17 | :hi Cursor guifg=Black guibg=Yellow 18 | 19 | :hi LineNr guifg=#333333 20 | ":hi LineNr guibg=#323232 guifg=#888888 21 | :hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none 22 | :hi Folded guibg=black guifg=grey40 23 | :hi FoldColumn guibg=black guifg=grey20 24 | :hi IncSearch guibg=black guifg=yellow 25 | :hi ModeMsg guifg=goldenrod 26 | :hi MoreMsg guifg=SeaGreen 27 | :hi NonText guifg=RoyalBlue guibg=#151825 28 | :hi Question guifg=springgreen 29 | :hi Search guibg=#0099ff guifg=White 30 | :hi Visual gui=none guifg=khaki guibg=olivedrab 31 | 32 | :hi SpecialKey guifg=#cbfe29 33 | :hi Title guifg=#ff9900 gui=bold 34 | :hi Statement guifg=#ff6600 35 | :hi htmlStatement guifg=#60a3f6 36 | :hi String guifg=#61ce38 37 | :hi Comment guifg=grey35 38 | :hi CommentDoc guifg=grey50 39 | :hi Conditional guifg=#ffee14 40 | :hi Constant guifg=#cbfe29 41 | :hi Special guifg=#86A7D0 42 | :hi Identifier guifg=#ff9900 gui=bold 43 | :hi Include guifg=red 44 | :hi PreProc guifg=grey 45 | :hi Operator gui=bold guifg=#ff9900 46 | :hi Define guifg=#ffde00 gui=bold 47 | :hi Type guifg=#60a3f6 48 | :hi Function guifg=#ffde00 gui=NONE 49 | :hi Structure gui=bold guifg=#ff6600 50 | 51 | :hi Ignore guifg=grey40 52 | :hi StatusLineNC guibg=#c2bfa5 guifg=grey40 gui=none 53 | :hi StatusLine guibg=#c2bfa5 guifg=black gui=none 54 | :hi Todo guifg=orangered guibg=yellow2 55 | :hi WarningMsg guifg=salmon 56 | :hi ErrorMsg guifg=White guibg=Red 57 | :hi Error guifg=White guibg=Red 58 | :hi SpellErrors guifg=White guibg=Red 59 | end 60 | -------------------------------------------------------------------------------- /compiler/coffee.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | if exists('current_compiler') 7 | finish 8 | endif 9 | 10 | let current_compiler = 'coffee' 11 | " Pattern to check if coffee is the compiler 12 | let s:pat = '^' . current_compiler 13 | 14 | " Extra options passed to CoffeeMake 15 | if !exists("coffee_make_options") 16 | let coffee_make_options = "" 17 | endif 18 | 19 | " Get a `makeprg` for the current filename. This is needed to support filenames 20 | " with spaces and quotes, but also not break generic `make`. 21 | function! s:GetMakePrg() 22 | return 'coffee -c ' . g:coffee_make_options . ' $* ' . fnameescape(expand('%')) 23 | endfunction 24 | 25 | " Set `makeprg` and return 1 if coffee is still the compiler, else return 0. 26 | function! s:SetMakePrg() 27 | if &l:makeprg =~ s:pat 28 | let &l:makeprg = s:GetMakePrg() 29 | elseif &g:makeprg =~ s:pat 30 | let &g:makeprg = s:GetMakePrg() 31 | else 32 | return 0 33 | endif 34 | 35 | return 1 36 | endfunction 37 | 38 | " Set a dummy compiler so we can check whether to set locally or globally. 39 | CompilerSet makeprg=coffee 40 | call s:SetMakePrg() 41 | 42 | CompilerSet errorformat=Error:\ In\ %f\\,\ %m\ on\ line\ %l, 43 | \Error:\ In\ %f\\,\ Parse\ error\ on\ line\ %l:\ %m, 44 | \SyntaxError:\ In\ %f\\,\ %m, 45 | \%-G%.%# 46 | 47 | " Compile the current file. 48 | command! -bang -bar -nargs=* CoffeeMake make 49 | 50 | " Set `makeprg` on rename since we embed the filename in the setting. 51 | augroup CoffeeUpdateMakePrg 52 | autocmd! 53 | 54 | " Update `makeprg` if coffee is still the compiler, else stop running this 55 | " function. 56 | function! s:UpdateMakePrg() 57 | if !s:SetMakePrg() 58 | autocmd! CoffeeUpdateMakePrg 59 | endif 60 | endfunction 61 | 62 | " Set autocmd locally if compiler was set locally. 63 | if &l:makeprg =~ s:pat 64 | autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() 65 | else 66 | autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() 67 | endif 68 | augroup END 69 | -------------------------------------------------------------------------------- /dict/words: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/dict/words -------------------------------------------------------------------------------- /doc/bufexplorer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/doc/bufexplorer.txt -------------------------------------------------------------------------------- /doc/csscomb.txt: -------------------------------------------------------------------------------- 1 | *csscomb.txt* CSScomb for Vim 2 | 3 | Vim plugin author: Aleksandr Batsuev 4 | CSScomb author: Vyacheslav Oliyancuk 5 | WebSite: http://csscomb.com 6 | Repository: http://github.com/miripiruni/CSScomb-for-Vim 7 | 8 | ============================================================================== 9 | CONTENTS *csscomb-contents* 10 | 11 | About |csscomb-about| 12 | Custom sort order |csscomb-custom-sort-order| 13 | Install |csscomb-install| 14 | Usage |csscomb-usage| 15 | 16 | ============================================================================== 17 | ABOUT *csscomb-about* 18 | 19 | The algorithm of CSScomb simulates web-technologist's actions upon working 20 | with CSS-code to the limit. Usually to re-order code you move lines over each 21 | other considering comments in the code, multilines records of property values, 22 | hacks and everything that could be found in the real file. CSScomb reproduces 23 | these actions for you. This means that the parser "thinks" as a person editing 24 | the text, not as a blind robot parsing CSS. 25 | 26 | For more info, online demo and tests see http://csscomb.com 27 | 28 | What can CSScomb do? 29 | 30 | * Sorts CSS-properties within the selectors according to the settings. 31 | 32 | * Treats the initial formatting of style sheets carefully. 33 | 34 | * Sorts commented properties as if they are not commented. 35 | 36 | * Moves down unknown properties in the order they are met within the selector. 37 | E.g.: he\ight: 100% and similar will be taken as the unknown ones. 38 | 39 | * Successfully parses @media ... {...} and any other constructions with @. 40 | 41 | * Successfully parses expressions and then moves them to the end of the 42 | properties in the order they are met within the framework of properties of 43 | one selector. 44 | 45 | ============================================================================== 46 | CUSTOM SORT ORDER *csscomb-custom-sort-order* 47 | 48 | For adjusting plugins use one-dimensional and two-dimensional JSON arrays. 49 | In case of two-dimensional arrays the properties will be divided into groups 50 | with an empty line. In plugins you should pick open file csscomb.php 51 | 52 | ============================================================================== 53 | INSTALL *csscomb-install* 54 | 55 | With Pathogen 56 | cd ~/.vim/bundle 57 | git clone https://github.com/miripiruni/csscomb-for-vim.git 58 | 59 | With Vundle 60 | Add to .vimrc: Bundle 'git://github.com/miripiruni/csscomb-for-vim.git' 61 | 62 | Manual without plugins manager 63 | git clone https://github.com/miripiruni/csscomb-for-vim.git 64 | cp csscomb-vim/plugin/* ~/.vim/plugin/ 65 | 66 | ============================================================================== 67 | USAGE *csscomb-usage* 68 | 69 | For CSS resort you can use ':CSScomb' command. 70 | Also you can select a part of CSS file and type ':CSScomb'. 71 | -------------------------------------------------------------------------------- /doc/debugger.cnx: -------------------------------------------------------------------------------- 1 | *debugger.txt* For Vim version 7.3. 最近更新: 2006年7月 2 | 3 | 4 | Vim 参考手册 作者:Gordon Prieur 5 | 译者: iCrazy http://vimcdoc.sf.net 6 | 7 | 8 | 支持调试器的特性 *debugger-support* 9 | 10 | 1. 调试器的特性 |debugger-features| 11 | 2. Vim 编译选项 |debugger-compilation| 12 | 3. 整合的调试器 |debugger-integration| 13 | 14 | {Vi 没有以上的功能} 15 | 16 | ============================================================================== 17 | 1. 调试器的特性 *debugger-features* 18 | 19 | 以下的功能可以和调试器、集成编程环境 (IPE) 或集成开发环境 (IDE) 集成使用: 20 | 21 | 替代命令输入 |alt-input| 22 | 调试标号 |debug-signs| 23 | 调试源代码高亮 |debug-highlight| 24 | 信息页脚 |gui-footer| 25 | 气泡表达式求值 |balloon-eval| 26 | 27 | 这些特性主要是针对图形界面的 gvim 而新增的。然而,|alt-input| 和 28 | |debug-highlight| 是同时针对 vim 和 gvim 进行开发的。一些其他的功能略做修改, 29 | 即可在非 GUI 的 vim 上使用。但是,我没有这样做,我也没有测试过针对非图形 GUI 30 | 界面编译出的 vim 的可靠性。 31 | 32 | 33 | 1.1 替代命令输入 *alt-input* 34 | 35 | 要使 Vim 和一个调试器一起工作,至少必须有一种和调试器进行输入连接的方式,或者 36 | 有一个外部工具。尽管很多情况下,也同时会有一个输出连接,但这并不是必要的。 37 | 38 | 输入连接的目的是让外部调试器把命令传送给 Vim。调试器送来的命令必须足以使它自己 39 | 显示当前的调试环境和状态。 40 | 41 | 目前的实现是基于 X 工具包中的 dispatch 循环和对 XtAddInput() 函数的调用的。 42 | 43 | 44 | 1.2 调试标号 *debug-signs* 45 | 46 | 很多调试器用在一些行前面加一个小记号或使这些行颜色高亮的方式来给它们做标记。命 47 | 令 |:sign| 可以使得调试器设定这种图形标号。这项特性有什么作用呢?举例来说,它 48 | 可以用来使调试器显示一个箭头,从而指示正在被调试的程序的程序计数器 (PC)。另一 49 | 个用处是在有断点的行后面显示一个小的停止标号。这些可见的标号可以使用户得知一些 50 | 调试器的状态信息。 51 | 52 | 这些特性不仅仅可以和调试器一起使用。它们可以使一个 IPE 高亮显示编译错误、查找 53 | 到的文本等等。标号功能还可以和 |debug-highlight| 一起工作,从而保证标号可以被 54 | 显眼的显示出来。 55 | 56 | 调试标号可以用命令 |:sign| 来定义和设置。 57 | 58 | 59 | 1.3 调试源代码高亮 *debug-highlight* 60 | 61 | 这项特性可以使得您把一行文字突出地高亮。这种高亮是用来使某一行突出显示的。高亮 62 | 功能在 vim 和 gvim 中都可以工作,而调试标号一般仅在 gvim 下工作。Sun 63 | Microsystem 的 dtterm 是一个例外,它有一个 "sign gutter" 可以用来显示标号。 64 | 65 | 66 | 1.4 信息页脚 *gui-footer* 67 | 68 | 信息页脚可以用来显示调试器或 IPE 中传来的信息。它还可以用来显示菜单和工具栏提 69 | 示。页脚区域位于 GUI 窗口的底部,在用来显示冒号 (:) 命令的那一行的下方。 70 | 71 | 页脚的显示是用 'guioptions' 中的字母 'F' 来控制的。 72 | 73 | 74 | 1.5 气泡表达式求值 *balloon-eval* 75 | 76 | 这项特性可以使一个调试器或其他的外部工具根据鼠标所指的位置显示动态的信息。它的 77 | 目的在于使 Sun 的 Visual WorkShop 调试器能够显示表达式表达式求值。实际上,这个 78 | 特性是用通用的方式实现的,所以它还可以用来显示其他的信息。 79 | 80 | 气泡表达式求值还有一些可以设置的参数。对于 Motif,字体列表和颜色可以通过 X 81 | 资源 (XmNballoonEvalFontList, XmNballoonEvalBackground, 和 82 | XmNballoonEvalForeground) 来设定。 83 | 84 | 选项 'balloondelay' 用来设定显示气泡之前的延迟时间。 85 | 选项 'ballooneval' 必须打开。 86 | 87 | 气泡表达式求值仅当用 |+balloon_eval| 特性编译时有效。 88 | 89 | 气泡表达式求值功能还被用来为工具栏显示提示。对于这个用途,无须设置选项 90 | 'ballooneval',但是其他选项的值将被应用。 91 | 92 | 另一种使用气泡表达式的方法是使用 'balloonexpr' 选项。完全由用户定义。 93 | 94 | ============================================================================== 95 | 2. Vim 编译选项 *debugger-compilation* 96 | 97 | 调试器特性是为了和 Sun 的 Visual WorkShop 集成编程环境 (ipe) 一起使用而开发 98 | 的。事实上,它们使用了一种通用的方式,所以其他的调试器也可以使用一部分,甚至是 99 | 所有的那些原本被 Sun 的 ipe 所使用的工具。 100 | 101 | 以下的编译时的预处理程序变量控制着这些特性: 102 | 103 | 交替命令输入 ALT_X_INPUT 104 | 调试符号 FEAT_SIGNS 105 | 调试高亮 FEAT_SIGNS 106 | 信息页脚 FEAT_FOOTER 107 | 气泡表达式求值 FEAT_BEVAL 108 | 109 | 最先提供且带有完整 IPE/IDE 的整合来自 Sun Visual WorkShop。如果需要编译一个带 110 | 有 VWS 接口的 gvim,请设置下面这个标志位,它会设置以上所有的标志位: 111 | 112 | Sun Visual WorkShop FEAT_SUN_WORKSHOP 113 | 114 | ============================================================================== 115 | 3. 整合的调试器 *debugger-integration* 116 | 117 | 一个完全整合的 调试器/IPE/IDE 是 Sun 的 Visual WorkShop 集成编程环境。 118 | 119 | 对 Sun NetBeans 的支持,可见 |netbeans|。 120 | 121 | vim:tw=78:sw=4:ts=8:ft=help:norl: 122 | -------------------------------------------------------------------------------- /doc/hangulin.cnx: -------------------------------------------------------------------------------- 1 | *hangulin.txt* For Vim version 7.3. 最近更新: 2010年5月 2 | 3 | 4 | VIM 参考手册 By Chi-Deok Hwang and Sung-Hyun Nam 5 | 译者: Willis 6 | http://vimcdoc.sf.net 7 | 8 | 注意: |+hangul_input| 特性即将被删除。如果你希望保留,请给 Vim 用户邮件列表发 9 | 信! 10 | 11 | 简介 *hangul* 12 | ------------ 13 | 我们的目的是能够在 VIM 的 GUI 版本中输入 Hangul,韩国语的一种书写方式。如果你 14 | 有 XIM 程序,那么你可以用另外一个 |+xim| 特性。基本上,这个程序是给那些没有 15 | XIM 程序的人用的。 16 | 17 | 编译 18 | ------- 19 | 下面用的是些简单的选项。你可以加上其它配置选项。 > 20 | 21 | ./configure --with-x --enable-multibyte --enable-fontset --enable-hangulinput 22 | 23 | 你现在应该查看 feature.h。如果 |+hangul_input| 特性在配置时已经加入,你可以设 24 | 置更多的选项: 如把键盘类型设为 2 bulsik 或者 3 bulsik。在这里,你可以找到类似 25 | 于下述例子中的关键字。 > 26 | 27 | #define HANGUL_DEFAULT_KEYBOARD 2 28 | #define ESC_CHG_TO_ENG_MODE 29 | /* #define X_LOCALE */ 30 | /* #define SLOW_XSERVER */ 31 | 32 | 环境变量 33 | --------------------- 34 | 你应该设置 LANG 环境变量为韩国 locale,比如 ko 或者 ko_KR.euc。如果你设置了 35 | LC_ALL 环境变量,它应该也被设成韩国 locale。 36 | 37 | VIM 资源 38 | ------------ 39 | 你应该把下面的内容加到你自己全局的 vimrc ($HOME/.vimrc)。 > 40 | 41 | :set fileencoding=korea 42 | 43 | 键盘 44 | -------- 45 | 你可以通过修改 VIM_KEYWORD 或是 HANGUL_KEYBOARD_TYPE 环境变量改变你的键盘类型 46 | (2 bulsik 或是 3 bulsik)。在 sh 里,只要这么做 (2 bulsik): > 47 | 48 | export VIM_KEYBOARD="2" 49 | or > 50 | export HANGUL_KEYBOARD_TYPE="2" 51 | 52 | 如果两者都设置了,VIM_KEYBOARD 有优先权。 53 | 54 | Hangul 字体 55 | ------------ 56 | 你可以通过 $HOME/.Xdefaults 或自己的 .gvimrc 修改文本字体。不过对于 Hangul,你 57 | 应该修改你自己的 vimrc 的 'guifontset'。 58 | 59 | $HOME/.Xdefaults: > 60 | Vim.font: english_font 61 | 62 | ! 以下是 Athena 的 hangul 菜单 63 | *international: True 64 | Vim*fontSet: english_font,hangul_font 65 | 66 | ! 以下是 Motif 的 hangul 菜单 67 | *international: True 68 | Vim*fontList: english_font;hangul_font: 69 | 70 | $HOME/.gvimrc: > 71 | set guifontset=english_font,hangul_font 72 | 73 | 要 注意 其中用的是 , (逗号) 还是 ; (分号)。 74 | 75 | 还有,不要设 ':set guifont'。如果这项存在,那么 Gvim 忽略 ':set guifontset'。 76 | 这就意味着 VIM 不会提供 fontset 的支持,从而只有英语会正确显示,Hangul 就不会 77 | 了。 78 | 79 | 在 'fontset' 特性被打开后,VIM 不再允许使用 'font'。比如,如果你在 .gvimrc 里 80 | 用 > 81 | :set guifontset=eng_font,your_font 82 | 那么你的语法高亮应该这样写 > 83 | :hi Comment guifg=Cyan font=another_eng_font,another_your_font 84 | 如果你只是这么写 > 85 | :hi Comment font=another_eng_font 86 | 那么你会看到一个_很好的_错误信息。要 注意 ! 87 | 88 | hangul 字体 hangul_font 的宽度应该是英语字体 english_font 的宽度的两倍。 89 | 90 | 尚未支持的特性 91 | ------------------- 92 | Johab 字体还没能得到支持。我还没有这方面的计划。如果你确实想用 johab 字体, 93 | 你可以看看 gau 包里的 hanguldraw.c。 94 | 95 | Hanja 输入还没有支持。我也没有这方面计划。如果你确实想输入 Hanja,在 hanterm 96 | 上使用 VIM。 97 | 98 | 漏洞或者意见 99 | -------------- 100 | 请将意见、补丁和建议送到: 101 | 102 | Chi-Deok Hwang 103 | SungHyun Nam 104 | 105 | vim:tw=78:ts=8:ft=help:norl: 106 | -------------------------------------------------------------------------------- /doc/howto.cnx: -------------------------------------------------------------------------------- 1 | *howto.txt* For Vim version 7.3. 最近更新: 2006年5月 2 | 3 | 4 | Vim 参考手册 作者:Bram Moolenaar 5 | 译者: iCrazy http://vimcdoc.sf.net 6 | 7 | 8 | 如何…… *howdoi* *how-do-i* *howto* *how-to* 9 | 10 | |tutor| 入门 11 | |:quit| 退出?我被困住了,请帮帮我! 12 | |initialization| 初始化 Vim 13 | |vimrc-intro| 写一个 Vim 脚本文件 (vimrc) 14 | |suspend| 挂起 Vim 15 | |usr_11.txt| 在一次崩溃后恢复 16 | |07.4| 在覆盖我的文件时保留一个备份 17 | 18 | |usr_07.txt| 编辑文件 19 | |23.4| 编辑二进制文件 20 | |usr_24.txt| 插入文本 21 | |deleting| 删除文本 22 | |usr_04.txt| 改变文本 23 | |04.5| 复制和移动文本 24 | |usr_25.txt| 给文本排版 25 | |30.6| 给注释排版 26 | |30.2| 缩进 C 程序 27 | |25.3| 自动设置缩进 28 | 29 | |usr_26.txt| 重复执行命令 30 | |02.5| 撤销和重做 31 | 32 | |usr_03.txt| 在文本中移动 33 | |word-motions| 基于单词的移动 34 | |left-right-motions| 左右移动 35 | |up-down-motions| 上下移动 36 | |object-motions| 基于文本对象的移动 37 | |various-motions| 其它移动方式 38 | |object-select| 基于文本对象的选择 39 | |'whichwrap'| 移动时跳过换行符 40 | |'virtualedit'| 移动到没有文本的地方 41 | |usr_27.txt| 指定查找的模式 42 | |tags-and-searches| 进行标签和特殊查找 43 | |29.4| 在包含文件中查找变量、函数或宏 44 | |K| 查找光标处关键词的手册页 45 | 46 | |03.7| 滚屏 47 | |'sidescroll'| 水平/竖直方向滚屏 48 | |'scrolloff'| 设置可见的上下文行数 49 | 50 | |mode-switching| 切换模式 51 | |04.4| 使用可视模式 52 | |'insertmode'| 以插入模式启动 Vim 53 | 54 | |40.1| 映射热键 55 | |24.7| 创建缩写 56 | 57 | |ins-expandtab| 在插入模式下用空格扩展制表符 58 | |i_CTRL-R| 在插入模式下插入寄存器的内容 59 | |24.3| 在插入模式下自动补全单词 60 | |25.1| 断开过长的行 61 | 62 | |20.1| 编辑命令行 63 | |20.3| 命令行自动补全 64 | |'cmdheight'| 增加命令行的高度 65 | |10.3| 指定命令行范围 66 | |40.3| 指定在 读/写 或 进入/离开 缓冲区/窗口 之前/之后 67 | 自动执行命令 68 | 69 | |'autowrite'| 自动存盘 70 | |30.1| 加速 编辑-编译-编辑 循环,在 Vim 里面编译和修正错误 71 | 72 | |options| 设置选项 73 | |auto-setting| 自动设置选项 74 | |term-dependent-settings| 设置依赖于终端名称的选项 75 | |save-settings| 保存设置 76 | |:quote| 对我的 .vim 文件进行注释 77 | |'helpheight'| 调整默认的帮助高度 78 | |'highlight'| 设置各种高亮模式 79 | |'title'| 设置窗口标题 80 | |'icon'| 设置窗口图标标题 81 | |'report'| 避免看到每一行上的改变信息 82 | |'shortmess'| 避免按回车 |hit-enter| 提示 83 | 84 | |mouse-using| 在 Vim 中使用鼠标 85 | |usr_08.txt| 管理多窗口和缓冲区 86 | |gui.txt| 使用 GUI 87 | 88 | |您 (还) 不能!| 用 Vim 洗盘子 :) 89 | 90 | |usr_06.txt| 打开语法高亮 91 | |2html.vim| 把一个彩色的文件转换成 HTML 92 | |less| 用 Vim 模拟 less 或 more,但带有语法高亮 93 | 94 | vim:tw=78:ts=8:ft=help:norl: 95 | -------------------------------------------------------------------------------- /doc/if_sniff.cnx: -------------------------------------------------------------------------------- 1 | *if_sniff.txt* For Vim version 7.3. 最近更新: 2006年2月 2 | 3 | 4 | VIM 参考手册 5 | by Anton Leherbauer (toni@takefive.co.at) 6 | 译者: Willis 7 | http://vimcdoc.sf.net 8 | 9 | 10 | SNiFF+ 和 Vim *sniff* 11 | 12 | 1. 简介 |sniff-intro| 13 | 2. 命令 |sniff-commands| 14 | 3. 编译 VIM 时加入 SNiFF+ 接口 |sniff-compiling| 15 | 16 | {Vi 没有任何一项以上的功能} *E275* *E274* *E276* *E278* *E279* 17 | 18 | SNiFF+ 接口只有在 Vim 编译时加入 |+sniff| 特性才能使用。 19 | 20 | ============================================================================== 21 | 1. 简介 *sniff-intro* 22 | 23 | 以下使用 SNiFF+ 的功能可用: 24 | 25 | * Vim 能被用来应答所有的编辑请求。 26 | * 当 Vim 保存一个文件时,SNiFF+ 识别和更新所有浏览器 27 | * Vim 中可以直接调用 SNiFF+ 命令 28 | 29 | 如何和 SNiFF+ 一起使用 VIM 30 | 1. 确保 SNiFF+ 已经在运行。 31 | 2. 在属性对话框的编辑器视图中设置 'External Editor' 字段为 'Emacs/Vim'。 32 | 3. 启动 Vim 33 | 4. 连接到 SNiFF+ (:sniff connect) 34 | 35 | 一旦连接建立,SNiFF+ 调用 Vim 来执行所有的显示和编辑源代码的请求。另一方面,你 36 | 也可以用 :sniff 命令对 SNiFF+ 发出查询。 37 | 38 | ============================================================================== 39 | 2. 命令 *sniff-commands* 40 | 41 | *:sniff* *:sni* 42 | :sni[ff] request [symbol] 给 sniff 发送请求 request 和带一个可选的参数 43 | symbol。 {Vi 无此功能} 44 | :sni[ff] 显示所有可能的请求和连接状态 45 | 46 | 很多请求需要一个 symbol (标识符) 作为参数。如果省略,Vim 会使用当前光标下的单 47 | 词。可用的请求包括: 48 | 49 | 请求 对应 描述 50 | ------------------------------------------------------------------------------- 51 | connect sc 和 SNiFF+ 建立连接。 52 | 确保 SNiFF+ 已经做了相应的属性设置。 53 | disconnect sq 和 SNiFF+ 断开连接。用命令 :sniff connect 54 | (或者 'sc' ),你在任何时候可以重新连接。 55 | toggle st 在实现和定义文件间切换 56 | find-symbol sf 在符号浏览器中调入 symbol 57 | browse-class sb 在类浏览器中调入类 symbol 58 | superclass ss 编辑 symbol 的超类 59 | overridden so 编辑 symbol 的被重写的方法 60 | retrieve-file srf 检取当前文件中的 symbol 61 | retrieve-project srp 检取当前项目中的 symbol 62 | retrieve-all-projects srP 检取所有项目中的 symbol 63 | retrieve-next sR 用当前检取器的设置检取下一个 symbol 64 | goto-symbol sg 转到 symbol 的定义或者实现 65 | hierarchy sh 在层次浏览器上调入 symbol 66 | restr-hier sH 同上,但只显示相关的类 67 | xref-to sxt 启动一个针对 symbol 的引用查询,并把结果调入 68 | 交叉引用器 69 | xref-by sxb 启动一个针对 symbol 的被引用查询 70 | xref-has sxh 启动一个针对 symbol 的引用组件查询 71 | xref-used-by sxu 启动一个针对 symbol 的被引用组件查询 72 | show-docu sd 显示 symbol 的文档 73 | gen-docu sD 产生 symbol 的文档 74 | 75 | 对应表在文件 'sniff.vim' 中定义,这个文件是所有 SNiFF+ 产品的一个组成部分 76 | ($SNIFF_DIR/config/sniff.vim)。它会在 Vim 连接到 SNiFF+ 时被执行。 77 | 78 | ============================================================================== 79 | 3. 编译 VIM 时加入 SNiFF+ 接口 *sniff-compiling* 80 | 81 | 要在编译 Vim 是加入 SNiFF+ 支持,你需要两个额外的源文件: if_sniff.c 和 82 | if_sniff.h。 83 | 在 Unix 上: 编辑 Makefile,去掉注释行 "--enable-sniff"。或者手动执行 84 | configure,在命令行里加入该参数。 85 | 在 NT 上: 在 make 命令执行时加上 SNIFF=yes。 86 | 87 | vim:tw=78:ts=8:ft=help:norl: 88 | -------------------------------------------------------------------------------- /doc/os_mac.cnx: -------------------------------------------------------------------------------- 1 | *os_mac.txt* For Vim version 7.3. 最近更新: 2006年7月 2 | 3 | 4 | Vim 参考手册 作者:Bram Moolenaar 5 | 译者: iCrazy, Willis,tocer 6 | http://vimcdoc.sf.net 7 | 8 | 9 | *mac* *Mac* *macintosh* *Macintosh* 10 | 11 | 本文件阐述 Vim 的 Macintonsh 版本的特性。 12 | 13 | 注意: 本文档已经略有过时。在这里你可以找到更多有用的信息: 14 | http://macvim.org 15 | 16 | 1. 文件名约定 |mac-filename| 17 | 2. .vimrc 和 .vim 文件 |mac-vimfile| 18 | 3. FAQ |mac-faq| 19 | 4. 已知的不足之处 |mac-lack| 20 | 5. Mac 错误报告 |mac-bug| 21 | 6. 编译 Vim |mac-compile| 22 | 23 | Vim 的 3.0 版有一个移植到 Mac 的版本。这是当时文档中开始的几句话: 24 | 25 | VIM Release Notes 26 | Initial Macintosh release, VIM version 3.0 27 | 19 October 1994 28 | 29 | Eric Fischer 30 | , , 31 | 5759 N. Guilford Ave 32 | Indianapolis IN 46220 USA 33 | 34 | ============================================================================== 35 | 1. 文件名约定 *mac-filename* 36 | 37 | 从 Vim 版本 7 开始,你只能用 unix 的路径分隔符。为了确定指定的文件名是与当前目 38 | 录相关 (相对路径),还是绝对路径 (即:和 "桌面" 相关),我们使用了如下的算法: 39 | 40 | 如果路径以 "/" 开始,则为绝对路径 41 | 如果路径以 ":" 开始,则为相对路径 42 | 如果路径不以 "/" 和 ":" 开始,但是 ":" 在 "/" 之前出现,则为绝对路径 43 | > 44 | :e /HD/text 45 | :e HD:text 46 | < 编辑磁盘 "HD" 中的文件 "text" > 47 | :e :src:main.c 48 | :e src/main.c 49 | < 编辑当前目录下子目录 "src" 中的文件 "main.c" > 50 | :e os_mac.c 51 | < 编辑当前目录下的文件 "os_mac.c"。 52 | 53 | 您可以使用变量 |$VIM| 和 |$VIMRUNTIME| > 54 | 55 | :so $VIMRUNTIME:syntax:syntax.vim 56 | 57 | ============================================================================== 58 | 2. .vimrc 和 .vim 文件 *mac-vimfile* 59 | 60 | 对于 Vim 脚本,建议使用 Unix 风格的换行符,也就是单个 NL 字符。 61 | 62 | 当 Vim 启动时,它会载入 $VIMRUNTIME/macmap.vim 脚本以定义默认的命令键 63 | (command-key) 映射。 64 | 65 | 在旧版系统上,一般应避免使用以 "." 开头的文件,所以那些 rc 文件被命名为 66 | "vimrc" 或 "_vimrc",以及 "gvimrc" 或 "_gvimrc"。这些文件可以是任何格式 (mac、 67 | dos 或 unix)。如果 |'nocompatible'| 选项打开,Vim 可以处理任何文件格式,否则它 68 | 只能处理 mac 格式的文件。 69 | 70 | ============================================================================== 71 | 3. Mac FAQ *mac-faq* 72 | 73 | 在互联网上: http://macvim.org/OSX/index.php#FAQ 74 | 75 | 问题: 我不能在 Apple 终端输入非 ASCII 的字符。 76 | 回答: 在 Windows Setting,Emulation,确信没有选上 "Escape non-ASCII 77 | characters"。 78 | 79 | 问题: 怎么从命令行启动 GUI? 80 | 回答: 假设 Vim.app 存放在 /Applications 中: 81 | open /Applications/Vim.app 82 | 或: 83 | /Applications/Vim.app/Contents/MacOS/Vim -g {arguments} 84 | 85 | 问题: 如果我用 GUI 或 open 启动 Vim.app,如何合理设置 $PATH? 86 | 回答: 下面这个窍门能用于多数 shell。把它放到 vimrc 文件中。macvim.org 发布的二 87 | 进制发行包中带有的系统 vimrc 文件已经包含。 > 88 | let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l") 89 | let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n') 90 | 91 | ============================================================================== 92 | 4. 已知的不足之处 *mac-lack* 93 | 94 | 在终端中,CTRL-^ 需要用 Shift-Control-6 来输入。而 CTRL-@ 则用 Shift-Control-2 95 | 输入。 96 | 97 | ============================================================================== 98 | 5. Mac 错误报告 *mac-bug* 99 | 100 | 当报告任何与 Mac 平台相关的 bug 或特性时,请使用 vim-mac 邮件列表 |vim-mac|。 101 | 然而,您必须先订阅它。另一个办法就是发邮件给当前的 MacVim 维护者: 102 | 103 | mac@vim.org 104 | 105 | ============================================================================== 106 | 6. 编译 Vim *mac-compile* 107 | 108 | 见伴随源程序的文件 "src/INSTALLmac.txt"。 109 | 110 | vim:tw=78:ts=8:ft=help:norl: 111 | -------------------------------------------------------------------------------- /doc/os_mint.cnx: -------------------------------------------------------------------------------- 1 | *os_mint.txt* For Vim version 7.3. 最近更新: 2005年3月 2 | 3 | 4 | Vim 参考手册 作者:Jens M.Felderhoff 5 | 译者: iCrazy http://vimcdoc.sf.net 6 | 7 | *MiNT* *Atari* 8 | 本文包含了 Atari MiNT 的 Vim 版本的特性。 9 | 10 | 如果您要为运行 MiNT 的 Atari 机器编译 Vim,您需要首先看一下 src 目录下的 11 | "INSTALL" 和 "Makefile" 目录。 12 | 13 | Vim MiNT 版本的行为和它的 Unix 版本几乎是一样的。 14 | 如果没有明确声明,文档描述的 Unix 上 Vim 的行为也适用于 MiNT 上的 Vim 版本。 15 | 16 | 为了通配符 <~> (主目录) 的扩展,你需要一个支持波浪符扩展的 shell。原始的 17 | Bourne Shell 不能识别,而 "csh" 和 "ksh" 都没问题。 18 | 19 | Vim 的 MINT 版本需要支持你的终端的终端能力的 termcap 文件 /etc/termcap。内建的 20 | termcap 支持 vt52 终端。而支持 TOSWIN 窗口管理器和虚拟控制台终端的 termcap 入 21 | 口项已经被附加到该 termcap 文件中,并随着 Vim 一起发布。 22 | 23 | 万一您遇到了 键被互换的问题,请看 |:fixdel|。 24 | 25 | MiNT 上的终端刷新常常比较慢 (比如串行终端),所以默认情况下的 'showcmd' 选项和 26 | 'ruler' 选项都是关闭的。如果你所使用的终端比较快的话,可以把它们打开。甚至可以 27 | 试试 'ttyfast' 选项。 28 | 29 | 如果您发现了错误,请发送报告至 30 | 31 | Jens M. Felderhoff,电邮: 32 | 33 | vim:tw=78:ts=8:ft=help:norl: 34 | -------------------------------------------------------------------------------- /doc/os_qnx.cnx: -------------------------------------------------------------------------------- 1 | *os_qnx.txt* For Vim version 7.3. 最近更新: 2006年2月 2 | 3 | 4 | VIM 参考手册 by Julian Kinraid 5 | 译者: Willis 6 | http://vimcdoc.sf.net 7 | 8 | 9 | *QNX* *qnx* 10 | 11 | 1. 概述 |qnx-general| 12 | 2. 编译 Vim |qnx-compiling| 13 | 3. 终端支持 |qnx-terminal| 14 | 4. Photon GUI |photon-gui| 15 | 5. Photon 字体 |photon-fonts| 16 | 6. 漏洞和待做的事情 17 | 18 | ============================================================================== 19 | 20 | 1. 概述 *qnx-general* 21 | 22 | QNX 上的 Vim 和其他的 unix 版本行为大致相同。 |os_unix.txt| 23 | 24 | 25 | 2. 编译 Vim *qnx-compiling* 26 | 27 | Vim 可以用通常的 configure/make 方法编译。如果你要编译 X11 的版本,在配置 28 | (configure) 时加入 --with-x 选项。否则,不需要任何参数。或者,加入 29 | --enable-gui=photon 以得到 Photon GUI 的支持。执行 ./configure --help,看看还 30 | 有什么特性你希望打开或者关闭。 31 | 32 | 33 | 3. 终端支持 *qnx-terminal* 34 | 35 | 如果鼠标和剪贴板选项在编译时加入的话 (通常如此),Vim 可以提供 pterm 这两方面的 36 | 支持。 37 | 38 | 影响鼠标设置的选项有 |'mouse'| 和 |'ttymouse'|。在使用鼠标时,如果你按住 39 | shift、ctrl、或是 alt,pterm 自己会处理鼠标事件。它会选择文本,和 Vim 所做的无 40 | 关。 41 | 42 | 如果鼠标可以使用,你按住 Alt-RightMouse (Alt + 鼠标右键) 可以打开 pterm 菜单。 43 | 要关闭 Vim 的鼠标支持,把 mouse 选项置空,即 set mouse= 44 | 45 | 46 | 4. Photon GUI *photon-gui* 47 | 48 | 要启动 Vim 的 GUI 版本,你可以运行 gvim 或者 vim -g。否则运行的是终端版本。更 49 | 多的信息可见 - |gui-x11-start| 50 | 51 | 支持的特性有: 52 | :browse 命令 |:browse| 53 | :confirm 命令 |:confirm| 54 | 光标闪烁 |'guicursor'| 55 | 菜单、弹出式菜单和菜单优先顺序 |:menu| 56 | |popup-menu| 57 | |menu-priority| 58 | 工具栏 |gui-toolbar| 59 | |'toolbar'| 60 | 字体选择工具 (:set guifont=*) |photon-fonts| 61 | 鼠标聚焦 |'mousefocus'| 62 | 鼠标隐藏 |'mousehide'| 63 | 鼠标图标形状 |'mouseshape'| 64 | 剪贴板 |gui-clipboard| 65 | 66 | 还未完成的特性: 67 | 若干国际化支持,包括波斯语和希伯来文字的支持, 68 | 不同的编码,等等。 69 | 70 | 本帮助文件 71 | 72 | 不支持的特性: 73 | 查找和替换窗口 |:promptfind| 74 | 可卸的菜单 75 | 76 | 其他我还没有想及的恕难加入 77 | 78 | 79 | 5. Photon 字体 *photon-fonts* 80 | 81 | 你可以在 gui 中用 guifont 选项设置字体 > 82 | :set guifont=Lucida\ Terminal 83 | < 84 | 该字体须是等宽字体,字体名如有空格,应以 '\' 转义之。缺省字体是 PC Terminal, 8 85 | 号字。用 '*' 作为字体名会打开一个标准的 Photon 字体选择工具,然后你可以从中选 86 | 择一个字体。 87 | 88 | 在字体名后面,你可以附加可选的控制字体大小和风格的选项,设置之间用 ':' 分隔。 89 | 不是所有的字体都支持所有的风格。 90 | 91 | 这些选项是, 92 | s{size} 字体大小 {size} 93 | b 粗体字 94 | a 抗锯齿字体 95 | i 斜体字 96 | 97 | 示例: 98 | 99 | 设定 monospace 10号抗锯齿字体 > 100 | :set guifont=monospace:s10:a 101 | < 102 | 设定 Courier 12号粗体斜体字 > 103 | :set guifont=Courier:s12:b:i 104 | < 105 | 从选择工具挑选字体 > 106 | :set guifont=* 107 | < 108 | 109 | 110 | 6. 漏洞和待做的事情 111 | 112 | 已知问题: 113 | - Vim 有时在执行外部程序时不响应。绕开的方法是把下面这行加入到你的 114 | |vimrc| 文件中: > 115 | set noguipty 116 | 117 | 漏洞: 118 | - 菜单高亮还有些许问题 119 | - 在使用 phiditto/phinows 等的时候,如果你用的字体不支持粗体属性而 Vim 120 | 要显示粗体字,情况就会弄乱。 121 | - 光标有时候很难看得到。 122 | - 一些我可以解决的小问题 :) 123 | 124 | 待做: 125 | - 改进多语言支持。 126 | - 在菜单和工具栏中加入设置字体的选项。 127 | - 查找和替换对话框。 128 | - 客户/服务器方面的功能。 129 | - 也许要做可卸下的菜单。 130 | 131 | - 在启动外部程序时,不要使用带 spawn() 的 fork()。 132 | 133 | vim:tw=78:sw=4:ts=8:ts=8:ft=help:norl: 134 | -------------------------------------------------------------------------------- /doc/os_unix.cnx: -------------------------------------------------------------------------------- 1 | *os_unix.txt* For Vim version 7.3. 最近更新:2005年3月 2 | 3 | 4 | VIM 用户手册 Bram Moolenaar 著 5 | 译者:yemao http://vimcdoc.sf.net 6 | 7 | 8 | *unix* *Unix* 9 | 本文件介绍了 Unix 版本的 vim 的一些特殊之处。 10 | 11 | 首先,要在 Unix 上编译 vim,请参考 src 目录下的 "INSTALL" 文件和 "Makefile" 文 12 | 件。 13 | 14 | 默认帮助文件名为 "/usr/local/lib/vim/help.txt" 15 | 同时,vim 会使用 "$HOME/.vimrc" 和 "$HOME/.exrc" 而不是 "s:.vimrc" 和 16 | "s:.exrc"。另外它会首先使用 /usr/local/etc/vimrc 文件。注意,如果 17 | "/usr/local/share" 已经存在,就会使用它来代替 "/usr/local/lib"。 18 | 19 | 临时文件 (用于过滤程序) 默认会放在 "/tmp" 下,如果你想把它们放在别处,那么必须 20 | 设置环境变量 $TMPDIR 为你放临时文件的目录。 21 | 22 | 通过扩展通配符,你可以使用 '~' (用户主目录) 及 '$' (系统环境变量)。 23 | 24 | *fork* *spoon* 25 | 执行外部命令时,会尽可能调用 fork()/exec(),不然会调用 system()。使用后者速度 26 | 会有所减慢。正因为有两个函数可以被调用,":version" 输出信息就有两种,当调用 27 | fork()/exec() 时,输出 |+fork|,否则输出 |+system|。编译时可以修改。 28 | (GUI 上关于 fork (进程分叉) 的详细信息参考 |gui-fork|。) 29 | 30 | Unix 上的终端刷新常常比较慢 (比如串行终端和 suntools 下的 shell 窗口),所以默 31 | 认情况下的 'showcmd' 选项和 'ruler' 选项都是关闭的。如果你所使用的终端比较快的 32 | 话,可以把它们打开。甚至可以试试 'ttyfast' 选项。 33 | 34 | 在 xterm 下使用 Vim,只要把 'mouse' 选项设成 "a" 就可以使用鼠标了。如果你有权 35 | 限使用 X-server,当你用鼠标拖动的时候,可以进行 gui 风格的复制和粘贴,而你还会 36 | 看到可视反馈。如果你还是想用 xterm 的复制和粘贴,使用鼠标时按住 shift 键,具体 37 | 请参考 |mouse-using|。只要你的 xterm 版本够新,设置一下 'ttymouse' 选项就可以 38 | 在拖动的时候得到可视反馈。 39 | 40 | *terminal-colors* 41 | 要在 Vim 里显示彩色,可以参考以下例子 (假定你的终端支持色彩显示,而 "T_Co" 为 42 | 空或零): > 43 | :set t_me=^[[0;1;36m " 正常模式 (撤销 t_mr 和 t_md) 44 | :set t_mr=^[[0;1;33;44m " 反转 (逆转) 模式 45 | :set t_md=^[[1;33;41m " 粗体模式 46 | :set t_se=^[[1;36;40m " 突出模式结束 47 | :set t_so=^[[1;32;45m " 突出模式开始 48 | :set t_ue=^[[0;1;36m " 下划线模式结束 49 | :set t_us=^[[1;32m " 下划线模式开始 50 | [注意,^[ 是 ,可以用 CTRL-V 来输入。] 51 | 52 | 而在真正的彩色终端下,可以使用 ":highlight" 命令。 53 | 54 | 另外,文件 "tools/vim132" 是一个 shell 脚本。在 vt100 和与其类似的终端下,它可 55 | 以使 Vim 使用 132 列模式。 56 | 57 | vim:tw=78:ts=8:ft=help:norl: 58 | -------------------------------------------------------------------------------- /doc/pi_gzip.cnx: -------------------------------------------------------------------------------- 1 | *pi_gzip.txt* For Vim version 7.3. 最近更新: 2005年3月 2 | 3 | 4 | Vim 参考手册 作者:Bram Moolenaar 5 | 译者: iCrazy http://vimcdoc.sf.net 6 | 7 | 8 | 用 Vim 编辑压缩的文件 *gzip* *bzip2* *compress* 9 | 10 | 1. 自动命令 |gzip-autocmd| 11 | 12 | 这里涉及到的功能是一个 |standard-plugin|。 13 | 这个插件仅在 'compatible' 选项没有被置位的情况下有效。 14 | 您可以通过设置变量 "loaded_gzip" 来避免装载这个插件: 15 | :let loaded_gzip = 1 16 | 17 | {Vi 没有以上的功能} 18 | 19 | ============================================================================== 20 | 1. 自动命令 *gzip-autocmd* 21 | 22 | 这个插件建立自动命令来截获对具有以下扩展名的文件的读写: 23 | 24 | 扩展名 压缩格式 ~ 25 | *.Z compress (Lempel-Ziv) 26 | *.gz gzip 27 | *.bz2 bzip2 28 | 29 | 您仅仅知道这些就已经足够了,此插件没有选项。 30 | 31 | 在解压缩一个文件之后,会自动重新检测文件格式。这样可能会使一个类似 "foo.c.gz" 32 | 的文件具有 "c" 的文件格式。 33 | 34 | 如果您设置了 'patchmode',在进行压缩后该值会被自动加到文件的扩展名后面。因而编 35 | 辑 patchmode 文件不会产生自动解压缩的效果。如果您希望这样,您需要改变文件名。 36 | 37 | ============================================================================== 38 | vim:tw=78:ts=8:ft=help:norl: 39 | -------------------------------------------------------------------------------- /doc/pi_paren.cnx: -------------------------------------------------------------------------------- 1 | *pi_paren.txt* For Vim version 7.3. 最近更新: 2008年6月 2 | 3 | 4 | VIM 参考手册 by Bram Moolenaar 5 | 译者: Willis 6 | http://vimcdoc.sf.net 7 | 8 | 9 | 高亮匹配括号 *matchparen* 10 | 11 | 这里提到的功能是一个标准插件 |standard-plugin|。 12 | 只有 'compatible' 不置位时才能使用此插件。 13 | 14 | 设置 "loaded_matchparen" 变量可以避免载入此插件: > 15 | :let loaded_matchparen = 1 16 | 17 | 此插件安装 CursorMoved、CursorMovedI 和 WinEnter 自动命令来重新定义匹配高亮。 18 | 19 | *:NoMatchParen* *:DoMatchParen* 20 | 要在载入此插件后关闭它,用: > 21 | 22 | :NoMatchParen 23 | 24 | 要再次打开: > 25 | 26 | :DoMatchParen 27 | 28 | 使用的高亮是 MatchParen。":highlight" 命令可用来为它指定不同的颜色。例如: > 29 | > 30 | :hi MatchParen ctermbg=blue guibg=lightblue 31 | 32 | 匹配的字符组来自 'matchpairs' 选项。你可以改变该值来高亮不同的匹配。注意 不是 33 | 什么值都可以。比如,你不能高亮单引号或双引号,因为它们的开始和结束字符相同。 34 | 35 | 使用语法高亮的属性。如果光标目前不在字符串或注释语法项目里,则忽略字符串和注释 36 | 里的匹配。任何名字里包含 "string" 或 "comment" 的语法项目都被认为是字符串或注 37 | 释项目。 38 | 39 | 移动光标时,限制搜索范围以避免延迟。这些限制包括: 40 | - 窗口的可见部分。 41 | - 光标上下 100 行,避免关闭折叠存在时的延迟过长。 42 | - 光标前后 'synmaxcol' 乘以 2 个字节,避免存在带语法高亮的长行时延迟过长。 43 | 44 | 45 | 如果你希望 |%| 命令更好的工作,可以使用 matchit 插件,见 |matchit-install|。该 46 | 插件也可用于跳过注释里的匹配。这不同于 matchparen 高亮,两者使用不同的机制。 47 | 48 | ============================================================================== 49 | vim:tw=78:ts=8:ft=help:norl: 50 | -------------------------------------------------------------------------------- /doc/pi_spec.cnx: -------------------------------------------------------------------------------- 1 | *pi_spec.txt* For Vim version 7.3. 最近更新: 2006年7月 2 | 3 | 作者: Gustavo Niemeyer ~ 4 | 译者: Willis 5 | http://vimcdoc.sf.net 6 | 7 | 这是一个针对 rpm 规格文件的文件类型插件。 8 | 9 | 此 Vim 插件让你轻松更新 RPM 规格 (spec) 文件的更新记录段 (%changelog section) 10 | 的内容。如果该段还不存在,它可以为你新建段。如果你今天还没有更新,它会帮你建立 11 | 新的说明入口 (entry)。如果你还没有提供格式串 (|spec_chglog_format|),它会询问 12 | 你的 email 地址,然后自动为你提供该格式串。 13 | 14 | 1. 如何使用 |spec-how-to-use-it| 15 | 2. 自定义 |spec-customizing| 16 | 17 | ============================================================================== 18 | 1. 如何使用 *spec-how-to-use-it* 19 | 20 | spec_chglog 插件提供如下映射: 21 | 22 | :map c SpecChangelog 23 | 24 | 这意味着在规格文件里你可以通过按 |maplocalleader| 键 (缺省是 '\') 加 'c' 来执 25 | 行这个插件。如果你还没有设置 |spec_chglog_format|,此时插件会要求你提供 email 26 | 地址,编辑过程里会用到这个地址。 27 | 28 | 每次你运行此插件,它检查更新记录,看看最近的说明入口是否今天由你写入。如果是, 29 | 在此入口中插入新建更新记录,如果不是,它会建立一个新的更新记录入口。如果你打开 30 | |spec_chglog_release_info|,它同时还会检查文件名,版本和发布版本是不是匹配。如 31 | 果你自己还没有更新该软件包的发布号的话。这个插件能够智能地询问你是否要这么做。 32 | 33 | 设置键盘映射 *spec-setting-a-map* 34 | ------------- 35 | 36 | 正如你应该已经知道的,可以设置键盘映射执行任何 Vim 命令 (对此而言,其实还有别 37 | 的)。如果你不喜欢缺省的映射 c,可以自己定义。下面说明在 .vimrc 文 38 | 件里如何作此设置。比如,要把本插件映射到 键: 39 | > 40 | au FileType spec map SpecChangelog 41 | < 42 | 备注: 本插件会尊重你的本人意愿,不会再次把它的缺省设置强加于你。 43 | 44 | 该命令只会在规格文件的缓冲区中定义这个映射。 45 | 46 | 47 | ============================================================================== 48 | 2. 自定义 *spec-customizing* 49 | 50 | 格式串 *spec_chglog_format* 51 | ----------------- 52 | 53 | 你可以轻松地定制自己的规格文件入口的样式。为此,只须在 .vimrc 文件中这样设置 54 | "spec_chglog_format" 变量: > 55 | 56 | let spec_chglog_format = "%a %b %d %Y My Name " 57 | < 58 | 注意 "%a %b %d %Y" 是最常用的格式。如果你不提供格式串,第一次运行 SpecChanglog 59 | 命令时,它会询问 email 地址,然后为你构造 |spec_chglog_format| 变量。这种方式 60 | 下,你只要提供 email 地址一次。 61 | 62 | 要知道可用的格式串选项,察看 strftime() 函数的 man 手册页。 63 | 64 | 何处插入新的更新记录 *spec_chglog_prepend* 65 | ------------------------- 66 | 67 | 本插件通常把新的 %changelog 更新记录 (注意: 不是入口本身) 加在现有的记录之后。 68 | 如果你设置了 spec_chglog_prepend 变量 > 69 | 70 | let spec_chglog_prepend = 1 71 | 72 | 那么新记录将加在已有记录之前。 73 | 74 | 加入发布信息 *spec_chglog_release_info* 75 | ---------------------- 76 | 77 | 如果你愿意,本插件自动在每个更新记录入口中加入发布信息。这么做的一个好处是能控 78 | 制软件包每次更改之后是否更新发布号。如果包的版本或发行号没有更新,它询问你是否 79 | 要这么做。要打开这个功能,在 .vimrc 中加入以下代码: > 80 | 81 | let spec_chglog_release_info = 1 82 | 83 | 这样,更新记录入口的首个记录就会像这样: > 84 | 85 | + name-1.0-1cl 86 | 87 | 如果你不喜欢发布更新功能,也不想每次检测到旧的发布号时都回答 "No",可以关闭此 88 | 功能 > 89 | 90 | let spec_chglog_never_increase_release = 1 91 | 92 | 93 | 一切顺利!! 94 | 95 | vim:tw=78:ts=8:ft=help:norl: 96 | -------------------------------------------------------------------------------- /doc/project.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/doc/project.txt -------------------------------------------------------------------------------- /doc/rileft.cnx: -------------------------------------------------------------------------------- 1 | *rileft.txt* For Vim version 7.3. 最近更新: 2010年8月 2 | 3 | 4 | VIM 参考手册 作者: Avner Lottem 5 | 更新: Nadim Shaikli 6 | 译者: Willis 7 | http://vimcdoc.sf.net 8 | 9 | 10 | Vim 的从右到左显示模式 *rileft* 11 | 12 | 13 | 这些功能是由 Avner Lottem 最早创建的: 14 | E-mail: alottem@iil.intel.com 15 | Phone: +972-4-8307322 16 | 17 | {Vi 没有这些功能} 18 | 19 | *E26* 20 | {仅当编译时加入 |+rightleft| 特性才可用} 21 | 22 | 23 | 简介 24 | ------------ 25 | 有些语言,例如阿拉伯语、波斯语、希伯来语 (还有其他),要求从右到左显示他们的文 26 | 字的能力。这些语言的文件以常规的方式储存,从右到左只是一个对显示功能的要求 (根 27 | 据 Unicode 规格的定义): 设定为从右到左的文件里字符在屏幕的显示应是从右到左。 28 | 29 | 双向显示 (英语缩写是 bidi) 是 Unicode 提供的对这些语言的一个完整解决方案。bidi 30 | 提供用户在同一个窗口同时显示从右到左和从左到右文本的能力。目前,为了简单起见, 31 | Vim 并没有提供 bidi,而只是提供一个方法来显示/输入/使用从右到左的语言。一个较 32 | 旧的混合解决方案是为每个字符 (或一组字符) 编码一个不同的方向。我们不支持这个方 33 | 案,因为这样的支持对于一个已有的编辑器来说不是简单的增加功能而已 (而且 Unicode 34 | 也不认可这种方案)。 35 | 36 | 特色 37 | ---------- 38 | o 就像原有的 Vim 一样,编辑从左到右的文件。 39 | 40 | o 在从右到左的窗口里察看和编辑文件。文件朝向是窗口的设置,所以可以在从左到右 41 | 和从右到左两种模式下同时察看同一个文件。(这有助于编辑混合两种文字的文件)。 42 | 43 | o 和原有的 Vim 兼容。几乎所有的功能都支持从右到左的模式 (参看下面的漏洞)。 44 | 45 | o 从反向的插入模式退回到文件里正确的位置 (如果可能的话)。 46 | 47 | o 不需要终端对从右到左能力的特别支持。这项改动完全独立于硬件。 48 | 49 | o 许多语言使用和需要从右到左的支持。这些语言可以相当容易地通过加入他们需要的 50 | 键盘映射和少量的代码改进得到支持。其中已经支持的语言包括 - |arabic.txt|、 51 | |farsi.txt| 和 |hebrew.txt|。 52 | 53 | 54 | 如果你有兴趣 ... 55 | -------------- 56 | 57 | o 启动 58 | ----------- 59 | + 'rightleft' ('rl') 把窗口朝向设为从右到左。 60 | + 'delcombine' ('deco'),布尔值,如果编辑 UTF-8 编码的语言,我们可以单独删 61 | 除合成用字符,它被附加 (superimpose) 于在它之前的字符之上 (一些语言要求如 62 | 此)。 63 | + 'rightleftcmd' ('rlc') 在某些模式 (比如: 搜索) 下,把命令行也设成从右到左 64 | 的朝向。 65 | 66 | o 反向输入 *ins-reverse* 67 | ---------------- 68 | 为便于最大限度地利用 'rightleft' 选项,我们可以允许反向插入。如果 'revins' 69 | (反向输入) 选项被打开,插入是反向的。这可以用来输入从右到左的文字。这时,输 70 | 入文字时,光标不动,文本向右移动。 删除光标下的字符,CTRL-W 和 CTRL-U 71 | 工作的方向也经过反转。无论 'backspace' 选项如何设置,、CTRL-W 和 CTRL-U 72 | 并不会在插入点开始处和行尾停住。 73 | 74 | 现在 (还) 没有反向替换模式。 75 | 76 | 如果设置了 "showmode" 选项,反向插入模式激活时,状态行会显示 77 | "-- REVERSE INSERT --"。 78 | 79 | o 在从右到左的窗口粘贴 80 | ---------------------------------- 81 | 如果用鼠标剪切文本,然后在从右到左的窗口中粘贴,文本会被反向,这时因为从剪 82 | 切缓冲区里得到的字符是从左到右的,而文件中的插入操作是从右到左的。要避免这 83 | 个问题,在粘贴前切换 'revins' 选项。 84 | 85 | 86 | 漏洞 87 | ---- 88 | o 在从右到左的窗口里不能正确处理 CTRL-A 和 CTRL-X 命令 (加和减)。 89 | 90 | o 在命令行中不支持反向插入和从右到左的模式。不过,编辑器功能并未减少,因为可 91 | 以在命令行上从左到右地输入键盘映射、缩写和搜索命令。 92 | 93 | o 从右到左的模式较慢,因为从右到左是 Vim 自己模拟而不是控制终端处理的。 94 | 95 | o 使用 Athena GUI 时,底部的滚动条工作方向是错的。这很难修正。 96 | 97 | o 如果 'rightleft' 和 'revins' 都打开,'textwidth' 不能工作。行不会自动回绕。 98 | 你只会得到一个很长的行。 99 | 100 | o 没有完整的双向显示 (bidi) 支持。 101 | 102 | 103 | vim:tw=78:ts=8:ft=help:norl: 104 | -------------------------------------------------------------------------------- /doc/russian.cnx: -------------------------------------------------------------------------------- 1 | *russian.txt* For Vim version 7.3. 最近更新: 2006年7月 2 | 3 | 4 | VIM 参考手册 by Vassily Ragosin 5 | 译者: Willis 6 | http://vimcdoc.sf.net 7 | 8 | 9 | Vim 中的俄罗斯语的本地化和支持 *russian* *Russian* 10 | 11 | 1. 简介 |russian-intro| 12 | 2. 俄语键盘映射 |russian-keymap| 13 | 3. 本地化 |russian-l18n| 14 | 4. 已知漏洞 |russian-issues| 15 | 16 | =============================================================================== 17 | 1. 简介 *russian-intro* 18 | 19 | Vim 的俄罗斯语支持已经相当完善。你可以像其他语言一样输入和查看俄语文字,无须特 20 | 别改变设置。 21 | 22 | =============================================================================== 23 | 2. 俄语键盘映射 *russian-keymap* 24 | 25 | 要切换语言,你可以使用系统自带的键盘切换工具。你也可以使用 Vim 发布中的某一个 26 | 俄语的键盘映射。例如, 27 | > 28 | :set keymap=russian-jcukenwin 29 | < 30 | 如果是后者,即使你没有系统俄语键盘或者一个独立的系统范围内的键盘设置,你还是可 31 | 以在语言间切换,参看 'keymap'。你也可以专门映射一个键来进行键盘切换。如果你选择 32 | 这么做,参看 |:map|。 33 | 34 | 为了你的方便起见,为了避免直接键盘切换,当你需要键入普通模式的命令时,你可以使 35 | 用 'langmap' 选项: 36 | > 37 | :set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ, 38 | фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz 39 | 40 | 这是 utf-8 编码的,如果你的 'encoding' 不是,你无法正常阅读。你也必须在一行内 41 | 输入整个命令,上面的文字换了行,但只是为了方便阅读起见。 42 | 43 | =============================================================================== 44 | 3. 本地化 *russian-l18n* 45 | 46 | 如果你希望把消息,帮助文件,菜单,和其他项目翻译成俄语,你需要安装 RuVim 语言 47 | 包。多种代码页的该软件可以从这里得到: 48 | 49 | http://www.sourceforge.net/projects/ruvim/ 50 | 51 | 请你确定你的 Vim 至少是 6.2.506 或以上的版本,并且如果要自动安装,请使用 ruvim 52 | 0.5 或以上的版本。Vim 必须在编译时加入 |+gettext| 特性,才能使用户界面的项目被 53 | 翻译。 54 | 55 | 下载了 RuVim 项目的软件包以后,把它解压到 $VIMRUNTIME 目录。如果你的 Vim 编译 56 | 时加入 |+multi_byte| 特性的话,我们建议使用 UTF-8 包。 57 | 58 | 要看到俄语的文档,请将 'helplang' 选项设为 "ru"。 59 | 60 | =============================================================================== 61 | 4. 已知漏洞 *russian-issues* 62 | 63 | -- 如果你在 Win32 控制台使用俄语的消息翻译,那你也许会看 "vim --help"、 64 | "vim --version" 命令和 Win32 控制窗口的标题使用了错误的代码页。这是由 GNU 65 | gettext 库的一个问题造成的,将来的 gettext 的发布也许能解决这个问题。 66 | 67 | =============================================================================== 68 | vim:tw=78:ts=8:ft=help:norl: 69 | -------------------------------------------------------------------------------- /doc/textile.txt: -------------------------------------------------------------------------------- 1 | *textile.txt* Textile for Vim Last Change: November 3, 2008 2 | 3 | =============================================================================== 4 | REQUIREMENTS *textile-requirements* 5 | 6 | - ruby - http://ruby-lang.org/ (seperate executable, not compiled in) 7 | - RedCloth - http://whytheluckystiff.net/ruby/redcloth/ 8 | 9 | Files with the extension *.textile will auto-detected. If editing a new file, 10 | or otherwise, run ":setf textile" to enable textile commands. 11 | 12 | 13 | ============================================================================== 14 | CHANGELOG *textile-changelog* 15 | 16 | 0.3 - Fixed keymappings in the documentation 17 | 0.2 - Added multiple colors for headers, and alternating colors for list 18 | items 19 | - Fixed error in the vim script for TextileRenderBufferToFile 20 | - Changed shortcut keys from \tp to \rp (render preview instead of 21 | textile preview, since it's file-type specific anyways) 22 | 0.1 - Initial Release 23 | 24 | ============================================================================== 25 | COMMANDS *textile-commands* 26 | 27 | h2. Commands 28 | 29 | :TextilePreview - Render the current buffer to a temp file, and open it in 30 | your web browser (OSX only) 31 | 32 | rp 33 | 34 | :TextileRenderTab - ... to a new tab 35 | 36 | rt 37 | 38 | :TextileRenderFile - ... to a file 39 | 40 | rf 41 | 42 | is \ by default, so rp == \rp 43 | 44 | ============================================================================== 45 | CREDITS *textile-credits* 46 | 47 | - "Dominic Mitchell":http://happygiraffe.net/: initial syntax highlighting 48 | - "Aaron Bieber":http://blog.aaronbieber.com/: improved syntax highlighting 49 | - "Tim Harper":http://tim.theenchanter.com/ : improved syntax highlighting, 50 | plugin 51 | 52 | vim:tw=78:noet:wrap:ts=2:expandtab:ft=help:norl: 53 | -------------------------------------------------------------------------------- /doc/vst.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/doc/vst.txt -------------------------------------------------------------------------------- /doc/workshop.cnx: -------------------------------------------------------------------------------- 1 | *workshop.txt* For Vim version 7.3. 最近更新: 2010年7月 2 | 3 | 4 | VIM 参考手册 作者: Gordon Prieur 5 | 译者: Willis 6 | http://vimcdoc.sf.net 7 | 8 | 9 | Sun Visual WorkShop 特性 *workshop* *workshop-support* 10 | 11 | 1. 简介 |workshop-intro| 12 | 2. 命令 |workshop-commands| 13 | 3. 编译 vim/gvim 以加入 WorkShop 支持 |workshop-compiling| 14 | 4. 为 Workshop 发布树配置 gvim |workshop-configure| 15 | 5. 获得最新版本的 XPM 库 |workshop-xpm| 16 | 17 | {Vi 无此功能} 18 | {仅在编译时加入 |+sun_workshop| 特性时才可用} 19 | 20 | ============================================================================== 21 | 1. 简介 *workshop-intro* 22 | 23 | Sun Visual Workshop 有一个 "供选择的编辑器" 功能,以便用户挑选他们喜欢的编辑器 24 | 调试程序。在 6.0 发布版本中,我们加入了 gvim 支持。 一个 workshop 调试会话包含 25 | 调试窗口和编辑窗口 (可能还有其他)。用户可以在编辑窗口执行众多调试指令,从而尽 26 | 量减少在窗口间切换的需要。 27 | 28 | Sun Visual Workshop 6 (也被称为 Forte Developer 6) 自带的 Vim 版本是 Vim 5.3。 29 | 我们这个版本的功能比 Visual Workshop 所带的 vim/gvim 更可靠。希望用 Vim 作为编 30 | 辑器的 VWS 用户应该自己编译这些源代码,并安装到自己的 workshop 发布树中。 31 | 32 | ============================================================================== 33 | 2. 命令 *workshop-commands* 34 | 35 | *:ws* *:wsverb* 36 | :ws[verb] verb 把 verb 传到 verb 执行程序。 37 | 38 | 把 verb 传到一个 workshop 函数,它收集参数并把该 verb 和相关数据通过 IPC 连接 39 | 发送给 workshop。 40 | 41 | ============================================================================== 42 | 3. 编译 vim/gvim 以加入 Workshop 支持 *workshop-compiling* 43 | 44 | 编译 vim 时,加入 FEAT_SUN_WORKSHOP 就可以打开所有必需的编译时选项,使 vim 可 45 | 以和 Visual WorkShop 协同使用。VMS 需要的功能用 VWS 发布版本提供的 Sun 编译器 46 | 编译通过并经过测试。这不是说这些功能不能用 gcc 编译或者运行,只不过我们不能保 47 | 证这一点。 48 | 49 | ============================================================================== 50 | 4. 为 Workshop 发布树配置 gvim *workshop-configure* 51 | 52 | 要使得支持 Sun Visual Workshop 6 的 gvim 能够编译,需要满足若干要求。 53 | 54 | o 应该用 VWS 的编译器而不是 gcc。我们既没有用 gcc 编译更没有测试过,因此不 55 | 能保证它能正常工作。 56 | 57 | o 必须提供自己的 XPM 库。下面 |workshop-xpm| 一节详述如何得到最新版 XPM。 58 | 59 | o 编辑 src 目录的 Makefile,删除 Sun Visual Workshop 行的注释。通过查找字 60 | 符串 FEAT_SUN_WORKSHOP,它们很容易找到。 61 | 62 | o 我们同时建议 gui 使用 Motif。这样 gvim 就会和 Sun Visual WorkShop 其他部 63 | 分有着相同的外观。 64 | 65 | 可用下面的配置行来 configure 带 Sun Visual WorkShop 支持的 vim: 66 | 67 | $ CC=cc configure --enable-workshop --enable-gui=motif \ 68 | -prefix=/contrib/contrib6/ 69 | 70 | VWS-install-dir 是 Sun Visual WorkShop 安装位置的主目录。缺省值是 71 | /opt/SUNWspro。vim 发布版本的安装一般要有 root 权限。然后,你还需要修改符号链 72 | 接 /bin/gvim,使之指向新安装目录里的 vim。 应是唯 73 | 一的版本字符串。我用的是 "vim" 加上等价于 version.h 中的 VIM_VERSION_SHORT 的 74 | 字符串。 75 | 76 | ============================================================================== 77 | 5. 获得最新的 XPM 库 *workshop-xpm* 78 | 79 | 支持 Motif 或 Athena 的 Vim 要显示图像,XPM 库是必需的。没有它,工具栏和标号 80 | (sign) 特性会被关闭。 81 | 82 | XPM 库由法国国立计算机科学与控制研究学院的 Arnaud Le Hors 提供,它可在 83 | http://cgit.freedesktop.org/xorg/lib/libXpm 下载。撰写此文时,它的最新版本是 84 | xpm-3.4k-solaris.tgz,这是一个 gzip 压缩的 tar 文件。如果你建立目录 85 | /usr/local/xpm 然后在那里解包,就可以直接使用 Makefile 里去掉注释的行而无须修 86 | 改。如果安装在别的目录,请修改 src/Makefile 里的 XPM_DIR。 87 | 88 | vim:tw=78:ts=8:ft=help:norl: 89 | -------------------------------------------------------------------------------- /extra/font/Consolas.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/extra/font/Consolas.ttf -------------------------------------------------------------------------------- /extra/font/Inconsolata.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/extra/font/Inconsolata.otf -------------------------------------------------------------------------------- /extra/jslint/jsl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/extra/jslint/jsl -------------------------------------------------------------------------------- /extra/jslint/jsl-sample.bat: -------------------------------------------------------------------------------- 1 | @jsl conf jsl.default.conf pauseatend 2 | -------------------------------------------------------------------------------- /extra/jslint/jsl-test.js: -------------------------------------------------------------------------------- 1 | // JavaScript Lint (http://www.JavaScriptLint.com/) 2 | // 3 | // This function is supposed to find the difference between two numbers, 4 | // but it has some bugs! (And JavaScript Lint can help you find them!) 5 | 6 | /*jsl:option explicit*/ 7 | function subtract(x,y) { 8 | // optimize for equal values 9 | if (x = y) { 10 | return 0; 11 | } 12 | 13 | // don't allow negative return value 14 | if (x < x) { 15 | return null; 16 | } 17 | 18 | // optimize for some common subtractions 19 | switch (y) { 20 | case 0: z = x; 21 | case 1: z = --x; 22 | return z; 23 | } 24 | 25 | // finally, resort to actual subtraction! 26 | return; x-y; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /extra/jslint/jsl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/extra/jslint/jsl.exe -------------------------------------------------------------------------------- /extra/session.vim: -------------------------------------------------------------------------------- 1 | let SessionLoad = 1 2 | if &cp | set nocp | endif 3 | let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 4 | let v:this_session=expand(":p") 5 | silent only 6 | exe "cd " . escape(expand(":p:h"), ' ') 7 | if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' 8 | let s:wipebuf = bufnr('%') 9 | endif 10 | set shortmess=aoO 11 | args ~/.bash_profile 12 | set splitbelow splitright 13 | set nosplitbelow 14 | set nosplitright 15 | wincmd t 16 | set winheight=1 winwidth=1 17 | tabnew 18 | set splitbelow splitright 19 | set nosplitbelow 20 | set nosplitright 21 | wincmd t 22 | set winheight=1 winwidth=1 23 | tabnext 2 24 | if exists('s:wipebuf') 25 | silent exe 'bwipe ' . s:wipebuf 26 | endif 27 | unlet! s:wipebuf 28 | set winheight=1 winwidth=20 shortmess=atI 29 | let s:sx = expand(":p:r")."x.vim" 30 | if file_readable(s:sx) 31 | exe "source " . fnameescape(s:sx) 32 | endif 33 | let &so = s:so_save | let &siso = s:siso_save 34 | doautoall SessionLoadPost 35 | unlet SessionLoad 36 | " vim: set ft=vim : 37 | -------------------------------------------------------------------------------- /ftdetect/coffee.vim: -------------------------------------------------------------------------------- 1 | " Language: CoffeeScript 2 | " Maintainer: Mick Koch 3 | " URL: http://github.com/kchmck/vim-coffee-script 4 | " License: WTFPL 5 | 6 | autocmd BufNewFile,BufRead *.coffee set filetype=coffee 7 | autocmd BufNewFile,BufRead *Cakefile set filetype=coffee 8 | autocmd BufNewFile,BufRead *.coffeekup set filetype=coffee 9 | -------------------------------------------------------------------------------- /ftdetect/eco.vim: -------------------------------------------------------------------------------- 1 | autocmd BufNewFile,BufRead *.eco set filetype=eco 2 | -------------------------------------------------------------------------------- /ftdetect/gofiletype.vim: -------------------------------------------------------------------------------- 1 | " We take care to preserve the user's fileencodings and fileformats, 2 | " because those settings are global (not buffer local), yet we want 3 | " to override them for loading Go files, which are defined to be UTF-8. 4 | let s:current_fileformats = '' 5 | let s:current_fileencodings = '' 6 | 7 | " define fileencodings to open as utf-8 encoding even if it's ascii. 8 | function! s:gofiletype_pre() 9 | let s:current_fileformats = &g:fileformats 10 | let s:current_fileencodings = &g:fileencodings 11 | set fileencodings=utf-8 fileformats=unix 12 | setlocal filetype=go 13 | endfunction 14 | 15 | " restore fileencodings as others 16 | function! s:gofiletype_post() 17 | let &g:fileformats = s:current_fileformats 18 | let &g:fileencodings = s:current_fileencodings 19 | endfunction 20 | 21 | au BufNewFile *.go setlocal filetype=go fileencoding=utf-8 fileformat=unix 22 | au BufRead *.go call s:gofiletype_pre() 23 | au BufReadPost *.go call s:gofiletype_post() 24 | -------------------------------------------------------------------------------- /ftdetect/jade.vim: -------------------------------------------------------------------------------- 1 | " Jade 2 | autocmd BufNewFile,BufReadPost *.jade set filetype=jade 3 | -------------------------------------------------------------------------------- /ftdetect/less.vim: -------------------------------------------------------------------------------- 1 | autocmd BufNewFile,BufRead *.less setf less 2 | -------------------------------------------------------------------------------- /ftdetect/swift.vim: -------------------------------------------------------------------------------- 1 | " Language: Swift 2 | " Maintainer: toyama satoshi 3 | " URL: http://github.com/toyamarinyon/vim-swift 4 | " License: GPL 5 | 6 | autocmd BufNewFile,BufRead *.swift set filetype=swift 7 | -------------------------------------------------------------------------------- /ftplugin/autotags.vim: -------------------------------------------------------------------------------- 1 | function! GET_UP_PATH(dir) 2 | let pos=len(a:dir)-1 3 | while pos>0 4 | if (a:dir[pos]=="/" ) 5 | return strpart(a:dir,0,pos) 6 | endif 7 | let pos=pos-1 8 | endwhile 9 | return "" 10 | endfunction 11 | 12 | "设置相关tags 13 | function! s:SET_TAGS() 14 | let dir = expand("%:p:h") "获得源文件路径 15 | let dir = substitute(dir, '\', '/', 'g') 16 | "在路径上递归向上查找tags文件 17 | while dir!="" 18 | if findfile("tags",dir ) !="" 19 | "找到了就加入到tags 20 | exec "set tags+=" . dir . "/tags" 21 | endif 22 | "得到上级路径 23 | let dir=GET_UP_PATH(dir) 24 | endwhile 25 | endfunction 26 | 27 | 28 | " Set this once, globally. 29 | if !exists("g:pythonpath") 30 | if executable("python") 31 | try 32 | python << EOF 33 | import sys, vim 34 | pythonpath = sys.path 35 | pythonpath = ",".join(pythonpath) 36 | pythonpath = pythonpath.replace('\\', '/') 37 | vim.command("let g:pythonpath = '%s'" % pythonpath) 38 | EOF 39 | "let perlpath = substitute(perlpath,',.$',',,','') 40 | catch /E145:/ 41 | let g:pythonpath = ".,," 42 | endtry 43 | else 44 | " If we can't call perl to get its path, just default to using the 45 | " current directory and the directory of the current file. 46 | let g:pythonpath = ".,," 47 | endif 48 | endif 49 | 50 | function! s:SetPythonPath() 51 | let dir = expand("%:p:h") "获得源文件路径 52 | let dir = substitute(dir, '\', '/', 'g') 53 | "在路径上递归向上查找tags文件 54 | while dir!="" 55 | if findfile("__init__",dir ) =="" 56 | "找到了就加入到path,由于目录包含空格时出错,使用let 57 | if stridx(&path, dir) == -1 58 | "路径的作用域问题 59 | "let &l:path = &path . "," . dir 60 | let &l:path = g:pythonpath . "," . dir 61 | endif 62 | break 63 | endif 64 | "得到上级路径 65 | let dir=GET_UP_PATH(dir) 66 | endwhile 67 | endfunction 68 | 69 | autocmd BufEnter * call s:SET_TAGS() 70 | autocmd BufEnter *.py call s:SetPythonPath() 71 | -------------------------------------------------------------------------------- /ftplugin/django.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Django template 3 | " Maintainer: Dave Hodder 4 | " Last Change: 2009 Jan 12 5 | 6 | " matchit.vim (extended "%" matching) contributed by Michael Brown. 7 | " Borrowed from html.vim Thanks to Johannes Zellner and Benji Fisher. 8 | if exists("loaded_matchit") 9 | let b:match_ignorecase = 1 10 | let b:match_skip = 's:Comment' 11 | let b:match_words = '<:>,' . 12 | \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . 13 | \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . 14 | \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>,' . 15 | \ '{% *if .*%}:{% *else *%}:{% *endif *%},' . 16 | \ '{% *ifequal .*%}:{% *else *%}:{% *endifequal *%},' . 17 | \ '{% *ifnotequal .*%}:{% *else *%}:{% *endifnotequal *%},' . 18 | \ '{% *ifchanged .*%}:{% *else *%}:{% *endifchanged *%},' . 19 | \ '{% *for .*%}:{% *endfor *%},' . 20 | \ '{% *with .*%}:{% *endwith *%},' . 21 | \ '{% *comment .*%}:{% *endcomment *%},' . 22 | \ '{% *block .*%}:{% *endblock *%},' . 23 | \ '{% *filter .*%}:{% *endfilter *%},' . 24 | \ '{% *spaceless .*%}:{% *endspaceless *%}' 25 | endif 26 | -------------------------------------------------------------------------------- /ftplugin/go/fmt.vim: -------------------------------------------------------------------------------- 1 | " Copyright 2011 The Go Authors. All rights reserved. 2 | " Use of this source code is governed by a BSD-style 3 | " license that can be found in the LICENSE file. 4 | " 5 | " fmt.vim: Vim command to format Go files with gofmt. 6 | " 7 | " This filetype plugin add a new commands for go buffers: 8 | " 9 | " :Fmt 10 | " 11 | " Filter the current Go buffer through gofmt. 12 | " It tries to preserve cursor position and avoids 13 | " replacing the buffer with stderr output. 14 | " 15 | 16 | command! -buffer Fmt call s:GoFormat() 17 | 18 | function! s:GoFormat() 19 | let view = winsaveview() 20 | silent %!gofmt 21 | if v:shell_error 22 | let errors = [] 23 | for line in getline(1, line('$')) 24 | let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)') 25 | if !empty(tokens) 26 | call add(errors, {"filename": @%, 27 | \"lnum": tokens[2], 28 | \"col": tokens[3], 29 | \"text": tokens[4]}) 30 | endif 31 | endfor 32 | if empty(errors) 33 | % | " Couldn't detect gofmt error format, output errors 34 | endif 35 | undo 36 | if !empty(errors) 37 | call setloclist(0, errors, 'r') 38 | endif 39 | echohl Error | echomsg "Gofmt returned error" | echohl None 40 | endif 41 | call winrestview(view) 42 | endfunction 43 | 44 | " vim:ts=4:sw=4:et 45 | -------------------------------------------------------------------------------- /ftplugin/go/godoc.vim: -------------------------------------------------------------------------------- 1 | " Copyright 2011 The Go Authors. All rights reserved. 2 | " Use of this source code is governed by a BSD-style 3 | " license that can be found in the LICENSE file. 4 | " 5 | " godoc.vim: Vim command to see godoc. 6 | 7 | if exists("b:did_ftplugin") 8 | finish 9 | endif 10 | 11 | silent! nmap K (godoc-keyword) 12 | 13 | " vim:ts=4:sw=4:et 14 | -------------------------------------------------------------------------------- /ftplugin/html/HTML.vim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/ftplugin/html/HTML.vim -------------------------------------------------------------------------------- /ftplugin/html_snip_helper.vim: -------------------------------------------------------------------------------- 1 | " Helper function for (x)html snippets 2 | if exists('s:did_snip_helper') || &cp || !exists('loaded_snips') 3 | finish 4 | endif 5 | let s:did_snip_helper = 1 6 | 7 | " Automatically closes tag if in xhtml 8 | fun! Close() 9 | return stridx(&ft, 'xhtml') == -1 ? '' : ' /' 10 | endf 11 | -------------------------------------------------------------------------------- /ftplugin/jade.vim: -------------------------------------------------------------------------------- 1 | " Vim filetype plugin 2 | " Language: Jade 3 | " Maintainer: Joshua Borton 4 | " Credits: Tim Pope 5 | 6 | " Only do this when not done yet for this buffer 7 | if exists("b:did_ftplugin") 8 | finish 9 | endif 10 | 11 | let s:save_cpo = &cpo 12 | set cpo-=C 13 | 14 | " Define some defaults in case the included ftplugins don't set them. 15 | let s:undo_ftplugin = "" 16 | let s:browsefilter = "All Files (*.*)\t*.*\n" 17 | let s:match_words = "" 18 | 19 | runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim 20 | unlet! b:did_ftplugin 21 | 22 | " Override our defaults if these were set by an included ftplugin. 23 | if exists("b:undo_ftplugin") 24 | let s:undo_ftplugin = b:undo_ftplugin 25 | unlet b:undo_ftplugin 26 | endif 27 | if exists("b:browsefilter") 28 | let s:browsefilter = b:browsefilter 29 | unlet b:browsefilter 30 | endif 31 | if exists("b:match_words") 32 | let s:match_words = b:match_words 33 | unlet b:match_words 34 | endif 35 | 36 | " Change the browse dialog on Win32 to show mainly Haml-related files 37 | if has("gui_win32") 38 | let b:browsefilter="Jade Files (*.jade)\t*.jade\n" . s:browsefilter 39 | endif 40 | 41 | " Load the combined list of match_words for matchit.vim 42 | if exists("loaded_matchit") 43 | let b:match_words = s:match_words 44 | endif 45 | 46 | setlocal comments=://-,:// commentstring=//\ %s 47 | 48 | setlocal suffixesadd+=.jade 49 | 50 | let b:undo_ftplugin = "setl cms< com< " 51 | \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin 52 | 53 | let &cpo = s:save_cpo 54 | 55 | " vim:set sw=2: 56 | -------------------------------------------------------------------------------- /ftplugin/less.vim: -------------------------------------------------------------------------------- 1 | " Vim filetype plugin 2 | " Language: LessCSS 3 | " Author: Tim Pope 4 | " Maintainer: Leonard Ehrenfried 5 | " Last Change: 2011 Sep 30 6 | 7 | " Only do this when not done yet for this buffer 8 | if exists("b:did_ftplugin") 9 | finish 10 | endif 11 | let b:did_ftplugin = 1 12 | 13 | let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<" 14 | 15 | setlocal commentstring=//\ %s 16 | setlocal define=^\\s*\\%(@mixin\\\|=\\) 17 | setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','') 18 | setlocal omnifunc=csscomplete#CompleteCSS 19 | setlocal suffixesadd=.less 20 | 21 | let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\=' 22 | 23 | " vim:set sw=2: 24 | -------------------------------------------------------------------------------- /ftplugin/objc_cocoa_mappings.vim: -------------------------------------------------------------------------------- 1 | " File: objc_cocoa_mappings.vim 2 | " Author: Michael Sanders (msanders42 [at] gmail [dot] com) 3 | " Description: Sets up mappings for cocoa.vim. 4 | " Last Updated: December 26, 2009 5 | 6 | if exists('b:cocoa_proj') || &cp || version < 700 7 | finish 8 | endif 9 | let b:cocoa_proj = fnameescape(globpath(expand(':p:h'), '*.xcodeproj')) 10 | " Search a few levels up to see if we can find the project file 11 | if empty(b:cocoa_proj) 12 | let b:cocoa_proj = fnameescape(globpath(expand(':p:h:h'), '*.xcodeproj')) 13 | 14 | if empty(b:cocoa_proj) 15 | let b:cocoa_proj = fnameescape(globpath(expand(':p:h:h:h'), '*.xcodeproj')) 16 | if empty(b:cocoa_proj) 17 | let b:cocoa_proj = fnameescape(globpath(expand(':p:h:h:h:h'), '*.xcodeproj')) 18 | endif 19 | endif 20 | endif 21 | let g:x = b:cocoa_proj 22 | 23 | com! -buffer ListMethods call objc#method_list#Activate(1) 24 | com! -buffer -nargs=? -complete=customlist,objc#method_builder#Completion BuildMethods call objc#method_builder#Build('') 25 | com! -buffer -nargs=? -complete=custom,objc#man#Completion CocoaDoc call objc#man#ShowDoc('') 26 | com! -buffer -nargs=? Alternate call AlternateFile() 27 | 28 | let objc_man_key = exists('objc_man_key') ? objc_man_key : 'K' 29 | exe 'nn '.objc_man_key.' :call objc#man#ShowDoc()' 30 | 31 | nn A :calAlternateFile() 32 | 33 | " Mimic some of Xcode's mappings. 34 | nn :wcalBuildAnd('launch') 35 | nn :wcalXcodeRun('build') 36 | nn :wcalXcodeRun('clean') 37 | " TODO: Add this 38 | " nn :wcalBuildAnd('debug') 39 | nn :calAlternateFile() 40 | nn :call system('open -a Xcode '.b:cocoa_proj) 41 | nn :ListMethods 42 | nm 43 | ino 44 | nn I// 45 | nn << 46 | nn >> 47 | 48 | if exists('*s:AlternateFile') | finish | endif 49 | 50 | " Switch from header file to implementation file (and vice versa). 51 | fun s:AlternateFile() 52 | let path = expand('%:p:r').'.' 53 | let extensions = expand('%:e') == 'h' ? ['m', 'c', 'cpp'] : ['h'] 54 | if !s:ReadableExtensionIn(path, extensions) 55 | echoh ErrorMsg | echo 'Alternate file not readable.' | echoh None 56 | endif 57 | endf 58 | 59 | " Returns true and switches to file if file with extension in any of 60 | " |extensions| is readable, or returns false if not. 61 | fun s:ReadableExtensionIn(path, extensions) 62 | for ext in a:extensions 63 | if filereadable(a:path.ext) 64 | exe 'e'.fnameescape(a:path.ext) 65 | return 1 66 | endif 67 | endfor 68 | return 0 69 | endf 70 | 71 | " Opens Xcode and runs Applescript command. 72 | fun s:XcodeRun(command) 73 | call system("open -a Xcode ".b:cocoa_proj." && osascript -e 'tell app " 74 | \ .'"Xcode" to '.a:command."' &") 75 | endf 76 | 77 | fun s:BuildAnd(command) 78 | call system("open -a Xcode ".b:cocoa_proj." && osascript -e 'tell app " 79 | \ ."\"Xcode\"' -e '" 80 | \ .'set target_ to project of active project document ' 81 | \ ."' -e '" 82 | \ .'if (build target_) starts with "Build succeeded" then ' 83 | \ .a:command.' target_' 84 | \ ."' -e 'end tell'") 85 | endf 86 | -------------------------------------------------------------------------------- /ftplugin/python/README.rst: -------------------------------------------------------------------------------- 1 | pyflakes-vim 2 | ============ 3 | 4 | A Vim plugin for checking Python code on the fly. 5 | 6 | PyFlakes catches common Python errors like mistyping a variable name or 7 | accessing a local before it is bound, and also gives warnings for things like 8 | unused imports. 9 | 10 | pyflakes-vim uses the output from PyFlakes to highlight errors in your code. 11 | To locate errors quickly, use quickfix_ commands like :cc. 12 | 13 | Make sure to check vim.org_ for the latest updates. 14 | 15 | .. _pyflakes.vim: http://www.vim.org/scripts/script.php?script_id=2441 16 | .. _vim.org: http://www.vim.org/scripts/script.php?script_id=2441 17 | .. _quickfix: http://vimdoc.sourceforge.net/htmldoc/quickfix.html#quickfix 18 | 19 | Quick Installation 20 | ------------------ 21 | 22 | 1. Make sure your ``.vimrc`` has:: 23 | 24 | filetype on " enables filetype detection 25 | filetype plugin on " enables filetype specific plugins 26 | 27 | 2. Download the latest release_. 28 | 29 | 3. If you're using pathogen_, unzip the contents of ``pyflakes-vim.zip`` into 30 | its own bundle directory, i.e. into ``~/.vim/bundle/pyflakes-vim/``. 31 | 32 | Otherwise unzip ``pyflakes.vim`` and the ``pyflakes`` directory into 33 | ``~/.vim/ftplugin/python`` (or somewhere similar on your 34 | `runtime path`_ that will be sourced for Python files). 35 | 36 | .. _release: http://www.vim.org/scripts/script.php?script_id=2441 37 | .. _pathogen: http://www.vim.org/scripts/script.php?script_id=2332 38 | .. _runtime path: http://vimdoc.sourceforge.net/htmldoc/options.html#'runtimepath' 39 | 40 | Running from source 41 | ------------------- 42 | 43 | If you're running pyflakes-vim "from source," you'll need the PyFlakes library 44 | on your PYTHONPATH somewhere. (It is included in the vim.org zipfile.) I recommend 45 | getting my PyFlakes_ fork, which retains column number information, giving more 46 | specific error locations. 47 | 48 | .. _vim.org: http://www.vim.org/scripts/script.php?script_id=2441 49 | .. _PyFlakes: http://github.com/kevinw/pyflakes 50 | 51 | Hacking 52 | ------- 53 | 54 | :: 55 | 56 | git clone git://github.com/kevinw/pyflakes-vim.git 57 | cd pyflakes-vim 58 | git clone git://github.com/kevinw/pyflakes.git 59 | 60 | Options 61 | ------- 62 | 63 | Set this option to you vimrc file to disable quickfix support:: 64 | 65 | let g:pyflakes_use_quickfix = 0 66 | 67 | The value is set to 1 by default. 68 | 69 | TODO 70 | ---- 71 | * signs_ support (show warning and error icons to left of the buffer area) 72 | * configuration variables 73 | * parse or intercept useful output from the warnings module 74 | 75 | .. _signs: http://www.vim.org/htmldoc/sign.html 76 | 77 | Changelog 78 | --------- 79 | 80 | Please see http://www.vim.org/scripts/script.php?script_id=2441 for a history of 81 | all changes. 82 | 83 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2005 Divmod, Inc., http://www.divmod.com/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/NEWS.txt: -------------------------------------------------------------------------------- 1 | 0.4.0 (2009-11-25): 2 | - Fix reporting for certain SyntaxErrors which lack line number 3 | information. 4 | - Check for syntax errors more rigorously. 5 | - Support checking names used with the class decorator syntax in versions 6 | of Python which have it. 7 | - Detect local variables which are bound but never used. 8 | - Handle permission errors when trying to read source files. 9 | - Handle problems with the encoding of source files. 10 | - Support importing dotted names so as not to incorrectly report them as 11 | redefined unused names. 12 | - Support all forms of the with statement. 13 | - Consider static `__all__` definitions and avoid reporting unused names 14 | if the names are listed there. 15 | - Fix incorrect checking of class names with respect to the names of their 16 | bases in the class statement. 17 | - Support the `__path__` global in `__init__.py`. 18 | 19 | 0.3.0 (2009-01-30): 20 | - Display more informative SyntaxError messages. 21 | - Don't hang flymake with unmatched triple quotes (only report a single 22 | line of source for a multiline syntax error). 23 | - Recognize __builtins__ as a defined name. 24 | - Improve pyflakes support for python versions 2.3-2.5 25 | - Support for if-else expressions and with statements. 26 | - Warn instead of error on non-existant file paths. 27 | - Check for __future__ imports after other statements. 28 | - Add reporting for some types of import shadowing. 29 | - Improve reporting of unbound locals 30 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/README.rst: -------------------------------------------------------------------------------- 1 | pyflakes 2 | ======== 3 | 4 | This version of PyFlakes_ has been improved to use Python's newer ``ast`` 5 | module, instead of ``compiler``. So code checking happens faster, and will stay 6 | up to date with new language changes. 7 | 8 | .. _PyFlakes: http://http://www.divmod.org/trac/wiki/DivmodPyflakes 9 | 10 | TODO 11 | ---- 12 | 13 | Importing several modules from the same package results in unnecessary warnings: 14 | 15 | :: 16 | 17 | import a.b 18 | import a.c # Redefinition of unused "a" from line 1 19 | 20 | The following construct for defining a function differently depending on some 21 | condition results in a redefinition warning: 22 | 23 | :: 24 | 25 | if some_condition: 26 | def foo(): do_foo() 27 | else: 28 | def foo(): do_bar() # redefinition of function 'foo' from line 2 29 | 30 | IDE Integration 31 | --------------- 32 | 33 | * vim: pyflakes-vim_ 34 | 35 | .. _pyflakes-vim: http://github.com/kevinw/pyflakes-vim 36 | 37 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/TODO: -------------------------------------------------------------------------------- 1 | - Check for methods that override other methods except that they vary by case. 2 | - assign/increment + unbound local error not caught 3 | def foo(): 4 | bar = 5 5 | def meep(): 6 | bar += 2 7 | meep() 8 | print bar 9 | 10 | print foo() 11 | 12 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/bin/pyflakes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from pyflakes.scripts.pyflakes import main 4 | main() 5 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/pyflakes/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | __version__ = '0.4.0' 3 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/pyflakes/messages.py: -------------------------------------------------------------------------------- 1 | # (c) 2005 Divmod, Inc. See LICENSE file for details 2 | 3 | class Message(object): 4 | message = '' 5 | message_args = () 6 | def __init__(self, filename, loc, use_column=True): 7 | self.filename = filename 8 | self.lineno = loc.lineno 9 | self.col = getattr(loc, 'col_offset', None) if use_column else None 10 | 11 | def __str__(self): 12 | return '%s:%s: %s' % (self.filename, self.lineno, self.message % self.message_args) 13 | 14 | 15 | class UnusedImport(Message): 16 | message = '%r imported but unused' 17 | def __init__(self, filename, loc, name): 18 | Message.__init__(self, filename, loc, use_column=False) 19 | self.message_args = (name,) 20 | 21 | 22 | class RedefinedWhileUnused(Message): 23 | message = 'redefinition of unused %r from line %r' 24 | def __init__(self, filename, loc, name, orig_loc): 25 | Message.__init__(self, filename, loc) 26 | self.message_args = (name, orig_loc.lineno) 27 | 28 | 29 | class ImportShadowedByLoopVar(Message): 30 | message = 'import %r from line %r shadowed by loop variable' 31 | def __init__(self, filename, loc, name, orig_loc): 32 | Message.__init__(self, filename, loc) 33 | self.message_args = (name, orig_loc.lineno) 34 | 35 | 36 | class ImportStarUsed(Message): 37 | message = "'from %s import *' used; unable to detect undefined names" 38 | def __init__(self, filename, loc, modname): 39 | Message.__init__(self, filename, loc) 40 | self.message_args = (modname,) 41 | 42 | 43 | class UndefinedName(Message): 44 | message = 'undefined name %r' 45 | def __init__(self, filename, loc, name): 46 | Message.__init__(self, filename, loc) 47 | self.message_args = (name,) 48 | 49 | 50 | 51 | class UndefinedExport(Message): 52 | message = 'undefined name %r in __all__' 53 | def __init__(self, filename, loc, name): 54 | Message.__init__(self, filename, loc) 55 | self.message_args = (name,) 56 | 57 | 58 | 59 | class UndefinedLocal(Message): 60 | message = "local variable %r (defined in enclosing scope on line %r) referenced before assignment" 61 | def __init__(self, filename, loc, name, orig_loc): 62 | Message.__init__(self, filename, loc) 63 | self.message_args = (name, orig_loc.lineno) 64 | 65 | 66 | class DuplicateArgument(Message): 67 | message = 'duplicate argument %r in function definition' 68 | def __init__(self, filename, loc, name): 69 | Message.__init__(self, filename, loc) 70 | self.message_args = (name,) 71 | 72 | 73 | class RedefinedFunction(Message): 74 | message = 'redefinition of function %r from line %r' 75 | def __init__(self, filename, loc, name, orig_loc): 76 | Message.__init__(self, filename, loc) 77 | self.message_args = (name, orig_loc.lineno) 78 | 79 | 80 | class LateFutureImport(Message): 81 | message = 'future import(s) %r after other statements' 82 | def __init__(self, filename, loc, names): 83 | Message.__init__(self, filename, loc) 84 | self.message_args = (names,) 85 | 86 | 87 | class UnusedVariable(Message): 88 | """ 89 | Indicates that a variable has been explicity assigned to but not actually 90 | used. 91 | """ 92 | 93 | message = 'local variable %r is assigned to but never used' 94 | def __init__(self, filename, loc, names): 95 | Message.__init__(self, filename, loc) 96 | self.message_args = (names,) 97 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/pyflakes/scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/ftplugin/python/pyflakes/pyflakes/scripts/__init__.py -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/pyflakes/scripts/pyflakes.py: -------------------------------------------------------------------------------- 1 | 2 | """ 3 | Implementation of the command-line I{pyflakes} tool. 4 | """ 5 | 6 | import sys 7 | import os 8 | import _ast 9 | 10 | checker = __import__('pyflakes.checker').checker 11 | 12 | def check(codeString, filename): 13 | """ 14 | Check the Python source given by C{codeString} for flakes. 15 | 16 | @param codeString: The Python source to check. 17 | @type codeString: C{str} 18 | 19 | @param filename: The name of the file the source came from, used to report 20 | errors. 21 | @type filename: C{str} 22 | 23 | @return: The number of warnings emitted. 24 | @rtype: C{int} 25 | """ 26 | # First, compile into an AST and handle syntax errors. 27 | try: 28 | tree = compile(codeString, filename, "exec", _ast.PyCF_ONLY_AST) 29 | except SyntaxError, value: 30 | msg = value.args[0] 31 | 32 | (lineno, offset, text) = value.lineno, value.offset, value.text 33 | 34 | # If there's an encoding problem with the file, the text is None. 35 | if text is None: 36 | # Avoid using msg, since for the only known case, it contains a 37 | # bogus message that claims the encoding the file declared was 38 | # unknown. 39 | print >> sys.stderr, "%s: problem decoding source" % (filename, ) 40 | else: 41 | line = text.splitlines()[-1] 42 | 43 | if offset is not None: 44 | offset = offset - (len(text) - len(line)) 45 | 46 | print >> sys.stderr, '%s:%d: %s' % (filename, lineno, msg) 47 | print >> sys.stderr, line 48 | 49 | if offset is not None: 50 | print >> sys.stderr, " " * offset, "^" 51 | 52 | return 1 53 | else: 54 | # Okay, it's syntactically valid. Now check it. 55 | w = checker.Checker(tree, filename) 56 | w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno)) 57 | for warning in w.messages: 58 | print warning 59 | return len(w.messages) 60 | 61 | 62 | def checkPath(filename): 63 | """ 64 | Check the given path, printing out any warnings detected. 65 | 66 | @return: the number of warnings printed 67 | """ 68 | try: 69 | return check(file(filename, 'U').read() + '\n', filename) 70 | except IOError, msg: 71 | print >> sys.stderr, "%s: %s" % (filename, msg.args[1]) 72 | return 1 73 | 74 | 75 | def main(): 76 | warnings = 0 77 | args = sys.argv[1:] 78 | if args: 79 | for arg in args: 80 | if os.path.isdir(arg): 81 | for dirpath, dirnames, filenames in os.walk(arg): 82 | for filename in filenames: 83 | if filename.endswith('.py'): 84 | warnings += checkPath(os.path.join(dirpath, filename)) 85 | else: 86 | warnings += checkPath(arg) 87 | else: 88 | warnings += check(sys.stdin.read(), '') 89 | 90 | raise SystemExit(warnings > 0) 91 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/pyflakes/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/ftplugin/python/pyflakes/pyflakes/test/__init__.py -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/pyflakes/test/harness.py: -------------------------------------------------------------------------------- 1 | 2 | import textwrap 3 | import _ast 4 | 5 | from twisted.trial import unittest 6 | 7 | from pyflakes import checker 8 | 9 | 10 | class Test(unittest.TestCase): 11 | 12 | def flakes(self, input, *expectedOutputs, **kw): 13 | ast = compile(textwrap.dedent(input), "", "exec", 14 | _ast.PyCF_ONLY_AST) 15 | w = checker.Checker(ast, **kw) 16 | outputs = [type(o) for o in w.messages] 17 | expectedOutputs = list(expectedOutputs) 18 | outputs.sort() 19 | expectedOutputs.sort() 20 | self.assert_(outputs == expectedOutputs, '''\ 21 | for input: 22 | %s 23 | expected outputs: 24 | %s 25 | but got: 26 | %s''' % (input, repr(expectedOutputs), '\n'.join([str(o) for o in w.messages]))) 27 | return w 28 | -------------------------------------------------------------------------------- /ftplugin/python/pyflakes/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # (c) 2005-2009 Divmod, Inc. See LICENSE file for details 3 | 4 | from distutils.core import setup 5 | 6 | setup( 7 | name="pyflakes", 8 | license="MIT", 9 | version="0.4.0", 10 | description="passive checker of Python programs", 11 | author="Phil Frost", 12 | maintainer="Moe Aboulkheir", 13 | maintainer_email="moe@divmod.com", 14 | url="http://www.divmod.org/trac/wiki/DivmodPyflakes", 15 | packages=["pyflakes", "pyflakes.scripts", "pyflakes.test"], 16 | scripts=["bin/pyflakes"], 17 | long_description="""Pyflakes is program to analyze Python programs and detect various errors. It 18 | works by parsing the source file, not importing it, so it is safe to use on 19 | modules with side effects. It's also much faster.""", 20 | classifiers=[ 21 | "Development Status :: 6 - Mature", 22 | "Environment :: Console", 23 | "Intended Audience :: Developers", 24 | "License :: OSI Approved :: MIT License", 25 | "Programming Language :: Python", 26 | "Topic :: Software Development", 27 | "Topic :: Utilities", 28 | ]) 29 | -------------------------------------------------------------------------------- /ftplugin/textile.vim: -------------------------------------------------------------------------------- 1 | " textile.vim 2 | " 3 | " Tim Harper (tim.theenchanter.com) 4 | 5 | command! -nargs=0 TextileRenderFile call TextileRenderBufferToFile() 6 | command! -nargs=0 TextileRenderTab call TextileRenderBufferToTab() 7 | command! -nargs=0 TextilePreview call TextileRenderBufferToPreview() 8 | noremap rp :TextilePreview 9 | noremap rf :TextileRenderFile 10 | noremap rt :TextileRenderTab 11 | setlocal ignorecase 12 | setlocal wrap 13 | setlocal lbr 14 | 15 | function! TextileRender(lines) 16 | if (system('which ruby') == "") 17 | throw "Could not find ruby!" 18 | end 19 | 20 | let text = join(a:lines, "\n") 21 | let html = system("ruby -e \"def e(msg); puts msg; exit 1; end; begin; require 'rubygems'; rescue LoadError; e('rubygems not found'); end; begin; require 'redcloth'; rescue LoadError; e('RedCloth gem not installed. Run this from the terminal: sudo gem install RedCloth'); end; puts(RedCloth.new(\\$stdin.read).to_html(:textile))\"", text) 22 | return html 23 | endfunction 24 | 25 | function! TextileRenderFile(lines, filename) 26 | let html = TextileRender(getbufline(bufname("%"), 1, '$')) 27 | let html = "" . bufname("%") . "\n" . html . "\n" 28 | return writefile(split(html, "\n"), a:filename) 29 | endfunction 30 | 31 | function! TextileRenderBufferToPreview() 32 | let filename = "/tmp/textile-preview.html" 33 | call TextileRenderFile(getbufline(bufname("%"), 1, '$'), filename) 34 | 35 | " Modify this line to make it compatible on other platforms 36 | call system("open -a Safari ". filename) 37 | endfunction 38 | 39 | function! TextileRenderBufferToFile() 40 | let filename = input("Filename:", substitute(bufname("%"), "textile$", "html", ""), "file") 41 | call TextileRenderFile(getbufline(bufname("%"), 1, '$'), filename) 42 | echo "Rendered to '" . filename . "'" 43 | endfunction 44 | 45 | function! TextileRenderBufferToTab() 46 | let html = TextileRender(getbufline(bufname("%"), 1, '$')) 47 | tabnew 48 | call append("^", split(html, "\n")) 49 | set syntax=html 50 | endfunction 51 | 52 | -------------------------------------------------------------------------------- /gvimrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/gvimrc -------------------------------------------------------------------------------- /indent/IndentAnything_html.vim: -------------------------------------------------------------------------------- 1 | 2 | " Source the standard indentation file, since we only want to adjust the 3 | " default indentation. 4 | sou $VIMRUNTIME/indent/html.vim 5 | 6 | " Set the default indentation to be that of the standard indent file. 7 | let b:defaultIndentExpr = &indentexpr 8 | 9 | " Use IndentAnything 10 | setlocal indentexpr=IndentAnything() 11 | 12 | " Echo info about indentations 13 | let b:indent_anything_echo = 1 14 | 15 | " 16 | " Adjust the default indentation for comments. Set the comments for html to 17 | " look like this: 18 | " 19 | " 22 | " 23 | setl comments=sr: 24 | let b:blockCommentStartRE = '' 27 | let b:blockCommentMiddleExtra = 3 28 | 29 | " Specify the syntax names for html comments and strings 30 | let b:blockCommentRE = 'htmlComment' 31 | let b:commentRE = b:blockCommentRE 32 | 33 | let b:stringRE = 'htmlString' 34 | let b:singleQuoteStringRE = b:stringRE 35 | let b:doubleQuoteStringRE = b:stringRE 36 | -------------------------------------------------------------------------------- /indent/go.vim: -------------------------------------------------------------------------------- 1 | " Copyright 2011 The Go Authors. All rights reserved. 2 | " Use of this source code is governed by a BSD-style 3 | " license that can be found in the LICENSE file. 4 | " 5 | " indent/go.vim: Vim indent file for Go. 6 | " 7 | " TODO: 8 | " - function invocations split across lines 9 | " - general line splits (line ends in an operator) 10 | 11 | if exists("b:did_indent") 12 | finish 13 | endif 14 | let b:did_indent = 1 15 | 16 | " C indentation is too far off useful, mainly due to Go's := operator. 17 | " Let's just define our own. 18 | setlocal nolisp 19 | setlocal autoindent 20 | setlocal indentexpr=GoIndent(v:lnum) 21 | setlocal indentkeys+=<:>,0=},0=) 22 | 23 | if exists("*GoIndent") 24 | finish 25 | endif 26 | 27 | function! GoIndent(lnum) 28 | let prevlnum = prevnonblank(a:lnum-1) 29 | if prevlnum == 0 30 | " top of file 31 | return 0 32 | endif 33 | 34 | " grab the previous and current line, stripping comments. 35 | let prevl = substitute(getline(prevlnum), '//.*$', '', '') 36 | let thisl = substitute(getline(a:lnum), '//.*$', '', '') 37 | let previ = indent(prevlnum) 38 | 39 | let ind = previ 40 | 41 | if prevl =~ '[({]\s*$' 42 | " previous line opened a block 43 | let ind += &sw 44 | endif 45 | if prevl =~# '^\s*\(case .*\|default\):$' 46 | " previous line is part of a switch statement 47 | let ind += &sw 48 | endif 49 | " TODO: handle if the previous line is a label. 50 | 51 | if thisl =~ '^\s*[)}]' 52 | " this line closed a block 53 | let ind -= &sw 54 | endif 55 | 56 | " Colons are tricky. 57 | " We want to outdent if it's part of a switch ("case foo:" or "default:"). 58 | " We ignore trying to deal with jump labels because (a) they're rare, and 59 | " (b) they're hard to disambiguate from a composite literal key. 60 | if thisl =~# '^\s*\(case .*\|default\):$' 61 | let ind -= &sw 62 | endif 63 | 64 | return ind 65 | endfunction 66 | -------------------------------------------------------------------------------- /indent/jade.vim: -------------------------------------------------------------------------------- 1 | " Vim indent file 2 | " Language: Jade 3 | " Maintainer: Joshua Borton 4 | " Credits: Tim Pope (vim-jade) 5 | " Last Change: 2010 Sep 22 6 | 7 | if exists("b:did_indent") 8 | finish 9 | endif 10 | 11 | unlet! b:did_indent 12 | let b:did_indent = 1 13 | 14 | setlocal autoindent 15 | setlocal indentexpr=GetJadeIndent() 16 | setlocal indentkeys=o,O,*,},],0),!^F 17 | 18 | " Only define the function once. 19 | if exists("*GetJadeIndent") 20 | finish 21 | endif 22 | 23 | let s:attributes = '\%((.\{-\})\)' 24 | let s:tag = '\([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' 25 | 26 | if !exists('g:jade_self_closing_tags') 27 | let g:jade_self_closing_tags = 'meta|link|img|hr|br|input' 28 | endif 29 | 30 | setlocal formatoptions+=r 31 | setlocal comments+=n:\| 32 | 33 | function! GetJadeIndent() 34 | let lnum = prevnonblank(v:lnum-1) 35 | if lnum == 0 36 | return 0 37 | endif 38 | let line = substitute(getline(lnum),'\s\+$','','') 39 | let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') 40 | let lastcol = strlen(line) 41 | let line = substitute(line,'^\s\+','','') 42 | let indent = indent(lnum) 43 | let cindent = indent(v:lnum) 44 | let increase = indent + &sw 45 | if indent == indent(lnum) 46 | let indent = cindent <= indent ? -1 : increase 47 | endif 48 | 49 | let group = synIDattr(synID(lnum,lastcol,1),'name') 50 | 51 | if line =~ '^!!!' 52 | return indent 53 | elseif line =~ '^/\%(\[[^]]*\]\)\=$' 54 | return increase 55 | elseif line =~ '^\%(if\|else\|unless\|for\|each\|block\|mixin\|append\|case\|when\)' 56 | return increase 57 | elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$' 58 | return increase 59 | elseif line == '-#' 60 | return increase 61 | elseif line =~? '^\v%('.g:jade_self_closing_tags.')>' 62 | return indent 63 | elseif group =~? '\v^%(jadeAttributesDelimiter|jadeClass|jadeId|htmlTagName|htmlSpecialTagName|jadeFilter)$' 64 | return increase 65 | else 66 | return indent 67 | endif 68 | endfunction 69 | 70 | " vim:set sw=2: 71 | -------------------------------------------------------------------------------- /indent/less.vim: -------------------------------------------------------------------------------- 1 | " Vim indent file 2 | " Language: LessCSS 3 | " Maintainer: Leonard Ehrenfried 4 | " Last Change: 2011 Sep 26 5 | 6 | if exists("b:did_indent") 7 | finish 8 | endif 9 | 10 | runtime! indent/css.vim 11 | 12 | -------------------------------------------------------------------------------- /indent/swift.vim: -------------------------------------------------------------------------------- 1 | " Language: Swift 2 | " Maintainer: toyama satoshi 3 | " URL: http://github.com/toyamarinyon/vim-swift 4 | " License: GPL 5 | 6 | " Only load this indent file when no other was loaded. 7 | if exists("b:did_indent") 8 | finish 9 | endif 10 | let b:did_indent = 1 11 | 12 | " C indenting is built-in, thus this is very simple 13 | setlocal cindent 14 | 15 | let b:undo_indent = "setl cin<" 16 | -------------------------------------------------------------------------------- /lib/cocoa_indexes/cocoa_indexes/methods.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/lib/cocoa_indexes/cocoa_indexes/methods.txt.gz -------------------------------------------------------------------------------- /lib/cocoa_indexes/methods.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/lib/cocoa_indexes/methods.txt.gz -------------------------------------------------------------------------------- /lib/extras/README-if-you-like: -------------------------------------------------------------------------------- 1 | These are the files I used to generate cocoa_indexes and cocoa_keywords.vim 2 | You can delete them if you want; I've left them here in case you're curious. 3 | -------------------------------------------------------------------------------- /lib/extras/README_if_you_like: -------------------------------------------------------------------------------- 1 | These are the files I used to generate cocoa_indexes and cocoa_keywords.vim 2 | You can delete them if you want; I've left them here in case you're curious (like me). 3 | -------------------------------------------------------------------------------- /lib/extras/cocoa_classes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | ''' 3 | Creates text file of Cocoa superclasses in given filename or in 4 | ./cocoa_indexes/classes.txt by default. 5 | ''' 6 | import os, re 7 | from cocoa_definitions import write_file, find 8 | from commands import getoutput 9 | 10 | # We need find_headers() to return a dictionary instead of a list 11 | def find_headers(root_folder, frameworks): 12 | '''Returns a dictionary of the headers for each given framework.''' 13 | headers_and_frameworks = {} 14 | folder = root_folder + '/System/Library/Frameworks/' 15 | for framework in frameworks: 16 | bundle = folder + framework + '.framework' 17 | if os.path.isdir(bundle): 18 | headers_and_frameworks[framework] = ' '.join(find(bundle, '.h')) 19 | return headers_and_frameworks 20 | 21 | def get_classes(header_files_and_frameworks): 22 | '''Returns list of Cocoa Protocols classes & their framework.''' 23 | classes = {} 24 | for framework, files in header_files_and_frameworks: 25 | for line in getoutput(r"grep -ho '@\(interface\|protocol\) [A-Z]\w\+' " 26 | + files).split("\n"): 27 | cocoa_class = re.search(r'[A-Z]\w+', line) 28 | if cocoa_class and not classes.has_key(cocoa_class.group(0)): 29 | classes[cocoa_class.group(0)] = framework 30 | classes = classes.items() 31 | classes.sort() 32 | return classes 33 | 34 | def get_superclasses(classes_and_frameworks): 35 | ''' 36 | Given a list of Cocoa classes & their frameworks, returns a list of their 37 | superclasses in the form: "class\|superclass\|superclass\|...". 38 | ''' 39 | args = '' 40 | for classname, framework in classes_and_frameworks: 41 | args += classname + ' ' + framework + ' ' 42 | return getoutput('./superclasses ' + args).split("\n") 43 | 44 | def output_file(fname=None): 45 | '''Output text file of Cocoa classes to given filename.''' 46 | if fname is None: 47 | fname = './cocoa_indexes/classes.txt' 48 | if not os.path.isdir(os.path.dirname(fname)): 49 | os.mkdir(os.path.dirname(fname)) 50 | 51 | cocoa_frameworks = ('Foundation', 'AppKit', 'AddressBook', 'CoreData', 52 | 'PreferencePanes', 'QTKit', 'ScreenSaver', 53 | 'SyncServices', 'WebKit') 54 | iphone_frameworks = ('UIKit', 'GameKit') 55 | iphone_sdk_path = '/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk' 56 | headers_and_frameworks = find_headers('', cocoa_frameworks).items() + \ 57 | find_headers(iphone_sdk_path, iphone_frameworks).items() 58 | 59 | superclasses = get_superclasses(get_classes(headers_and_frameworks)) 60 | write_file(fname, superclasses) 61 | 62 | if __name__ == '__main__': 63 | from sys import argv 64 | output_file(argv[1] if len(argv) > 1 else None) 65 | -------------------------------------------------------------------------------- /lib/extras/cocoa_indexes/methods.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/lib/extras/cocoa_indexes/methods.txt.gz -------------------------------------------------------------------------------- /lib/extras/cocoa_methods.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | ''' 3 | Lists Cocoa methods in given file or ./cocoa_indexes/methods.txt by default. 4 | ''' 5 | import re, os, gzip 6 | from cocoa_definitions import default_headers, format_function_line 7 | 8 | def get_methods(headers): 9 | '''Returns list of Cocoa methods.''' 10 | matches = [] 11 | for header in headers: 12 | f = open(header, 'r') 13 | current_class = '' 14 | for line in f: 15 | if current_class == '': 16 | if line[:10] == '@interface' or line[:9] == '@protocol': 17 | current_class = re.match('@(interface|protocol)\s+(\w+)', 18 | line).group(2) 19 | else: 20 | if line[:3] == '@end': 21 | current_class = '' 22 | elif re.match('[-+]\s*\(', line): 23 | method_name = get_method_name(line) 24 | if method_name: 25 | match = current_class + ' ' + method_name 26 | if match not in matches: 27 | matches.append(match) 28 | f.close() 29 | matches = [format_line(line) for line in matches] 30 | matches.sort() 31 | return matches 32 | 33 | def get_method_name(line): 34 | '''Returns the method name & argument types for the given line.''' 35 | if re.search('\w+\s*:', line): 36 | return ' '.join(re.findall('\w+\s*:\s*\(.*?\)', line)) 37 | else: 38 | return re.match(r'[-+]\s*\(.*?\)\s*(\w+)', line).group(1) 39 | 40 | def format_line(line): 41 | '''Removes parentheses/comments/unnecessary spacing for the given line.''' 42 | line = re.sub(r'\s*:\s*', ':', line) 43 | line = re.sub(r'/\*.*?\*/\s*|[()]', '', line) 44 | line = re.sub(r'(NS\S+)Pointer', r'\1 *', line) 45 | return format_function_line(line) 46 | 47 | def extract_file_to(fname=None): 48 | ''' 49 | Extracts methods to given file or ./cocoa_indexes/methods.txt by default. 50 | ''' 51 | if fname is None: 52 | fname = './cocoa_indexes/methods.txt.gz' 53 | if not os.path.isdir(os.path.dirname(fname)): 54 | os.mkdir(os.path.dirname(fname)) 55 | 56 | # This file is quite large, so I've compressed it. 57 | f = gzip.open(fname, 'w') 58 | f.write("\n".join(get_methods(default_headers()))) 59 | f.close() 60 | 61 | if __name__ == '__main__': 62 | from sys import argv 63 | extract_file_to(argv[1] if len(argv) > 1 else None) 64 | -------------------------------------------------------------------------------- /lib/extras/superclasses: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vingel/vim/482a38f3856f2178f7cd3cf29cda09b0e4e2cd38/lib/extras/superclasses -------------------------------------------------------------------------------- /lib/extras/superclasses.m: -------------------------------------------------------------------------------- 1 | /* -framework Foundation -Os -Wmost -dead_strip */ 2 | /* Returns list of superclasses ready to be used by grep. */ 3 | #import 4 | #import 5 | 6 | void usage() 7 | { 8 | fprintf(stderr, "Usage: superclasses class_name framework\n"); 9 | } 10 | 11 | void print_superclasses(const char classname[], const char framework[]) 12 | { 13 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 14 | 15 | /* Foundation is already included, so no need to load it again. */ 16 | if (strncmp(framework, "Foundation", 256) != 0) { 17 | NSString *bundle = 18 | [@"/System/Library/Frameworks/" stringByAppendingString: 19 | [[NSString stringWithUTF8String:framework] 20 | stringByAppendingPathExtension:@"framework"]]; 21 | [[NSBundle bundleWithPath:bundle] load]; 22 | } 23 | 24 | Class aClass = NSClassFromString([NSString stringWithUTF8String:classname]); 25 | char buf[BUFSIZ]; 26 | 27 | strncpy(buf, classname, BUFSIZ); 28 | while ((aClass = class_getSuperclass(aClass)) != nil) { 29 | strncat(buf, "\\|", BUFSIZ); 30 | strncat(buf, [NSStringFromClass(aClass) UTF8String], BUFSIZ); 31 | } 32 | printf("%s\n", buf); 33 | 34 | [pool drain]; 35 | } 36 | 37 | int main(int argc, char const* argv[]) 38 | { 39 | if (argc < 3 || argv[1][0] == '-') 40 | usage(); 41 | else { 42 | int i; 43 | for (i = 1; i < argc - 1; i += 2) 44 | print_superclasses(argv[i], argv[i + 1]); 45 | } 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /lib/get_methods.sh: -------------------------------------------------------------------------------- 1 | dir=`dirname $0` 2 | classes=`grep -m 1 ^$1 ${dir}/cocoa_indexes/classes.txt` 3 | if [ -z "$classes" ]; then exit; fi 4 | zgrep "^\($classes\)" ${dir}/cocoa_indexes/methods.txt.gz | sed 's/^[^ ]* //' 5 | -------------------------------------------------------------------------------- /plugin/QuickTemplate.vim: -------------------------------------------------------------------------------- 1 | " Version: $Id: QuickTemplate.vim 221 2008-11-05 15:17:34Z i.feelinglucky $ 2 | " File: QuickTemplate.vim 3 | " Maintainer: feelinglucky 4 | " Last Change: 2008/10/08 5 | " Desption: quick create new file form template 6 | " Useage: 7 | "map :NewQuickTemplateTab xhtml 8 | "map :NewQuickTemplateTab php 9 | "map :NewQuickTemplateTab javascript 10 | "map :NewQuickTemplateTab css 11 | 12 | if exists("loaded_quick_template") 13 | finish 14 | endif 15 | let loaded_quick_template = 1 16 | 17 | if has("win32") 18 | let g:QuickTemplatePath = $VIM.'/vimfiles/template/' 19 | else 20 | let g:QuickTemplatePath = $HOME.'/.vim/' 21 | endif 22 | 23 | let g:QuickTemplateCursorFlag = '#cursor#' 24 | let s:TemplatVersion = '$Id: QuickTemplate.vim 221 2008-11-05 15:17:34Z i.feelinglucky $' 25 | 26 | function! NewQuickTemplate(name, mode) 27 | let QuickTemplate=g:QuickTemplatePath.a:name.'.tpl' 28 | 29 | if !filereadable(QuickTemplate) 30 | echo "QuickTemplate ".a:name.": not exists!" 31 | return 32 | endif 33 | 34 | if a:mode == 'tab' 35 | tabnew 36 | else 37 | new 38 | endif 39 | 40 | execute 'setlocal filetype='.a:name 41 | let $QuickTemplate=QuickTemplate 42 | 0r $QuickTemplate 43 | unlet QuickTemplate 44 | 45 | normal G 46 | delete G 47 | 48 | let hasfind=search(g:QuickTemplateCursorFlag) 49 | if hasfind 50 | let line = getline('.') 51 | let repl = substitute(line, g:QuickTemplateCursorFlag, '', '') 52 | call setline('.', repl) 53 | endif 54 | endfunction 55 | 56 | com! -nargs=1 -range=% NewQuickTemplate call NewQuickTemplate(, 'window') 57 | if v:version > 700 58 | com! -nargs=1 -range=% NewQuickTemplateTab call NewQuickTemplate(, 'tab') 59 | endif 60 | -------------------------------------------------------------------------------- /plugin/checksyntax.vim: -------------------------------------------------------------------------------- 1 | " checksyntax.vim -- Check syntax when saving a file (php, ruby, tex ...) 2 | " @Author: Tom Link (micathom AT gmail com) 3 | " @License: GPL (see http://www.gnu.org/licenses/gpl.txt) 4 | " @Created: 04-Mai-2005. 5 | " @Last Change: 2010-11-11. 6 | " GetLatestVimScripts: 1431 0 :AutoInstall: checksyntax.vim 7 | " @Revision: 392 8 | 9 | if exists('g:loaded_checksyntax') 10 | finish 11 | endif 12 | let g:loaded_checksyntax = 101 13 | 14 | 15 | " @TPluginInclude 16 | if !exists('g:checksyntax_auto') 17 | " If non-null, enable automatic syntax checks after saving a file. 18 | let g:checksyntax_auto = 1 19 | endif 20 | 21 | 22 | " @TPluginInclude 23 | augroup CheckSyntax 24 | autocmd! 25 | if g:checksyntax_auto 26 | autocmd CheckSyntax BufWritePost * call checksyntax#Check(0) 27 | endif 28 | augroup END 29 | 30 | 31 | " :display: CheckSyntax[!] [NAME] 32 | " Check the current buffer's syntax (type defaults to &filetype). 33 | " Or use NAME instead of &filetype. 34 | " 35 | " With the bang !, use the alternative syntax checker (see 36 | " |g:checksyntax|). 37 | command! -bang -nargs=? CheckSyntax call checksyntax#Check(1, "", ) 38 | 39 | 40 | " @TPluginInclude 41 | if !hasmapto(':CheckSyntax') 42 | noremap :CheckSyntax 43 | inoremap :CheckSyntax 44 | endif 45 | 46 | finish 47 | 0.2 48 | php specific 49 | 50 | 0.3 51 | generalized plugin; modes; support for ruby, phpp, tex (chktex) 52 | 53 | 0.4 54 | use vim compilers if available (e.g., tidy, xmllint ...); makeprg was 55 | restored in the wrong window 56 | 57 | 0.5 58 | - Support for jsl (javascript lint). 59 | - Support for jlint. 60 | - Don't automatically check php files if eclim is installed. 61 | - Allow auto_* parameters to be buffer local. 62 | - FIX: Unlet current_compiler, use g:current_compiler 63 | - FIX: garbled screen: use redraw! (thanks to Vincent de Lau) 64 | - Support for lua (thanks to norman) 65 | 66 | 0.6 67 | - checksyntax_compiler_{&ft} & checksyntax_cmd_{&ft} variables can be 68 | buffer local 69 | 70 | 1.0 71 | - The info maintained as g:checksyntax_* variables is now kept in a 72 | dictionary named g:checksyntax 73 | - Support for gjslint 74 | - Some bug fixes (e.g. tidy) 75 | 76 | -------------------------------------------------------------------------------- /plugin/cocoa.vim: -------------------------------------------------------------------------------- 1 | " File: cocoa.vim 2 | " Author: Michael Sanders msanders [at] gmail [dot] com 3 | " Version: 0.4 4 | 5 | if exists('s:did_cocoa') || &cp || version < 700 6 | finish 7 | endif 8 | let s:did_cocoa = 1 9 | 10 | " These have to load after the normal ftplugins to override the defaults; I'd 11 | " like to put this in ftplugin/objc_cocoa_mappings.vim, but that doesn't seem 12 | " to work.. 13 | au FileType objc ru after/syntax/objc_enhanced.vim 14 | \| let b:match_words = '@\(implementation\|interface\):@end' 15 | \| setl inc=^\s*#\s*import omnifunc=objc#cocoacomplete#Complete 16 | \| if globpath(expand(':p:h'), '*.xcodeproj') != '' | 17 | \ setl makeprg=open\ -a\ xcode\ &&\ osascript\ -e\ 'tell\ app\ \"Xcode\"\ to\ build' 18 | \| endif 19 | -------------------------------------------------------------------------------- /plugin/csscomb.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: csscomb.vim 3 | " Author: Aleksandr Batsuev (alex@batsuev.com) 4 | " WebPage: https://github.com/batsuev/csscomb-vim 5 | " License: MIT 6 | 7 | let g:CSSCombPluginDir = fnamemodify(expand(""), ":h") 8 | 9 | function! g:CSSComb(count, line1, line2) 10 | let content = join(getline(a:line1, a:line2), "\n") 11 | let res = system("php ".fnameescape(g:CSSCombPluginDir."/exec.php"), content) 12 | let lines = split(res, "\n") 13 | call setline(a:line1, lines) 14 | endfunction 15 | 16 | command! -nargs=? -range=% CSSComb :call g:CSSComb(, , , ) 17 | -------------------------------------------------------------------------------- /plugin/exec.php: -------------------------------------------------------------------------------- 1 | csscomb($input); 6 | ?> 7 | -------------------------------------------------------------------------------- /plugin/gjslint.vim: -------------------------------------------------------------------------------- 1 | function! GJSLint() 2 | "let prg=&makeprg 3 | 4 | setlocal makeprg=gjslint\ % 5 | setlocal errorformat=Line\ %l,\ %t:%n:\ %m 6 | make 7 | 8 | "setlocal makeprg=prg 9 | endfunction 10 | 11 | command! -nargs=0 -buffer Gjslint :call GJSLint() 12 | command! -nargs=0 -buffer GJSLint :call GJSLint() 13 | -------------------------------------------------------------------------------- /plugin/godoc.vim: -------------------------------------------------------------------------------- 1 | " Copyright 2011 The Go Authors. All rights reserved. 2 | " Use of this source code is governed by a BSD-style 3 | " license that can be found in the LICENSE file. 4 | " 5 | " godoc.vim: Vim command to see godoc. 6 | 7 | if exists("g:loaded_godoc") 8 | finish 9 | endif 10 | let g:loaded_godoc = 1 11 | 12 | let s:buf_nr = -1 13 | let s:last_word = '' 14 | 15 | function! s:GodocView() 16 | if !bufexists(s:buf_nr) 17 | leftabove new 18 | file `="[Godoc]"` 19 | let s:buf_nr = bufnr('%') 20 | elseif bufwinnr(s:buf_nr) == -1 21 | leftabove split 22 | execute s:buf_nr . 'buffer' 23 | delete _ 24 | elseif bufwinnr(s:buf_nr) != bufwinnr('%') 25 | execute bufwinnr(s:buf_nr) . 'wincmd w' 26 | endif 27 | 28 | setlocal filetype=godoc 29 | setlocal bufhidden=delete 30 | setlocal buftype=nofile 31 | setlocal noswapfile 32 | setlocal nobuflisted 33 | setlocal modifiable 34 | setlocal nocursorline 35 | setlocal nocursorcolumn 36 | setlocal iskeyword+=: 37 | setlocal iskeyword-=- 38 | 39 | nnoremap K :Godoc 40 | 41 | au BufHidden call let buf_nr = -1 42 | endfunction 43 | 44 | function! s:GodocWord(word) 45 | let word = a:word 46 | silent! let content = system('godoc ' . word) 47 | if v:shell_error || !len(content) 48 | if len(s:last_word) 49 | silent! let content = system('godoc ' . s:last_word.'/'.word) 50 | if v:shell_error || !len(content) 51 | echo 'No documentation found for "' . word . '".' 52 | return 53 | endif 54 | let word = s:last_word.'/'.word 55 | else 56 | echo 'No documentation found for "' . word . '".' 57 | return 58 | endif 59 | endif 60 | let s:last_word = word 61 | silent! call s:GodocView() 62 | setlocal modifiable 63 | silent! %d _ 64 | silent! put! =content 65 | silent! normal gg 66 | setlocal nomodifiable 67 | setfiletype godoc 68 | endfunction 69 | 70 | function! s:Godoc(...) 71 | let word = join(a:000, ' ') 72 | if !len(word) 73 | let word = expand('') 74 | endif 75 | let word = substitute(word, '[^a-zA-Z0-9\/]', '', 'g') 76 | if !len(word) 77 | return 78 | endif 79 | call s:GodocWord(word) 80 | endfunction 81 | 82 | command! -nargs=* -range -complete=customlist,go#complete#Package Godoc :call s:Godoc() 83 | nnoremap (godoc-keyword) :call Godoc('') 84 | 85 | " vim:ts=4:sw=4:et 86 | -------------------------------------------------------------------------------- /plugin/pep8.vim: -------------------------------------------------------------------------------- 1 | function Pep8() 2 | set lazyredraw 3 | " Close any existing cwindows. 4 | cclose 5 | let l:grepformat_save = &grepformat 6 | let l:grepprogram_save = &grepprg 7 | set grepformat&vim 8 | set grepformat&vim 9 | let &grepformat = '%f:%l:%m' 10 | let &grepprg = 'pep8 --repeat' 11 | if &readonly == 0 | update | endif 12 | silent! grep! % 13 | let &grepformat = l:grepformat_save 14 | let &grepprg = l:grepprogram_save 15 | let l:mod_total = 0 16 | let l:win_count = 1 17 | " Determine correct window height 18 | windo let l:win_count = l:win_count + 1 19 | if l:win_count <= 2 | let l:win_count = 4 | endif 20 | windo let l:mod_total = l:mod_total + winheight(0)/l:win_count | 21 | \ execute 'resize +'.l:mod_total 22 | " Open cwindow 23 | execute 'belowright copen '.l:mod_total 24 | nnoremap c :cclose 25 | set nolazyredraw 26 | redraw! 27 | endfunction 28 | 29 | if ( !hasmapto('PEP8()') && (maparg('') == '') ) 30 | map :call Pep8() 31 | map! :call Pep8() 32 | else 33 | if ( !has("gui_running") || has("win32") ) 34 | echo "Python PEP8 Error: No Key mapped.\n". 35 | \ " is taken and a replacement was not assigned." 36 | endif 37 | endif 38 | 39 | -------------------------------------------------------------------------------- /plugin/powertab.vim: -------------------------------------------------------------------------------- 1 | " File: powertab.vim 2 | " Author: Vingel 3 | " Last Updated: 2010-01-05 11:07:21 4 | " Version: 0.1 5 | " Description: powertab is tab mapping for you to jump over between '' , "", (), <>,><,[], and {} in insert mode 6 | " :h powertab.txt 7 | 8 | if exists('loaded_powertab') || &cp || version < 700 9 | finish 10 | endif 11 | let loaded_powertab = 1 12 | 13 | command! Powertab :call Powertab() 14 | imap :Powertab 15 | 16 | function! Powertab () 17 | let l:lists = [] 18 | execute 'inoremap f"a' 19 | execute 'inoremap ff[a' 21 | execute 'inoremap f(a' 22 | execute 'inoremap f{a' 23 | execute 'inoremap f"' 24 | endfunction 25 | -------------------------------------------------------------------------------- /plugin/textile.vim: -------------------------------------------------------------------------------- 1 | " textile.vim 2 | " 3 | " Tim Harper (tim.theenchanter.com) 4 | 5 | au BufRead,BufNewFile *.textile setf textile 6 | -------------------------------------------------------------------------------- /plugin/vimcdoc.vim: -------------------------------------------------------------------------------- 1 | " Vim plugin to set the default help language to Chinese 2 | " Maintainer: Willis (http://vimcdoc.sf.net) 3 | " Last Change: 2008 Dec 12 4 | 5 | if exists("g:loaded_vimcdoc") 6 | finish 7 | endif 8 | let g:loaded_vimcdoc = 1 9 | 10 | if version >= 603 11 | set helplang=cn 12 | endif 13 | 14 | " vim: ts=8 sw=2 15 | -------------------------------------------------------------------------------- /plugin/vstplugin.vim: -------------------------------------------------------------------------------- 1 | " Vim reStructured Text 2 | " (c) Mikolaj Machowski 2006 3 | " Author: Mikolaj Machowski ( mikmach AT wp DOT pl ) 4 | " Last Change: 4 Nov 2006 5 | " Version: 1.4 6 | " License: 7 | " Copyright (C) 2006 Mikolaj Machowski 8 | " 9 | " This script is free software; you can redistribute it and/or 10 | " modify it under the terms of the GNU Library General Public 11 | " License as published by the Free Software Foundation; either 12 | " version 2 of the License, or (at your option) any later version. 13 | " 14 | " This library is distributed in the hope that it will be useful, 15 | " but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | " Library General Public License for more details. 18 | " 19 | " You should have received a copy of the GNU Library General Public License 20 | " along with this library; see the file COPYING.LIB. If not, write to 21 | " the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | " Boston, MA 02110-1301, USA. 23 | " 24 | " VST requires Vim7 25 | if v:version < 700 26 | finish 27 | endif 28 | 29 | " Command :Vst 30 | command! -range=% -nargs=? -complete=custom,VST_Args Vst call vst#vst#VST_Export(, , ) 31 | command! -range=% -nargs=? -complete=custom,VST_Args Vsti call vst#vst#VST_InstantWrapper(, , ) 32 | command! -range=% -nargs=? -complete=custom,VST_Args Vstm call VST_Menus() 33 | 34 | " VST_Args: Command line completion for :Vst command {{{ 35 | function! VST_Args(A, C, P) 36 | let args = "html,tex,latex,pdf,toc,head,fold,link,slink,rep,srep,preproc,help,rest" 37 | return substitute(args, ',', '\n', 'g') 38 | endfunction 39 | " }}} 40 | " Menus {{{ 41 | function! VST_Menus() 42 | if has("gui_running") 43 | menu VreST.Export\ to\ HTML :Vst html 44 | menu VreST.Export\ to\ LaTeX :Vst tex 45 | menu VreST.Export\ to\ PDF :Vst pdf 46 | menu VreST.Export\ to\ reST :Vst rest 47 | menu VreST.Fold :Vst fold 48 | menu VreST.Headers :Vst head 49 | menu VreST.TOC :Vst toc 50 | menu VreST.Help :Vst help 51 | inoremenu VreST.Export\ to\ HTML :Vst html 52 | inoremenu VreST.Export\ to\ LaTeX :Vst tex 53 | inoremenu VreST.Export\ to\ PDF :Vst pdf 54 | inoremenu VreST.Export\ to\ reST :Vst rest 55 | inoremenu VreST.Fold :Vst fold 56 | inoremenu VreST.Headers :Vst head 57 | inoremenu VreST.TOC :Vst toc 58 | inoremenu VreST.Help :Vst help 59 | endif 60 | endfunction 61 | if exists("g:vst_showmenu") && g:vst_load_menus != 0 62 | call VST_Menus() 63 | endif 64 | " }}} 65 | " Load auxiliary mappings: 66 | call vst#vst#VST_AuxiliaryMappings() 67 | 68 | " vim:fdm=marker:ff=unix:noet:ts=4:sw=4:nowrap 69 | -------------------------------------------------------------------------------- /snippets/_.snippets: -------------------------------------------------------------------------------- 1 | # Global snippets 2 | 3 | # (c) holds no legal value ;) 4 | snippet c) 5 | Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2} 6 | snippet date 7 | `strftime("%Y-%m-%d %H:%M:%S")` 8 | snippet v 9 | Vingel 10 | snippet vsite 11 | http://www.vingel.com/ 12 | snippet vmail 13 | vingel@gmail.com 14 | 15 | -------------------------------------------------------------------------------- /snippets/autoit.snippets: -------------------------------------------------------------------------------- 1 | snippet if 2 | If ${1:condition} Then 3 | ${2:; True code} 4 | EndIf 5 | snippet el 6 | Else 7 | ${1} 8 | snippet elif 9 | ElseIf ${1:condition} Then 10 | ${2:; True code} 11 | # If/Else block 12 | snippet ifel 13 | If ${1:condition} Then 14 | ${2:; True code} 15 | Else 16 | ${3:; Else code} 17 | EndIf 18 | # If/ElseIf/Else block 19 | snippet ifelif 20 | If ${1:condition 1} Then 21 | ${2:; True code} 22 | ElseIf ${3:condition 2} Then 23 | ${4:; True code} 24 | Else 25 | ${5:; Else code} 26 | EndIf 27 | # Switch block 28 | snippet switch 29 | Switch (${1:condition}) 30 | Case {$2:case1}: 31 | {$3:; Case 1 code} 32 | Case Else: 33 | {$4:; Else code} 34 | EndSwitch 35 | # Select block 36 | snippet select 37 | Select (${1:condition}) 38 | Case {$2:case1}: 39 | {$3:; Case 1 code} 40 | Case Else: 41 | {$4:; Else code} 42 | EndSelect 43 | # While loop 44 | snippet while 45 | While (${1:condition}) 46 | ${2:; code...} 47 | WEnd 48 | # For loop 49 | snippet for 50 | For ${1:n} = ${3:1} to ${2:count} 51 | ${4:; code...} 52 | Next 53 | # New Function 54 | snippet func 55 | Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}): 56 | ${4:Return} 57 | EndFunc 58 | # Message box 59 | snippet msg 60 | MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"}) 61 | # Debug Message 62 | snippet debug 63 | MsgBox(0, "Debug", ${1:"Debug Message"}) 64 | # Show Variable Debug Message 65 | snippet showvar 66 | MsgBox(0, "${1:VarName}", $1) 67 | -------------------------------------------------------------------------------- /snippets/c.snippets: -------------------------------------------------------------------------------- 1 | # main() 2 | snippet main 3 | int main(int argc, const char *argv[]) 4 | { 5 | ${1} 6 | return 0; 7 | } 8 | snippet mainn 9 | int main(void) 10 | { 11 | ${1} 12 | return 0; 13 | } 14 | # #include <...> 15 | snippet inc 16 | #include <${1:stdio}.h>${2} 17 | # #include "..." 18 | snippet Inc 19 | #include "${1:`Filename("$1.h")`}"${2} 20 | # #ifndef ... #define ... #endif 21 | snippet Def 22 | #ifndef $1 23 | #define ${1:SYMBOL} ${2:value} 24 | #endif${3} 25 | snippet def 26 | #define 27 | snippet ifdef 28 | #ifdef ${1:FOO} 29 | ${2:#define } 30 | #endif 31 | snippet #if 32 | #if ${1:FOO} 33 | ${2} 34 | #endif 35 | # Header Include-Guard 36 | snippet once 37 | #ifndef ${1:`toupper(Filename('$1_H', 'UNTITLED_H'))`} 38 | 39 | #define $1 40 | 41 | ${2} 42 | 43 | #endif /* end of include guard: $1 */ 44 | # If Condition 45 | snippet if 46 | if (${1:/* condition */}) { 47 | ${2:/* code */} 48 | } 49 | snippet el 50 | else { 51 | ${1} 52 | } 53 | # Ternary conditional 54 | snippet t 55 | ${1:/* condition */} ? ${2:a} : ${3:b} 56 | # Do While Loop 57 | snippet do 58 | do { 59 | ${2:/* code */} 60 | } while (${1:/* condition */}); 61 | # While Loop 62 | snippet wh 63 | while (${1:/* condition */}) { 64 | ${2:/* code */} 65 | } 66 | # For Loop 67 | snippet for 68 | for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 69 | ${4:/* code */} 70 | } 71 | # Custom For Loop 72 | snippet forr 73 | for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { 74 | ${5:/* code */} 75 | } 76 | # Function 77 | snippet fun 78 | ${1:void} ${2:function_name}(${3}) 79 | { 80 | ${4:/* code */} 81 | } 82 | # Function Declaration 83 | snippet fund 84 | ${1:void} ${2:function_name}(${3});${4} 85 | # Typedef 86 | snippet td 87 | typedef ${1:int} ${2:MyCustomType};${3} 88 | # Struct 89 | snippet st 90 | struct ${1:`Filename('$1_t', 'name')`} { 91 | ${2:/* data */} 92 | }${3: /* optional variable list */};${4} 93 | # Typedef struct 94 | snippet tds 95 | typedef struct ${2:_$1 }{ 96 | ${3:/* data */} 97 | } ${1:`Filename('$1_t', 'name')`}; 98 | # Typdef enum 99 | snippet tde 100 | typedef enum { 101 | ${1:/* data */} 102 | } ${2:foo}; 103 | # printf 104 | # unfortunately version this isn't as nice as TextMates's, given the lack of a 105 | # dynamic `...` 106 | snippet pr 107 | printf("${1:%s}\n"${2});${3} 108 | # fprintf (again, this isn't as nice as TextMate's version, but it works) 109 | snippet fpr 110 | fprintf(${1:stderr}, "${2:%s}\n"${3});${4} 111 | # This is kind of convenient 112 | snippet . 113 | [${1}]${2} 114 | -------------------------------------------------------------------------------- /snippets/cpp.snippets: -------------------------------------------------------------------------------- 1 | # Read File Into Vector 2 | snippet readfile 3 | std::vector v; 4 | if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) { 5 | char buf[1024]; 6 | while (size_t len = fread(buf, 1, sizeof(buf), $2)) 7 | v.insert(v.end(), buf, buf + len); 8 | fclose($2); 9 | }${3} 10 | # std::map 11 | snippet map 12 | std::map<${1:key}, ${2:value}> map${3}; 13 | # std::vector 14 | snippet vector 15 | std::vector<${1:char}> v${2}; 16 | # Namespace 17 | snippet ns 18 | namespace ${1:`Filename('', 'my')`} { 19 | ${2} 20 | } /* $1 */ 21 | # Class 22 | snippet cl 23 | class ${1:`Filename('$1_t', 'name')`} { 24 | public: 25 | $1 (${2:arguments}); 26 | virtual ~$1 (); 27 | 28 | private: 29 | ${3:/* data */} 30 | }; 31 | snippet fori 32 | for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 33 | ${4:/* code */} 34 | } 35 | -------------------------------------------------------------------------------- /snippets/css.snippets: -------------------------------------------------------------------------------- 1 | snippet import 2 | @import url("${1:/static/css/style.css}"); 3 | snippet c 4 | ${1:express} { 5 | ${2:property} 6 | } 7 | snippet b 8 | background: ${1:transparent} url('${2:img/logo.jpg}') ${3:no-repeat|repeat-x|repeat-y}; 9 | snippet bo 10 | border: ${1:1}px solid #${2:999}; 11 | snippet cu 12 | cursor: ${1:pointer}; 13 | snippet d 14 | display: ${1:none}; 15 | snippet w 16 | width: ${1:1}px; 17 | snippet h 18 | height: ${1:1}px; 19 | snippet m 20 | margin: ${1:0} auto; 21 | snippet p 22 | padding: ${1:0 1px}; 23 | snippet t 24 | text-align: ${1:center}; 25 | snippet l 26 | line-height: ${1:12}px; 27 | snippet f 28 | float: ${1:left}; 29 | snippet font 30 | font: 12px/1 "HelveticaNeue","Helvetica Neue",Helvetica, Tahoma, Arial, \5b8b\4f53, sans-serif; 31 | snippet fs 32 | font-size: ${1:12}px; 33 | snippet fw 34 | font-weight: ${1:bold}; 35 | snippet v 36 | vertical-align: ${1:middle}; 37 | snippet o 38 | overflow: ${1:hidden}; 39 | snippet lvha 40 | ${1:ID} a:link, $1 a:visited { 41 | } 42 | $1 a:hover, $1 a:active { 43 | } 44 | snippet reset 45 | @charset "utf-8"; 46 | html, body, div, span, applet, object, iframe, 47 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 48 | a, abbr, acronym, address, big, cite, code, 49 | del, dfn, em, font, img, ins, kbd, q, s, samp, 50 | small, strike, strong, sub, sup, tt, var, 51 | b, u, i, center, 52 | dl, dt, dd, ol, ul, li, 53 | fieldset, form, label, legend, 54 | table, caption, tbody, tfoot, thead, tr, th, td { 55 | margin: 0; 56 | padding: 0; 57 | border: 0; 58 | outline: 0; 59 | font-size: 100%; 60 | vertical-align: baseline; 61 | background: transparent; 62 | } 63 | html,textarea{ overflow: auto; } 64 | ol, ul { list-style: none; } 65 | blockquote, q { quotes: none; } 66 | blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } 67 | :focus { outline: 0; } 68 | ins { text-decoration: none; } 69 | del { text-decoration: line-through; } 70 | table { border-collapse: collapse; border-spacing: 0; } 71 | img,input,button { vertical-align: middle;} 72 | a { color: #333;} 73 | a:link,a:visited { text-decoration: none;} 74 | a:hover,a:active { text-decoration: underline;} 75 | p { line-height: 1.5; } 76 | body { 77 | font: 12px/1 "HelveticaNeue","Helvetica Neue",Helvetica, Tahoma, Arial, \5b8b\4f53, sans-serif; 78 | line-height: 1; 79 | color: #333; 80 | } 81 | snippet radius 82 | .radius { 83 | -moz-border-radius: 5px; 84 | -khtml-border-radius: 5px; 85 | -webkit-border-radius: 5px; 86 | border-radius:5px; 87 | } 88 | snippet list 89 | ${1:selector} { 90 | ${3} 91 | } 92 | $1 ${4:ul} { 93 | ${5} 94 | } 95 | $1 li { 96 | ${5} 97 | } 98 | -------------------------------------------------------------------------------- /snippets/django_template.snippets: -------------------------------------------------------------------------------- 1 | # Template Tags 2 | 3 | snippet autoescape 4 | {% autoescape ${1:off} %} 5 | ${2} 6 | {% endautoescape %} 7 | snippet block 8 | {% block ${1} %} 9 | ${2} 10 | {% endblock %} 11 | snippet # 12 | {# ${1:comment} #} 13 | snippet comment 14 | {% comment %} 15 | ${1} 16 | {% endcomment %} 17 | snippet cycle 18 | {% cycle ${1:val1} ${2:val2} ${3:as ${4}} %} 19 | snippet debug 20 | {% debug %} 21 | snippet extends 22 | {% extends "${1:base.html}" %} 23 | snippet filter 24 | {% filter ${1} %} 25 | ${2} 26 | {% endfilter %} 27 | snippet firstof 28 | {% firstof ${1} %} 29 | snippet for 30 | {% for ${1} in ${2} %} 31 | ${3} 32 | {% endfor %} 33 | snippet empty 34 | {% empty %} 35 | ${1} 36 | snippet if 37 | {% if ${1} %} 38 | ${2} 39 | {% endif %} 40 | snippet else 41 | {% else %} 42 | ${1} 43 | snippet ifchanged 44 | {% ifchanged %}${1}{% endifchanged %} 45 | snippet ifequal 46 | {% ifequal ${1} ${2} %} 47 | ${3} 48 | {% endifequal %} 49 | snippet ifnotequal 50 | {% ifnotequal ${1} ${2} %} 51 | ${3} 52 | {% endifnotequal %} 53 | snippet include 54 | {% include "${1}" %} 55 | snippet load 56 | {% load ${1} %} 57 | snippet now 58 | {% now "${1:jS F Y H:i}" %} 59 | snippet regroup 60 | {% regroup ${1} by ${2} as ${3} %} 61 | snippet spaceless 62 | {% spaceless %}${1}{% endspaceless %} 63 | snippet ssi 64 | {% ssi ${1} %} 65 | snippet trans 66 | {% trans "${1:string}" %} 67 | snippet url 68 | {% url ${1} as ${2} %} 69 | snippet widthratio 70 | {% widthratio ${1:this_value} ${2:max_value} ${3:100} %} 71 | snippet with 72 | {% with ${1} as ${2} %} 73 | 74 | # Template Filters 75 | 76 | # Note: Since SnipMate can't determine which template filter you are 77 | # expanding without the "|" character, these do not add the "|" 78 | # character. These save a few keystrokes still. 79 | 80 | # Note: Template tags that take no arguments are not implemented. 81 | 82 | snippet add 83 | add:"${1}" 84 | snippet center 85 | center:"${1}" 86 | snippet cut 87 | cut:"${1}" 88 | snippet date 89 | date:"${1}" 90 | snippet default 91 | default:"${1}" 92 | snippet defaultifnone 93 | default_if_none:"${1}" 94 | snippet dictsort 95 | dictsort:"${1}" 96 | snippet dictsortrev 97 | dictsortreversed:"${1}" 98 | snippet divisibleby 99 | divisibleby:"${1}" 100 | snippet floatformat 101 | floatformat:"${1}" 102 | snippet getdigit 103 | get_digit:"${1}" 104 | snippet join 105 | join:"${1}" 106 | snippet lengthis 107 | length_is:"${1}" 108 | snippet pluralize 109 | pluralize:"${1}" 110 | snippet removetags 111 | removetags:"${1}" 112 | snippet slice 113 | slice:"${1}" 114 | snippet stringformat 115 | stringformat:"${1}" 116 | snippet time 117 | time:"${1}" 118 | snippet truncatewords 119 | truncatewords:${1} 120 | snippet truncatewordshtml 121 | truncatewords_html:${1} 122 | snippet urlizetrunc 123 | urlizetrunc:${1} 124 | snippet wordwrap 125 | wordwrap:${1} 126 | 127 | -------------------------------------------------------------------------------- /snippets/erlang.snippets: -------------------------------------------------------------------------------- 1 | # module and export all 2 | snippet mod 3 | -module(${1:`Filename('', 'my')`}). 4 | 5 | -compile([export_all]). 6 | 7 | start() -> 8 | ${2} 9 | 10 | stop() -> 11 | ok. 12 | # define directive 13 | snippet def 14 | -define(${1:macro}, ${2:body}).${3} 15 | # export directive 16 | snippet exp 17 | -export([${1:function}/${2:arity}]). 18 | # include directive 19 | snippet inc 20 | -include("${1:file}").${2} 21 | # behavior directive 22 | snippet beh 23 | -behaviour(${1:behaviour}).${2} 24 | # if expression 25 | snippet if 26 | if 27 | ${1:guard} -> 28 | ${2:body} 29 | end 30 | # case expression 31 | snippet case 32 | case ${1:expression} of 33 | ${2:pattern} -> 34 | ${3:body}; 35 | end 36 | # record directive 37 | snippet rec 38 | -record(${1:record}, { 39 | ${2:field}=${3:value}}).${4} 40 | -------------------------------------------------------------------------------- /snippets/java.snippets: -------------------------------------------------------------------------------- 1 | snippet main 2 | public static void main (String [] args) 3 | { 4 | ${1:/* code */} 5 | } 6 | snippet pu 7 | public 8 | snippet po 9 | protected 10 | snippet pr 11 | private 12 | snippet st 13 | static 14 | snippet fi 15 | final 16 | snippet ab 17 | abstract 18 | snippet re 19 | return 20 | snippet br 21 | break; 22 | snippet de 23 | default: 24 | ${1} 25 | snippet ca 26 | catch(${1:Exception} ${2:e}) ${3} 27 | snippet th 28 | throw 29 | snippet sy 30 | synchronized 31 | snippet im 32 | import 33 | snippet j.u 34 | java.util 35 | snippet j.i 36 | java.io. 37 | snippet j.b 38 | java.beans. 39 | snippet j.n 40 | java.net. 41 | snippet j.m 42 | java.math. 43 | snippet if 44 | if (${1}) ${2} 45 | snippet el 46 | else 47 | snippet elif 48 | else if (${1}) ${2} 49 | snippet wh 50 | while (${1}) ${2} 51 | snippet for 52 | for (${1}; ${2}; ${3}) ${4} 53 | snippet fore 54 | for (${1} : ${2}) ${3} 55 | snippet sw 56 | switch (${1}) ${2} 57 | snippet cs 58 | case ${1}: 59 | ${2} 60 | ${3} 61 | snippet tc 62 | public class ${1:`Filename()`} extends ${2:TestCase} 63 | snippet t 64 | public void test${1:Name}() throws Exception ${2} 65 | snippet cl 66 | class ${1:`Filename("", "untitled")`} ${2} 67 | snippet in 68 | interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} 69 | snippet m 70 | ${1:void} ${2:method}(${3}) ${4:throws }${5} 71 | snippet v 72 | ${1:String} ${2:var}${3: = null}${4};${5} 73 | snippet co 74 | static public final ${1:String} ${2:var} = ${3};${4} 75 | snippet cos 76 | static public final String ${1:var} = "${2}";${3} 77 | snippet as 78 | assert ${1:test} : "${2:Failure message}";${3} 79 | -------------------------------------------------------------------------------- /snippets/javascript.snippets: -------------------------------------------------------------------------------- 1 | # Prototype 2 | snippet proto 3 | ${1:class_name}.prototype.${2:method_name} = 4 | function(${3:first_argument}) { 5 | ${4:// body...} 6 | }; 7 | # Block 8 | snippet block 9 | (function(){${1:content}})(); 10 | # Function 11 | snippet fun 12 | function ${1:function_name} (${2:argument}) { 13 | ${3:// body...} 14 | } 15 | # Anonymous Function 16 | snippet f 17 | function(${1}) {${2}} 18 | # if 19 | snippet if 20 | if (${1:true}) { 21 | ${2} 22 | } 23 | # if ... else 24 | snippet ife 25 | if (${1:true}) { 26 | ${2} 27 | } else { 28 | ${3} 29 | } 30 | # tertiary conditional 31 | snippet t 32 | ${1:/* condition */} ? ${2:a} : ${3:b} 33 | snippet var 34 | var ${1:$var} = ${2}; 35 | # switch 36 | snippet switch 37 | switch(${1:expression}) { 38 | case '${3:case}': 39 | ${4:// code} 40 | break; 41 | ${5} 42 | default: 43 | ${2:// code} 44 | } 45 | # case 46 | snippet case 47 | case '${1:case}': 48 | ${2:// code} 49 | break; 50 | ${3} 51 | # for (...) {...} 52 | snippet for 53 | for (var ${2:i} = 0, j = ${1:Things}.length; $2 < j; $2${3:++}) { 54 | ${4:$1[$2]} 55 | } 56 | # for (...) {...} (Improved Native For-Loop) 57 | snippet forr 58 | for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { 59 | ${4:$1[$2]} 60 | } 61 | snippet try 62 | try { 63 | $(1) 64 | } catch(e) { 65 | $(2) 66 | } 67 | # while (...) {...} 68 | snippet wh 69 | while (${1:/* condition */}) { 70 | ${2:/* code */} 71 | } 72 | # do...while 73 | snippet do 74 | do { 75 | ${2:/* code */} 76 | } while (${1:/* condition */}); 77 | # Object Method 78 | snippet :f 79 | ${1:method_name}: function(${2:attribute}) { 80 | ${4} 81 | }${3:,} 82 | # setTimeout function 83 | snippet timeout 84 | setTimeout(function() {${3}}${2}, ${1:10}; 85 | # Get Elements 86 | snippet get 87 | getElementsBy${1:TagName}('${2}')${3} 88 | # Get Element 89 | snippet gett 90 | getElementBy${1:Id}('${2}')${3} 91 | # jQuery 92 | snippet $ 93 | $(${1:"selector"}).${2:method}(${3})${4}; 94 | snippet $( 95 | $(function(){ 96 | ${1://code} 97 | }); 98 | snippet $.each 99 | $.each(${1:array|object}, function(${2:o}){ 100 | ${3:this} 101 | }); 102 | snippet $$ 103 | (function($){ 104 | ${1://code} 105 | })(jQuery); 106 | snippet /* 107 | /** 108 | * ${1:Describe what this method does} 109 | * @param {${2:String|Object|Array|Boolean|Number}} ${3:paramName} ${4:Describe this parameter} 110 | * @returns ${5:Describe what it returns} 111 | */ 112 | snippet con 113 | console.${1:log}(${2}); 114 | snippet single 115 | /** 116 | * ${7:Describe what this singleton object does} 117 | * @param {${8:String|Object|Array|Boolean|Number}} ${9:paramName} 118 | * @returns 119 | */ 120 | var ${1:Singleton} = (function(){ 121 | ${2} 122 | return { 123 | ${3:publicMethod}: function(${5:opt}) { 124 | ${4://code} 125 | }${6:,} 126 | }; 127 | })(); 128 | snippet module 129 | /** 130 | * ${5:Describe what this module does} 131 | * @param {object} ${6:paramName} 132 | */ 133 | var ${1:classname} = (function(){ 134 | var $1Object = { 135 | ${2:privateMethod1}: function(){ 136 | 137 | }, 138 | ${3:privateMethod2}: function(){ 139 | 140 | } 141 | }; 142 | return function(opt){ 143 | var publicObj = { 144 | options: {}, 145 | $2: $1Object.$2, 146 | $3: $1Object.$3${4:,} 147 | }; 148 | $.extend(publicObj.options, opt); 149 | return publicObj; 150 | }; 151 | })(); 152 | -------------------------------------------------------------------------------- /snippets/mako.snippets: -------------------------------------------------------------------------------- 1 | snippet def 2 | <%def name="${1:name}"> 3 | ${2:} 4 | 5 | snippet call 6 | <%call expr="${1:name}"> 7 | ${2:} 8 | 9 | snippet doc 10 | <%doc> 11 | ${1:} 12 | 13 | snippet text 14 | <%text> 15 | ${1:} 16 | 17 | snippet for 18 | % for ${1:i} in ${2:iter}: 19 | ${3:} 20 | % endfor 21 | snippet if if 22 | % if ${1:condition}: 23 | ${2:} 24 | % endif 25 | snippet if if/else 26 | % if ${1:condition}: 27 | ${2:} 28 | % else: 29 | ${3:} 30 | % endif 31 | snippet try 32 | % try: 33 | ${1:} 34 | % except${2:}: 35 | ${3:pass} 36 | % endtry 37 | snippet wh 38 | % while ${1:}: 39 | ${2:} 40 | % endwhile 41 | snippet $ 42 | ${ ${1:} } 43 | snippet <% 44 | <% ${1:} %> 45 | snippet 47 | snippet inherit 48 | <%inherit file="${1:filename}" /> 49 | snippet include 50 | <%include file="${1:filename}" /> 51 | snippet namespace 52 | <%namespace file="${1:name}" /> 53 | snippet page 54 | <%page args="${1:}" /> 55 | -------------------------------------------------------------------------------- /snippets/perl.snippets: -------------------------------------------------------------------------------- 1 | # #!/usr/bin/perl 2 | snippet #! 3 | #!/usr/bin/perl 4 | 5 | # Hash Pointer 6 | snippet . 7 | => 8 | # Function 9 | snippet sub 10 | sub ${1:function_name} { 11 | ${2:#body ...} 12 | } 13 | # Conditional 14 | snippet if 15 | if (${1}) { 16 | ${2:# body...} 17 | } 18 | # Conditional if..else 19 | snippet ife 20 | if (${1}) { 21 | ${2:# body...} 22 | } 23 | else { 24 | ${3:# else...} 25 | } 26 | # Conditional if..elsif..else 27 | snippet ifee 28 | if (${1}) { 29 | ${2:# body...} 30 | } 31 | elsif (${3}) { 32 | ${4:# elsif...} 33 | } 34 | else { 35 | ${5:# else...} 36 | } 37 | # Conditional One-line 38 | snippet xif 39 | ${1:expression} if ${2:condition};${3} 40 | # Unless conditional 41 | snippet unless 42 | unless (${1}) { 43 | ${2:# body...} 44 | } 45 | # Unless conditional One-line 46 | snippet xunless 47 | ${1:expression} unless ${2:condition};${3} 48 | # Try/Except 49 | snippet eval 50 | eval { 51 | ${1:# do something risky...} 52 | }; 53 | if ($@) { 54 | ${2:# handle failure...} 55 | } 56 | # While Loop 57 | snippet wh 58 | while (${1}) { 59 | ${2:# body...} 60 | } 61 | # While Loop One-line 62 | snippet xwh 63 | ${1:expression} while ${2:condition};${3} 64 | # C-style For Loop 65 | snippet cfor 66 | for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { 67 | ${4:# body...} 68 | } 69 | # For loop one-line 70 | snippet xfor 71 | ${1:expression} for @${2:array};${3} 72 | # Foreach Loop 73 | snippet for 74 | foreach my $${1:x} (@${2:array}) { 75 | ${3:# body...} 76 | } 77 | # Foreach Loop One-line 78 | snippet fore 79 | ${1:expression} foreach @${2:array};${3} 80 | # Package 81 | snippet cl 82 | package ${1:ClassName}; 83 | 84 | use base qw(${2:ParentClass}); 85 | 86 | sub new { 87 | my $class = shift; 88 | $class = ref $class if ref $class; 89 | my $self = bless {}, $class; 90 | $self; 91 | } 92 | 93 | 1;${3} 94 | # Read File 95 | snippet slurp 96 | my $${1:var}; 97 | { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} 98 | -------------------------------------------------------------------------------- /snippets/python.snippets: -------------------------------------------------------------------------------- 1 | snippet #! 2 | #!/usr/bin/env python 3 | #coding:utf-8 4 | #author: ${2:Vingel} <${3:http://www.vingel.com}> 5 | 6 | $1 7 | # __magic__ snippet _ __${1:init}__${2} 8 | snippet i 9 | import ${1:module} 10 | snippet from 11 | from ${1:module} import ${2:property} 12 | snippet s 13 | self. 14 | snippet d 15 | ''' 16 | ${1:docstring} 17 | ''' 18 | snippet p 19 | print ${1} 20 | snippet r 21 | return ${1} 22 | # Lambda 23 | snippet ld 24 | ${1:var} = lambda ${2:vars} : ${3:action} 25 | snippet wh 26 | while ${1:condition}: 27 | ${2:# code...} 28 | snippet for 29 | for ${1:needle} in ${2:haystack}: 30 | ${3:# code...} 31 | # New Class 32 | snippet cl 33 | class ${1:ClassName}(${2:object}): 34 | """ 35 | ${3:docstring for $1} 36 | """ 37 | def __init__(self, ${4:arg}): 38 | ${5:super($1, self).__init__()} 39 | self.$4 = $4 40 | ${6} 41 | # New Function 42 | snippet def 43 | def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): 44 | """${3:docstring for $1}""" 45 | ${4:pass} 46 | snippet deff 47 | def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): 48 | ${3} 49 | # New Method 50 | snippet defs 51 | def ${1:mname}(self, ${2:arg}): 52 | ${3:pass} 53 | # New Property 54 | snippet property 55 | def ${1:foo}(): 56 | doc = "${2:The $1 property.}" 57 | def fget(self): 58 | ${3:return self._$1} 59 | def fset(self, value): 60 | ${4:self._$1 = value} 61 | snippet if 62 | if ${1:True}: 63 | ${2:pass} 64 | snippet ife 65 | if ${1:True}: 66 | ${2:pass} 67 | else: 68 | ${3:pass} 69 | snippet try Try/Except 70 | try: 71 | ${1:pass} 72 | except ${2:Exception}, ${3:e}: 73 | ${4:raise $3} 74 | snippet try Try/Except/Else 75 | try: 76 | ${1:pass} 77 | except ${2:Exception}, ${3:e}: 78 | ${4:raise $3} 79 | else: 80 | ${5:pass} 81 | snippet try Try/Except/Finally 82 | try: 83 | ${1:pass} 84 | except ${2:Exception}, ${3:e}: 85 | ${4:raise $3} 86 | finally: 87 | ${5:pass} 88 | snippet try Try/Except/Else/Finally 89 | try: 90 | ${1:pass} 91 | except ${2:Exception}, ${3:e}: 92 | ${4:raise $3} 93 | else: 94 | ${5:pass} 95 | finally: 96 | ${6:pass} 97 | # if __name__ == '__main__': 98 | snippet ifmain 99 | if __name__ == '__main__': 100 | ${1:main()} 101 | -------------------------------------------------------------------------------- /snippets/sh.snippets: -------------------------------------------------------------------------------- 1 | # #!/bin/bash 2 | snippet #! 3 | #!/bin/bash 4 | 5 | snippet if 6 | if [[ ${1:condition} ]]; then 7 | ${2:#statements} 8 | fi 9 | snippet elif 10 | elif [[ ${1:condition} ]]; then 11 | ${2:#statements} 12 | snippet for 13 | for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do 14 | ${3:#statements} 15 | done 16 | snippet wh 17 | while [[ ${1:condition} ]]; do 18 | ${2:#statements} 19 | done 20 | snippet until 21 | until [[ ${1:condition} ]]; do 22 | ${2:#statements} 23 | done 24 | snippet case 25 | case ${1:word} in 26 | ${2:pattern}) 27 | ${3};; 28 | esac 29 | -------------------------------------------------------------------------------- /snippets/snippet.snippets: -------------------------------------------------------------------------------- 1 | # snippets for making snippets :) 2 | snippet snip 3 | snippet ${1:trigger} 4 | ${2} 5 | snippet msnip 6 | snippet ${1:trigger} ${2:description} 7 | ${3} 8 | -------------------------------------------------------------------------------- /snippets/tcl.snippets: -------------------------------------------------------------------------------- 1 | # #!/usr/bin/env tclsh 2 | snippet #! 3 | #!/usr/bin/env tclsh 4 | 5 | # Process 6 | snippet pro 7 | proc ${1:function_name} {${2:args}} { 8 | ${3:#body ...} 9 | } 10 | #xif 11 | snippet xif 12 | ${1:expr}? ${2:true} : ${3:false} 13 | # Conditional 14 | snippet if 15 | if {${1}} { 16 | ${2:# body...} 17 | } 18 | # Conditional if..else 19 | snippet ife 20 | if {${1}} { 21 | ${2:# body...} 22 | } else { 23 | ${3:# else...} 24 | } 25 | # Conditional if..elsif..else 26 | snippet ifee 27 | if {${1}} { 28 | ${2:# body...} 29 | } elseif {${3}} { 30 | ${4:# elsif...} 31 | } else { 32 | ${5:# else...} 33 | } 34 | # If catch then 35 | snippet ifc 36 | if { [catch {${1:#do something...}} ${2:err}] } { 37 | ${3:# handle failure...} 38 | } 39 | # Catch 40 | snippet catch 41 | catch {${1}} ${2:err} ${3:options} 42 | # While Loop 43 | snippet wh 44 | while {${1}} { 45 | ${2:# body...} 46 | } 47 | # For Loop 48 | snippet for 49 | for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { 50 | ${4:# body...} 51 | } 52 | # Foreach Loop 53 | snippet fore 54 | foreach ${1:x} {${2:#list}} { 55 | ${3:# body...} 56 | } 57 | # after ms script... 58 | snippet af 59 | after ${1:ms} ${2:#do something} 60 | # after cancel id 61 | snippet afc 62 | after cancel ${1:id or script} 63 | # after idle 64 | snippet afi 65 | after idle ${1:script} 66 | # after info id 67 | snippet afin 68 | after info ${1:id} 69 | # Expr 70 | snippet exp 71 | expr {${1:#expression here}} 72 | # Switch 73 | snippet sw 74 | switch ${1:var} { 75 | ${3:pattern 1} { 76 | ${4:#do something} 77 | } 78 | default { 79 | ${2:#do something} 80 | } 81 | } 82 | # Case 83 | snippet ca 84 | ${1:pattern} { 85 | ${2:#do something} 86 | }${3} 87 | # Namespace eval 88 | snippet ns 89 | namespace eval ${1:path} {${2:#script...}} 90 | # Namespace current 91 | snippet nsc 92 | namespace current 93 | -------------------------------------------------------------------------------- /snippets/tex.snippets: -------------------------------------------------------------------------------- 1 | # \begin{}...\end{} 2 | snippet begin 3 | \begin{${1:env}} 4 | ${2} 5 | \end{$1} 6 | # Tabular 7 | snippet tab 8 | \begin{${1:tabular}}{${2:c}} 9 | ${3} 10 | \end{$1} 11 | # Align(ed) 12 | snippet ali 13 | \begin{align${1:ed}} 14 | ${2} 15 | \end{align$1} 16 | # Gather(ed) 17 | snippet gat 18 | \begin{gather${1:ed}} 19 | ${2} 20 | \end{gather$1} 21 | # Equation 22 | snippet eq 23 | \begin{equation} 24 | ${1} 25 | \end{equation} 26 | # Unnumbered Equation 27 | snippet \ 28 | \\[ 29 | ${1} 30 | \\] 31 | # Enumerate 32 | snippet enum 33 | \begin{enumerate} 34 | \item ${1} 35 | \end{enumerate} 36 | # Itemize 37 | snippet item 38 | \begin{itemize} 39 | \item ${1} 40 | \end{itemize} 41 | # Description 42 | snippet desc 43 | \begin{description} 44 | \item[${1}] ${2} 45 | \end{description} 46 | # Matrix 47 | snippet mat 48 | \begin{${1:p/b/v/V/B/small}matrix} 49 | ${2} 50 | \end{$1matrix} 51 | # Cases 52 | snippet cas 53 | \begin{cases} 54 | ${1:equation}, &\text{ if }${2:case}\\ 55 | ${3} 56 | \end{cases} 57 | # Split 58 | snippet spl 59 | \begin{split} 60 | ${1} 61 | \end{split} 62 | # Part 63 | snippet part 64 | \part{${1:part name}} % (fold) 65 | \label{prt:${2:$1}} 66 | ${3} 67 | % part $2 (end) 68 | # Chapter 69 | snippet cha 70 | \chapter{${1:chapter name}} % (fold) 71 | \label{cha:${2:$1}} 72 | ${3} 73 | % chapter $2 (end) 74 | # Section 75 | snippet sec 76 | \section{${1:section name}} % (fold) 77 | \label{sec:${2:$1}} 78 | ${3} 79 | % section $2 (end) 80 | # Sub Section 81 | snippet sub 82 | \subsection{${1:subsection name}} % (fold) 83 | \label{sub:${2:$1}} 84 | ${3} 85 | % subsection $2 (end) 86 | # Sub Sub Section 87 | snippet subs 88 | \subsubsection{${1:subsubsection name}} % (fold) 89 | \label{ssub:${2:$1}} 90 | ${3} 91 | % subsubsection $2 (end) 92 | # Paragraph 93 | snippet par 94 | \paragraph{${1:paragraph name}} % (fold) 95 | \label{par:${2:$1}} 96 | ${3} 97 | % paragraph $2 (end) 98 | # Sub Paragraph 99 | snippet subp 100 | \subparagraph{${1:subparagraph name}} % (fold) 101 | \label{subp:${2:$1}} 102 | ${3} 103 | % subparagraph $2 (end) 104 | snippet itd 105 | \item[${1:description}] ${2:item} 106 | snippet figure 107 | ${1:Figure}~\ref{${2:fig:}}${3} 108 | snippet table 109 | ${1:Table}~\ref{${2:tab:}}${3} 110 | snippet listing 111 | ${1:Listing}~\ref{${2:list}}${3} 112 | snippet section 113 | ${1:Section}~\ref{${2:sec:}}${3} 114 | snippet page 115 | ${1:page}~\pageref{${2}}${3} 116 | -------------------------------------------------------------------------------- /snippets/vim.snippets: -------------------------------------------------------------------------------- 1 | snippet header 2 | " File: ${1:`expand('%:t')`} 3 | " Author: ${2:`g:snips_author`} 4 | " Description: ${3} 5 | ${4:" Last Modified: `strftime("%B %d, %Y")`} 6 | snippet guard 7 | if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} 8 | finish 9 | endif 10 | let $1 = 1${3} 11 | snippet f 12 | fun ${1:function_name}(${2}) 13 | ${3:" code} 14 | endf 15 | snippet for 16 | for ${1:needle} in ${2:haystack} 17 | ${3:" code} 18 | endfor 19 | snippet wh 20 | while ${1:condition} 21 | ${2:" code} 22 | endw 23 | snippet if 24 | if ${1:condition} 25 | ${2:" code} 26 | endif 27 | snippet ife 28 | if ${1:condition} 29 | ${2} 30 | else 31 | ${3} 32 | endif 33 | -------------------------------------------------------------------------------- /snippets/zsh.snippets: -------------------------------------------------------------------------------- 1 | # #!/bin/zsh 2 | snippet #! 3 | #!/bin/zsh 4 | 5 | snippet if 6 | if ${1:condition}; then 7 | ${2:# statements} 8 | fi 9 | snippet ife 10 | if ${1:condition}; then 11 | ${2:# statements} 12 | else 13 | ${3:# statements} 14 | fi 15 | snippet elif 16 | elif ${1:condition} ; then 17 | ${2:# statements} 18 | snippet for 19 | for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do 20 | ${3:# statements} 21 | done 22 | snippet fore 23 | for ${1:item} in ${2:list}; do 24 | ${3:# statements} 25 | done 26 | snippet wh 27 | while ${1:condition}; do 28 | ${2:# statements} 29 | done 30 | snippet until 31 | until ${1:condition}; do 32 | ${2:# statements} 33 | done 34 | snippet repeat 35 | repeat ${1:integer}; do 36 | ${2:# statements} 37 | done 38 | snippet case 39 | case ${1:word} in 40 | ${2:pattern}) 41 | ${3};; 42 | esac 43 | snippet select 44 | select ${1:answer} in ${2:choices}; do 45 | ${3:# statements} 46 | done 47 | snippet ( 48 | ( ${1:#statements} ) 49 | snippet { 50 | { ${1:#statements} } 51 | snippet [ 52 | [[ ${1:test} ]] 53 | snippet always 54 | { ${1:try} } always { ${2:always} } 55 | snippet fun 56 | function ${1:name} (${2:args}) { 57 | ${3:# body} 58 | } 59 | -------------------------------------------------------------------------------- /syntax/cvsannotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: CVS annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the cvscommand plugin. Originally written by Mathieu 5 | " Clabaut 6 | " License: 7 | " Copyright (c) Bob Hiestand 8 | " 9 | " Permission is hereby granted, free of charge, to any person obtaining a copy 10 | " of this software and associated documentation files (the "Software"), to 11 | " deal in the Software without restriction, including without limitation the 12 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 13 | " sell copies of the Software, and to permit persons to whom the Software is 14 | " furnished to do so, subject to the following conditions: 15 | " 16 | " The above copyright notice and this permission notice shall be included in 17 | " all copies or substantial portions of the Software. 18 | " 19 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 25 | " IN THE SOFTWARE. 26 | 27 | if version < 600 28 | syntax clear 29 | elseif exists("b:current_syntax") 30 | finish 31 | endif 32 | 33 | syn match cvsDate /\d\d-...-\d\d/ contained 34 | syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate 35 | syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName 36 | syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate 37 | 38 | if !exists("did_cvsannotate_syntax_inits") 39 | let did_cvsannotate_syntax_inits = 1 40 | hi link cvsDate Comment 41 | hi link cvsName Type 42 | hi link cvsVer Statement 43 | endif 44 | 45 | let b:current_syntax="CVSAnnotate" 46 | -------------------------------------------------------------------------------- /syntax/eco.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: eco 3 | " Maintainer: Jay Adkisson 4 | " Mostly stolen from eruby.vim 5 | 6 | if !exists("g:eco_default_subtype") 7 | let g:eco_default_subtype = "html" 8 | endif 9 | 10 | if !exists("b:eco_subtype") 11 | let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") 12 | let b:eco_subtype = matchstr(s:lines,'eco_subtype=\zs\w\+') 13 | if b:eco_subtype == '' 14 | let b:eco_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eco\)\+$','',''),'\.\zs\w\+$') 15 | endif 16 | if b:eco_subtype == 'rhtml' 17 | let b:eco_subtype = 'html' 18 | elseif b:eco_subtype == 'jst' 19 | let b:eco_subtype = 'html' 20 | elseif b:eco_subtype == 'rb' 21 | let b:eco_subtype = 'ruby' 22 | elseif b:eco_subtype == 'yml' 23 | let b:eco_subtype = 'yaml' 24 | elseif b:eco_subtype == 'js' || b:eco_subtype == 'json' 25 | let b:eco_subtype = 'javascript' 26 | elseif b:eco_subtype == 'txt' 27 | " Conventional; not a real file type 28 | let b:eco_subtype = 'text' 29 | elseif b:eco_subtype == '' 30 | if exists('b:current_syntax') && b:current_syntax != '' 31 | let b:eco_subtype = b:current_syntax 32 | else 33 | let b:eco_subtype = g:eco_default_subtype 34 | endif 35 | endif 36 | endif 37 | 38 | if exists("b:eco_subtype") && b:eco_subtype != '' && b:eco_subtype != 'eco' 39 | exec "runtime! syntax/".b:eco_subtype.".vim" 40 | syn include @coffeeTop syntax/coffee.vim 41 | endif 42 | 43 | syn cluster ecoRegions contains=ecoBlock,ecoExpression,ecoComment 44 | 45 | syn region ecoBlock matchgroup=ecoDelimiter start=/<%/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend 46 | syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend 47 | syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend 48 | 49 | " eco features not in coffeescript proper 50 | syn keyword ecoEnd end containedin=@ecoRegions 51 | syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions 52 | 53 | " Define the default highlighting. 54 | 55 | hi def link ecoDelimiter Delimiter 56 | hi def link ecoComment Comment 57 | hi def link ecoEnd coffeeConditional 58 | hi def link ecoIndentColon None 59 | 60 | let b:current_syntax = 'eco' 61 | 62 | " vim: nowrap sw=2 sts=2 ts=8: 63 | -------------------------------------------------------------------------------- /syntax/eruby.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: eRuby 3 | " Maintainer: Tim Pope 4 | " Info: $Id: eruby.vim,v 1.18 2007/05/06 23:56:12 tpope Exp $ 5 | " URL: http://vim-ruby.rubyforge.org 6 | " Anon CVS: See above site 7 | " Release Coordinator: Doug Kearns 8 | 9 | if exists("b:current_syntax") 10 | finish 11 | endif 12 | 13 | if !exists("main_syntax") 14 | let main_syntax = 'eruby' 15 | endif 16 | 17 | if !exists("g:eruby_default_subtype") 18 | let g:eruby_default_subtype = "html" 19 | endif 20 | 21 | if !exists("b:eruby_subtype") && main_syntax == 'eruby' 22 | let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") 23 | let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') 24 | if b:eruby_subtype == '' 25 | let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\)\+$','',''),'\.\zs\w\+$') 26 | endif 27 | if b:eruby_subtype == 'rhtml' 28 | let b:eruby_subtype = 'html' 29 | elseif b:eruby_subtype == 'rb' 30 | let b:eruby_subtype = 'ruby' 31 | elseif b:eruby_subtype == 'yml' 32 | let b:eruby_subtype = 'yaml' 33 | elseif b:eruby_subtype == 'js' 34 | let b:eruby_subtype = 'javascript' 35 | elseif b:eruby_subtype == 'txt' 36 | " Conventional; not a real file type 37 | let b:eruby_subtype = 'text' 38 | elseif b:eruby_subtype == '' 39 | let b:eruby_subtype = g:eruby_default_subtype 40 | endif 41 | endif 42 | 43 | if !exists("b:eruby_nest_level") 44 | let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g')) 45 | endif 46 | if !b:eruby_nest_level 47 | let b:eruby_nest_level = 1 48 | endif 49 | 50 | if exists("b:eruby_subtype") && b:eruby_subtype != '' 51 | exe "runtime! syntax/".b:eruby_subtype.".vim" 52 | unlet! b:current_syntax 53 | endif 54 | syn include @rubyTop syntax/ruby.vim 55 | 56 | syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment 57 | 58 | exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erbRegions keepend oneline' 59 | exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erbRegions' 60 | exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erbRegions' 61 | exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="-\=%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erbRegions keepend' 62 | 63 | " Define the default highlighting. 64 | " For version 5.7 and earlier: only when not done already 65 | " For version 5.8 and later: only when an item doesn't have highlighting yet 66 | if version >= 508 || !exists("did_eruby_syntax_inits") 67 | if version < 508 68 | let did_ruby_syntax_inits = 1 69 | command -nargs=+ HiLink hi link 70 | else 71 | command -nargs=+ HiLink hi def link 72 | endif 73 | 74 | HiLink erubyDelimiter Delimiter 75 | HiLink erubyComment Comment 76 | 77 | delcommand HiLink 78 | endif 79 | let b:current_syntax = 'eruby' 80 | 81 | if main_syntax == 'eruby' 82 | unlet main_syntax 83 | endif 84 | 85 | " vim: nowrap sw=2 sts=2 ts=8 ff=unix: 86 | -------------------------------------------------------------------------------- /syntax/gitannotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: git annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained 31 | syn match gitCommit /^\^\?\x\+/ contained 32 | syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained 33 | syn match gitLineNumber /\d\+)\@=/ contained 34 | syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName 35 | 36 | if !exists("did_gitannotate_syntax_inits") 37 | let did_gitannotate_syntax_inits = 1 38 | hi link gitName Type 39 | hi link gitCommit Statement 40 | hi link gitDate Comment 41 | hi link gitLineNumber Label 42 | endif 43 | 44 | let b:current_syntax="gitAnnotate" 45 | -------------------------------------------------------------------------------- /syntax/godoc.vim: -------------------------------------------------------------------------------- 1 | " Copyright 2011 The Go Authors. All rights reserved. 2 | " Use of this source code is governed by a BSD-style 3 | " license that can be found in the LICENSE file. 4 | 5 | if exists("b:current_syntax") 6 | finish 7 | endif 8 | 9 | syn case match 10 | syn match godocTitle "^\([A-Z]*\)$" 11 | 12 | command -nargs=+ HiLink hi def link 13 | 14 | HiLink godocTitle Title 15 | 16 | delcommand HiLink 17 | 18 | let b:current_syntax = "godoc" 19 | 20 | " vim:ts=4 sts=2 sw=2: 21 | -------------------------------------------------------------------------------- /syntax/help_cn.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax extention file for Chinese help 2 | scriptencoding utf-8 3 | " Language: Vim help file 4 | " Maintainer: lang2 (http://vimcdoc.sf.net) 5 | " Last Change: 2005 March 6 | " Usage: copy this file to $VIMRUNTIME/syntax 7 | 8 | syn match helpHeadlineCn "^\([^\u0000-\u00ff]\s\|[-A-Z .]\)\+[ \t]\+\*"me=e-1 9 | syn match helpVimCn "VIM \(参考\|用户\)手册.*" 10 | syn keyword helpNoteCn 注意 备注 11 | syn match helpNoteCn /注意\|备注/ 12 | syn match helpYizheCn /译者/ 13 | syn region helpNotViCn start="{没有" start="{仅" end="}" contains=helpLeadBlank,helpHyperTextJump 14 | 15 | hi link helpHeadlineCn helpHeadline 16 | hi link helpVimCn helpVim 17 | hi link helpNoteCn helpNote 18 | hi link helpNotViCn helpNotVi 19 | hi link helpYizheCn Identifier 20 | 21 | " vim: ts=8 sw=2 22 | -------------------------------------------------------------------------------- /syntax/hgannotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: HG annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn match hgVer /\d\+/ contained 31 | syn match hgName /^\s*\S\+/ contained 32 | syn match hgHead /^\s*\S\+\s\+\d\+:/ contains=hgVer,hgName 33 | 34 | if !exists("did_hgannotate_syntax_inits") 35 | let did_hgannotate_syntax_inits = 1 36 | hi link hgName Type 37 | hi link hgVer Statement 38 | endif 39 | 40 | let b:current_syntax="hgAnnotate" 41 | -------------------------------------------------------------------------------- /syntax/json.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: JSON 3 | " Maintainer: Jeroen Ruigrok van der Werven 4 | " Last Change: 2009-06-16 5 | " Version: 0.4 6 | " {{{1 7 | 8 | " Syntax setup {{{2 9 | " For version 5.x: Clear all syntax items 10 | " For version 6.x: Quit when a syntax file was already loaded 11 | 12 | if !exists("main_syntax") 13 | if version < 600 14 | syntax clear 15 | elseif exists("b:current_syntax") 16 | finish 17 | endif 18 | let main_syntax = 'json' 19 | endif 20 | 21 | " Syntax: Strings {{{2 22 | syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape 23 | " Syntax: JSON does not allow strings with single quotes, unlike JavaScript. 24 | syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+ 25 | 26 | " Syntax: Escape sequences {{{3 27 | syn match jsonEscape "\\["\\/bfnrt]" contained 28 | syn match jsonEscape "\\u\x\{4}" contained 29 | 30 | " Syntax: Strings should always be enclosed with quotes. 31 | syn match jsonNoQuotes "\<\a\+\>" 32 | 33 | " Syntax: Numbers {{{2 34 | syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" 35 | 36 | " Syntax: An integer part of 0 followed by other digits is not allowed. 37 | syn match jsonNumError "-\=\<0\d\.\d*\>" 38 | 39 | " Syntax: Boolean {{{2 40 | syn keyword jsonBoolean true false 41 | 42 | " Syntax: Null {{{2 43 | syn keyword jsonNull null 44 | 45 | " Syntax: Braces {{{2 46 | syn match jsonBraces "[{}\[\]]" 47 | 48 | " Define the default highlighting. {{{1 49 | " For version 5.7 and earlier: only when not done already 50 | " For version 5.8 and later: only when an item doesn't have highlighting yet 51 | if version >= 508 || !exists("did_json_syn_inits") 52 | if version < 508 53 | let did_json_syn_inits = 1 54 | command -nargs=+ HiLink hi link 55 | else 56 | command -nargs=+ HiLink hi def link 57 | endif 58 | HiLink jsonString String 59 | HiLink jsonEscape Special 60 | HiLink jsonNumber Number 61 | HiLink jsonBraces Operator 62 | HiLink jsonNull Function 63 | HiLink jsonBoolean Boolean 64 | 65 | HiLink jsonNumError Error 66 | HiLink jsonStringSQ Error 67 | HiLink jsonNoQuotes Error 68 | delcommand HiLink 69 | endif 70 | 71 | let b:current_syntax = "json" 72 | if main_syntax == 'json' 73 | unlet main_syntax 74 | endif 75 | 76 | " Vim settings {{{2 77 | " vim: ts=8 fdm=marker 78 | -------------------------------------------------------------------------------- /syntax/less.vim: -------------------------------------------------------------------------------- 1 | if exists("b:current_syntax") 2 | finish 3 | endif 4 | 5 | runtime! syntax/css.vim 6 | runtime! after/syntax/css.vim 7 | " load files from vim-css3-syntax plugin (https://github.com/hail2u/vim-css3-syntax) 8 | runtime! after/syntax/css/*.vim 9 | 10 | syn case ignore 11 | 12 | syn region lessDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssTagName,cssPseudoClass,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,lessDefinition,lessComment,lessClassChar,lessVariable,lessMixinChar,lessAmpersandChar,lessFunction,@cssColors 13 | 14 | syn match lessVariable "@[[:alnum:]_-]\+" contained 15 | syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessVariableAssignment skipwhite 16 | syn match lessVariableAssignment ":" contained nextgroup=lessVariableValue skipwhite 17 | syn match lessVariableValue ".*;"me=e-1 contained contains=lessVariable,lessOperator,lessDefault,cssValue.*,@cssColors "me=e-1 means that the last char of the pattern is not highlighted 18 | 19 | syn match lessOperator "+" contained 20 | syn match lessOperator "-" contained 21 | syn match lessOperator "/" contained 22 | syn match lessOperator "*" contained 23 | 24 | syn match lessDefault "!default" contained 25 | 26 | syn match lessMixinChar "\.[[:alnum:]_-]\@=" contained nextgroup=lessClass 27 | syn match lessAmpersandChar "&" contained nextgroup=lessClass,cssPseudoClass 28 | syn match lessClass "[[:alnum:]_-]\+" contained 29 | 30 | syn keyword lessFunction lighten darken saturate desaturate fadein fadeout spin hue saturation lightness containedin=cssDefinition contained 31 | 32 | syn match lessComment "//.*$" contains=@Spell 33 | 34 | hi def link lessVariable Special 35 | hi def link lessVariableValue Constant 36 | hi def link lessDefault Special 37 | hi def link lessComment Comment 38 | hi def link lessFunction Function 39 | hi def link lessMixinChar Special 40 | hi def link lessAmpersandChar Special 41 | hi def link lessClass PreProc 42 | 43 | let b:current_syntax = "less" 44 | 45 | -------------------------------------------------------------------------------- /syntax/log.vim: -------------------------------------------------------------------------------- 1 | " Syntax for .LOG file. 2 | " support Windows System Logs, Apache Logs, and any simply LOG file... 3 | " See: http://en.wikipedia.org/wiki/ISO_8601 4 | " http://msdn.microsoft.com/zh-cn/library/ms141005.aspx 5 | " http://www.w3.org/TR/NOTE-datetime 6 | " Author: 闲耘™(hotoo.cn[AT]xianyun.org) 7 | " Date: 2010/05/13 8 | 9 | " for Windows log. 10 | syn match WindowsProfix /^\d\+\.\d\+/ 11 | 12 | "syn keyword logsKey contained message debug warning error info 13 | syn match logsTypeSucc /\[\(success\|succ\)\]/ 14 | syn match logsTypeSucc /\[\?\(SUCCESS\|SUCC\)\]\?/ 15 | syn match logsTypeInfo /\[\(message\|info\)\]/ 16 | syn match logsTypeInfo /\[\?\(MESSAGE\|INFO\)\]\?/ 17 | "syn match logsTypeInfo /\[.\{-}\]/ 18 | "syn match logsTypeInfo /\[[^\]]*\]/ 19 | syn match logsTypeWarning /\[\(warn\|debug\|bug\)\]/ 20 | syn match logsTypeWarning /\[\?\<\(WARN\|DEBUG\|BUG\)\>\]\?/ 21 | syn match logsTypeError /\[error\]/ 22 | syn match logsTypeError /\[\?\\]\?/ 23 | 24 | syn match Comments /^#.*$/ 25 | "!syn match String /"[^"]"/ 26 | "syn match String /".\{-}"/ 27 | "!syn match String /'[^']'/ 28 | "syn match String /'.\{-}'/ 29 | syn match URI /\w:\\[a-zA-Z0-9\.\\~@#$%^&\*_\-]\+/ 30 | syn match URI /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ 31 | syn match URI /https\?:\/\/[a-zA-Z0-9\.\/~@#$%^&\*_\-?=]\+/ 32 | syn match URI /file:\/[a-zA-Z0-9\.\/~@#$%^&\*_\-?=:]\+/ 33 | syn match Date /\d\{4}\([\-\/\.]\)\d\{1,2}\1\d\{1,2}/ 34 | syn match Date /\d\{4}年\d\{1,2}月\d\{1,2}日/ 35 | syn match Date /\d\{1,2}\([\-\/\.]\)\d\{1,2}\1\d\{4}/ 36 | syn match Date /\d\{1,2}\([\-\/\.\ ]\)\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\1\d\{4}/ 37 | syn match Time /\d\{1,2}:\d\{1,2}:\d\{1,2}\([\.,]\d\+\|\ +\d\+\)\?/ 38 | syn match DateTime /\d\{4}\([\-\/\.]\)\d\{1,2}\1\d\{1,2}[\ Tt]\d\{1,2}:\d\{1,2}:\d\{1,2}\([\.,]\d\+\)\?/ 39 | syn match DateTime /\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\)\ \(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\ \d\{1,2}\ \d\{1,2}:\d\{1,2}:\d\{1,2}\(\ \(CST\|PST\)\)\?\ \d\{4}/ 40 | 41 | "syn match logsNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" 42 | 43 | hi logsKey guifg=#ff6600 44 | "hi logsTypeInfo guifg=#3399ff 45 | hi logsTypeInfo guifg=#ffffff guibg=#3399ff 46 | hi logsTypeWarning guifg=#ff0000 guibg=#ffff00 47 | hi logsTypeError guibg=#ff0000 guifg=#ffff00 48 | hi logsTypeSucc guibg=#008000 guifg=#ffffff 49 | hi Comments guifg=#666666 50 | "hi String guifg=#55a255 51 | hi URI gui=underline 52 | hi Title gui=bold guifg=#cc3300 53 | hi DateTime guifg=#8ec2f5 54 | hi Date guifg=#8ec2f5 55 | hi Time guifg=#8ec2f5 56 | hi logsNumber guifg=#ff6600 57 | 58 | hi WindowsProfix guifg=#8ec2f5 59 | -------------------------------------------------------------------------------- /syntax/snippet.vim: -------------------------------------------------------------------------------- 1 | " Syntax highlighting for snippet files (used for snipMate.vim) 2 | " Hopefully this should make snippets a bit nicer to write! 3 | syn match snipComment '^#.*' 4 | syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand 5 | syn match tabStop '\$\d\+' 6 | syn match snipCommand '`.\{-}`' 7 | syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword 8 | syn match multiSnipText '\S\+ \zs.*' contained 9 | syn match snipKeyword '^snippet'me=s+8 contained 10 | syn match snipError "^[^#s\t].*$" 11 | 12 | hi link snipComment Comment 13 | hi link multiSnipText String 14 | hi link snipKeyword Keyword 15 | hi link snipComment Comment 16 | hi link placeHolder Special 17 | hi link tabStop Special 18 | hi link snipCommand String 19 | hi link snipError Error 20 | -------------------------------------------------------------------------------- /syntax/svkannotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: SVK annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained 31 | syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite 32 | syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite 33 | syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline 34 | 35 | if !exists("did_svkannotate_syntax_inits") 36 | let did_svkannotate_syntax_inits = 1 37 | hi link svkName Type 38 | hi link svkDate Comment 39 | hi link svkVer Statement 40 | endif 41 | 42 | let b:current_syntax="svkAnnotate" 43 | -------------------------------------------------------------------------------- /syntax/svnannotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: SVN annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn match svnName /\S\+/ contained 31 | syn match svnVer /^\s*\zs\d\+/ contained nextgroup=svnName skipwhite 32 | syn match svnHead /^\s*\d\+\s\+\S\+/ contains=svnVer,svnName 33 | 34 | if !exists("did_svnannotate_syntax_inits") 35 | let did_svnannotate_syntax_inits = 1 36 | hi link svnName Type 37 | hi link svnVer Statement 38 | endif 39 | 40 | let b:current_syntax="svnAnnotate" 41 | -------------------------------------------------------------------------------- /syntax/swift.vim: -------------------------------------------------------------------------------- 1 | " Language: Swift 2 | " Maintainer: toyama satoshi 3 | " URL: http://github.com/toyamarinyon/vim-swift 4 | " License: GPL 5 | 6 | " Bail if our syntax is already loaded. 7 | if exists('b:current_syntax') && b:current_syntax == 'swift' 8 | finish 9 | endif 10 | 11 | " {{{ Whitespace and Comments 12 | syntax region swiftComment start=#\/\*# end=#\*\/# 13 | syntax match swiftComment /\/\/.*/ 14 | highlight default link swiftComment Comment 15 | " }}} 16 | 17 | " {{{ Identifiers 18 | syntax match swiftIdentifier /[[:alpha:]_][[:alnum:]_]*/ 19 | highlight default link swiftIdentifier Identifier 20 | " }}} 21 | 22 | " {{{ Keywords 23 | " Keywords used in declarations: 24 | syntax keyword swiftDeclarationKeywords class deinit enum extension func import init let protocol static struct subscript typealias var 25 | highlight default link swiftDeclarationKeywords Keyword 26 | " Keywords used in statements: 27 | syntax keyword swiftStatementKeywords break case continue default do else fallthrough if in for return switch where while 28 | highlight default link swiftStatementKeywords Keyword 29 | " Keywords used in expressions and types: 30 | syntax keyword swiftExpressionTypeKeywords as dynamicType is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ __LINE__ 31 | highlight default link swiftExpressionTypeKeywords Keyword 32 | " Keywords reserved in particular contexts: 33 | syntax keyword swiftReserveKeywords associativity didSet get infix inout left mutating none nonmutating operator override postfix precedence prefix right set unowned unowned(safe) unowned(unsafe) weak willSet 34 | highlight default link swiftReserveKeywords Keyword 35 | " }}} 36 | 37 | " {{{ Literals 38 | " Integer literal 39 | syntax match swiftIntegerLiteral /\<\d\+\%(_\d\+\)*\%(\.\d\+\%(_\d\+\)*\)\=\>/ 40 | syntax match swiftIntegerLiteral /\<\d\+\%(_\d\+\)*\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>/ 41 | syntax match swiftIntegerLiteral /\<0x\x\+\%(_\x\+\)*\>/ 42 | syntax match swiftIntegerLiteral /\<0o\o\+\%(_\o\+\)*\>/ 43 | syntax match swiftIntegerLiteral /\<0b[01]\+\%(_[01]\+\)*\>/ 44 | highlight default link swiftIntegerLiteral Number 45 | " String literal 46 | syntax region swiftStringLiteral start=/"/ skip=/\\"/ end=/"/ 47 | highlight default link swiftStringLiteral String 48 | " }}} 49 | 50 | " {{{ Operators 51 | syntax keyword swiftOperatorKeywords / = - + ! * % < > & \| ^ ~ . 52 | highlight default link swiftOperatorKeywords Operator 53 | " }}} 54 | 55 | " {{{ Type 56 | syntax match swiftTypeIdentifier /\<[[:alpha:]_][[:alnum:]_.]*/ contained 57 | syntax match swiftType /: .*/ contains=swiftTypeIdentifier 58 | highlight default link swiftType Operator 59 | highlight default link swiftTypeIdentifier Type 60 | " }}} 61 | 62 | if !exists('b:current_syntax') 63 | let b:current_syntax = 'swift' 64 | endif 65 | -------------------------------------------------------------------------------- /syntax/tagbar.vim: -------------------------------------------------------------------------------- 1 | " File: tagbar.vim 2 | " Description: Tagbar syntax settings 3 | " Author: Jan Larres 4 | " Licence: Vim licence 5 | " Website: http://majutsushi.github.com/tagbar/ 6 | " Version: 2.1 7 | 8 | if exists("b:current_syntax") 9 | finish 10 | endif 11 | 12 | if has('multi_byte') && has('unix') && &encoding == 'utf-8' && 13 | \ (empty(&termencoding) || &termencoding == 'utf-8') 14 | syntax match TagbarKind '\([▶▼] \)\@<=[^-+: ]\+[^:]\+$' 15 | syntax match TagbarScope '\([▶▼][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@=' 16 | 17 | syntax match TagbarFoldIcon '[▶▼]\([-+# ]\)\@=' 18 | 19 | syntax match TagbarAccessPublic '\([▶▼ ]\)\@<=+\([^-+# ]\)\@=' 20 | syntax match TagbarAccessProtected '\([▶▼ ]\)\@<=#\([^-+# ]\)\@=' 21 | syntax match TagbarAccessPrivate '\([▶▼ ]\)\@<=-\([^-+# ]\)\@=' 22 | elseif has('multi_byte') && (has('win32') || has('win64')) && g:tagbar_usearrows 23 | syntax match TagbarKind '\([▷◢] \)\@<=[^-+: ]\+[^:]\+$' 24 | syntax match TagbarScope '\([▷◢][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@=' 25 | 26 | syntax match TagbarFoldIcon '[▷◢]\([-+# ]\)\@=' 27 | 28 | syntax match TagbarAccessPublic '\([▷◢ ]\)\@<=+\([^-+# ]\)\@=' 29 | syntax match TagbarAccessProtected '\([▷◢ ]\)\@<=#\([^-+# ]\)\@=' 30 | syntax match TagbarAccessPrivate '\([▷◢ ]\)\@<=-\([^-+# ]\)\@=' 31 | else 32 | syntax match TagbarKind '\([-+] \)\@<=[^-+: ]\+[^:]\+$' 33 | syntax match TagbarScope '\([-+][-+# ]\)\@<=[^*]\+\(\*\?\(([^)]\+)\)\? :\)\@=' 34 | 35 | syntax match TagbarFoldIcon '[-+]\([-+# ]\)\@=' 36 | 37 | syntax match TagbarAccessPublic '\([-+ ]\)\@<=+\([^-+# ]\)\@=' 38 | syntax match TagbarAccessProtected '\([-+ ]\)\@<=#\([^-+# ]\)\@=' 39 | syntax match TagbarAccessPrivate '\([-+ ]\)\@<=-\([^-+# ]\)\@=' 40 | endif 41 | 42 | syntax match TagbarComment '^".*' 43 | syntax match TagbarType ' : \zs.*' 44 | syntax match TagbarSignature '(.*)' 45 | syntax match TagbarPseudoID '\*\ze :' 46 | 47 | highlight default link TagbarComment Comment 48 | highlight default link TagbarKind Identifier 49 | highlight default link TagbarScope Title 50 | highlight default link TagbarType Type 51 | highlight default link TagbarSignature SpecialKey 52 | highlight default link TagbarPseudoID NonText 53 | highlight default link TagbarFoldIcon Statement 54 | highlight default link TagbarHighlight Search 55 | 56 | highlight default TagbarAccessPublic guifg=Green ctermfg=Green 57 | highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue 58 | highlight default TagbarAccessPrivate guifg=Red ctermfg=Red 59 | 60 | let b:current_syntax = "tagbar" 61 | -------------------------------------------------------------------------------- /syntax/textile.vim: -------------------------------------------------------------------------------- 1 | " 2 | " You will have to restart vim for this to take effect. In any case 3 | " it is a good idea to read ":he new-filetype" so that you know what 4 | " is going on, and why the above lines work. 5 | " 6 | " Written originally by Dominic Mitchell, Jan 2006. 7 | " happygiraffe.net 8 | " 9 | " Modified by Aaron Bieber, May 2007. 10 | " blog.aaronbieber.com 11 | " 12 | " Modified by Tim Harper, July 2008 - current 13 | " tim.theenchanter.com 14 | " @(#) $Id$ 15 | 16 | if version < 600 17 | syntax clear 18 | elseif exists("b:current_syntax") 19 | finish 20 | endif 21 | 22 | " Textile commands like "h1" are case sensitive, AFAIK. 23 | syn case match 24 | 25 | " Textile syntax: 26 | 27 | " Inline elements. 28 | syn match txtEmphasis /_[^_]\+_/ 29 | syn match txtBold /\*[^*]\+\*/ 30 | syn match txtCite /??.\+??/ 31 | syn match txtDeleted /-[^-]\+-/ 32 | syn match txtInserted /+[^+]\++/ 33 | syn match txtSuper /\^[^^]\+\^/ 34 | syn match txtSub /\~[^~]\+\~/ 35 | syn match txtSpan /%[^%]\+%/ 36 | syn match txtFootnoteRef /\[[0-9]\+]/ 37 | syn match txtCode /@[^@]\+@/ 38 | 39 | " Block elements. 40 | syn match txtHeader /^h1\. .\+/ 41 | syn match txtHeader2 /^h2\. .\+/ 42 | syn match txtHeader3 /^h[3-6]\..\+/ 43 | syn match txtBlockquote /^bq\./ 44 | syn match txtFootnoteDef /^fn[0-9]\+\./ 45 | syn match txtListBullet /\v^\*+ / 46 | syn match txtListBullet2 /\v^(\*\*)+ / 47 | syn match txtListNumber /\v^#+ / 48 | syn match txtListNumber2 /\v^(##)+ / 49 | 50 | syn cluster txtBlockElement contains=txtHeader,txtBlockElement,txtFootnoteDef,txtListBullet,txtListNumber 51 | 52 | 53 | " Everything after the first colon is from RFC 2396, with extra 54 | " backslashes to keep vim happy... Original: 55 | " ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? 56 | " 57 | " Revised the pattern to exclude spaces from the URL portion of the 58 | " pattern. Aaron Bieber, 2007. 59 | syn match txtLink /"[^"]\+":\(\([^:\/?# ]\+\):\)\?\(\/\/\([^\/?# ]*\)\)\?\([^?# ]*\)\(?\([^# ]*\)\)\?\(#\([^ ]*\)\)\?/ 60 | 61 | syn cluster txtInlineElement contains=txtEmphasis,txtBold,txtCite,txtDeleted,txtInserted,txtSuper,txtSub,txtSpan 62 | 63 | if version >= 508 || !exists("did_txt_syn_inits") 64 | if version < 508 65 | let did_txt_syn_inits = 1 66 | command -nargs=+ HiLink hi link 67 | else 68 | command -nargs=+ HiLink hi def link 69 | endif 70 | 71 | HiLink txtHeader Title 72 | HiLink txtHeader2 Question 73 | HiLink txtHeader3 Statement 74 | HiLink txtBlockquote Comment 75 | HiLink txtListBullet Operator 76 | HiLink txtListBullet2 Constant 77 | HiLink txtListNumber Operator 78 | HiLink txtListNumber2 Constant 79 | HiLink txtLink String 80 | HiLink txtCode Identifier 81 | hi def txtEmphasis term=underline cterm=underline gui=italic 82 | hi def txtBold term=bold cterm=bold gui=bold 83 | 84 | delcommand HiLink 85 | endif 86 | 87 | " vim: set ai et sw=4 : 88 | -------------------------------------------------------------------------------- /syntax/vcscommit.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: VCS commit file 3 | " Maintainer: Bob Hiestand (bob.hiestand@gmail.com) 4 | " License: 5 | " Copyright (c) Bob Hiestand 6 | " 7 | " Permission is hereby granted, free of charge, to any person obtaining a copy 8 | " of this software and associated documentation files (the "Software"), to 9 | " deal in the Software without restriction, including without limitation the 10 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | " sell copies of the Software, and to permit persons to whom the Software is 12 | " furnished to do so, subject to the following conditions: 13 | " 14 | " The above copyright notice and this permission notice shall be included in 15 | " all copies or substantial portions of the Software. 16 | " 17 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | " IN THE SOFTWARE. 24 | 25 | if exists("b:current_syntax") 26 | finish 27 | endif 28 | 29 | syntax region vcsComment start="^VCS: " end="$" 30 | highlight link vcsComment Comment 31 | let b:current_syntax = "vcscommit" 32 | -------------------------------------------------------------------------------- /syntax/velocity.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Velocity HTML template 3 | " Maintainer: Hsiaoming Young 4 | " Last Change: 2012 Jan 09 5 | 6 | " For version 5.x: Clear all syntax items 7 | " For version 6.x: Quit when a syntax file was already loaded 8 | if version < 600 9 | syntax clear 10 | elseif exists("b:current_syntax") 11 | finish 12 | endif 13 | 14 | if !exists("main_syntax") 15 | let main_syntax = 'html' 16 | endif 17 | 18 | if version < 600 19 | so :p:h/html.vim 20 | else 21 | runtime! syntax/html.vim 22 | unlet b:current_syntax 23 | endif 24 | 25 | syn keyword velocityTodo FIXME TODO contained 26 | syn region velocitySpec start="@" end=" " oneline contained 27 | syn region velocityComment start="#\*" end="\*#" contains=velocityTodo,velocitySpec 28 | syn match velocityComment /##.*/ contains=velocityTodo,velocitySpec 29 | syn region velocityString start='"' end='"' oneline 30 | syn region velocityList start='\[' end='\]' oneline contained contains=velocityString 31 | syn match velocityMath /=\|-\|+\|\/\|\*\|%/ contained 32 | syn match velocityBlock /#[a-z]\{2,\}/ contains=velocityStatement 33 | syn match velocityBlock /#[a-z]\{2,\}(.\+)/ contains=velocityStatement,velocityVar,velocityString,velocityMath,velocityList 34 | syn keyword velocityStatement in set if else elseif end foreach include parse macro cmsparse stop break evaluate define contained 35 | 36 | syn match velocityVar /$!\?[a-zA-Z][a-zA-Z0-9_-]\+\.\?[a-zA-Z0-9]*/ contains=velocityFunction display containedin=ALL 37 | syn match velocityVar /$!\?{[a-zA-Z][a-zA-Z0-9_-]\+}/ display containedin=ALL 38 | syn match velocityFunction /[a-zA-Z][a-zA-Z0-9_-]\+\.[a-zA-Z][a-zA-Z0-9_-]\+([^)]*)/ contains=velocityString,velocityList,velocityMath,velocityVar,velocityFunction display containedin=velocityBlock 39 | 40 | " Define the default highlighting. 41 | " For version 5.7 and earlier: only when not done already 42 | " For version 5.8 and later: only when an item doesn't have highlighting yet 43 | if version >= 508 || !exists("did_velocity_syn_inits") 44 | if version < 508 45 | let did_velocity_syn_inits = 1 46 | command -nargs=+ HiLink hi link 47 | else 48 | command -nargs=+ HiLink hi def link 49 | endif 50 | 51 | HiLink velocityString String 52 | HiLink velocityList Constant 53 | HiLink velocityBlock PreProc 54 | HiLink velocitySpec Special 55 | HiLink velocityVar Identifier 56 | HiLink velocityFunction Function 57 | HiLink velocityStatement Statement 58 | HiLink velocityComment Comment 59 | HiLink velocityTodo Todo 60 | 61 | delcommand HiLink 62 | endif 63 | 64 | let b:current_syntax = "velocity" 65 | -------------------------------------------------------------------------------- /template/html.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | #cursor# 8 | 9 | 10 | -------------------------------------------------------------------------------- /template/javascript.tpl: -------------------------------------------------------------------------------- 1 | /** 2 | * filename.js 3 | * @author Vingel 4 | * @date 5 | * @link http://www.vingel.com 6 | */ 7 | 8 | (function($){ 9 | $(document).ready(function(){ 10 | #cursor# 11 | }); 12 | })(jQuery); 13 | 14 | // vim: set et sw=4 ts=4 sts=4 fdm=marker ff=unix fenc=utf8 nobomb: 15 | -------------------------------------------------------------------------------- /template/php.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Alpha 7 | 8 | 9 | 12 | 13 | 14 |
15 |
16 |
17 | 19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /vimrc_mini: -------------------------------------------------------------------------------- 1 | set autoindent 2 | set copyindent 3 | set expandtab 4 | set fileformats=unix,dos,mac 5 | set lazyredraw 6 | set lbr 7 | set linespace=4 8 | set magic 9 | set nobackup 10 | set nocompatible 11 | set noswapfile 12 | set nowb 13 | set nu 14 | set ruler 15 | set shiftwidth=4 16 | set showcmd 17 | set showfulltag 18 | set showmatch 19 | set smarttab 20 | set so=7 21 | set softtabstop=4 22 | set statusline=%F%m%r%h%w\ CW\ %r%{CurDir()}%h\ [%Y,%{&ff},%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ [POS=%l,%v,%p%%,%L] 23 | set tabstop=4 24 | set wildmenu 25 | syntax enable 26 | filetype plugin indent on 27 | --------------------------------------------------------------------------------