Update ALL the plugins!
git-svn-id: http://photonzero.com/dotfiles/trunk@80 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
parent
0a85941bf4
commit
0ad6077023
42 changed files with 9620 additions and 1644 deletions
|
|
@ -12,7 +12,7 @@ The *Official Version* of this plugin is available at [vim.org](http://www.vim.o
|
|||
|
||||
### Ack
|
||||
|
||||
You have to install [ack](http://search.cpan.org/~petdance/ack/ack), of course.
|
||||
You have to install [ack](http://betterthangrep.com/), of course.
|
||||
|
||||
Install on Debian / Ubuntu with:
|
||||
|
||||
|
|
@ -26,6 +26,9 @@ Install on Gentoo with:
|
|||
|
||||
sudo emerge ack
|
||||
|
||||
Install with Homebrew:
|
||||
brew install ack
|
||||
|
||||
Install with MacPorts:
|
||||
|
||||
sudo port install p5-app-ack
|
||||
|
|
@ -59,7 +62,7 @@ in this window will open the file, and place the cursor on the matching line.
|
|||
|
||||
Just like where you use :grep, :grepadd, :lgrep, and :lgrepadd, you can use `:Ack`, `:AckAdd`, `:LAck`, and `:LAckAdd` respectively. (See `doc/ack.txt`, or install and `:h Ack` for more information.)
|
||||
|
||||
**From the [ack docs](http://search.cpan.org/~petdance/ack/ack)** (my favorite feature):
|
||||
**From the [ack docs](http://betterthangrep.com/)** (my favorite feature):
|
||||
|
||||
--type=TYPE, --type=noTYPE
|
||||
|
||||
|
|
@ -71,10 +74,20 @@ Just like where you use :grep, :grepadd, :lgrep, and :lgrepadd, you can use `:Ac
|
|||
|
||||
See ack --help=types for a list of valid types.
|
||||
|
||||
### Keyboard Shortcuts ###
|
||||
|
||||
In the quickfix window, you can use:
|
||||
|
||||
o to open (same as enter)
|
||||
go to preview file (open but maintain focus on ack.vim results)
|
||||
t to open in new tab
|
||||
T to open in new tab silently
|
||||
q to close the quickfix window
|
||||
|
||||
This Vim plugin is derived (and by derived, I mean copied, essentially) from
|
||||
Antoine Imbert's blog post [Ack and Vim
|
||||
Integration](http://blog.ant0ine.com/2007/03/ack_and_vim_integration.html) (in
|
||||
Integration](http://blog.ant0ine.com/typepad/2007/03/ack-and-vim-integration.html) (in
|
||||
particular, the function at the bottom of the post). I added a help file that
|
||||
provides just enough reference to get you going. I also highly recommend you
|
||||
check out the docs for the Perl script 'ack', for obvious reasons: [ack -
|
||||
grep-like text finder](http://search.cpan.org/~petdance/ack/ack).
|
||||
grep-like text finder](http://betterthangrep.com/).
|
||||
|
|
|
|||
|
|
@ -11,11 +11,12 @@ This plugin is a front for the Perl module App::Ack. Ack can be used as a
|
|||
replacement for grep. This plugin will allow you to run ack from vim, and
|
||||
shows the results in a split window.
|
||||
|
||||
:Ack [options] {pattern} [{directory}] *:Ack*
|
||||
:Ack[!] [options] {pattern} [{directory}] *:Ack*
|
||||
|
||||
Search recursively in {directory} (which defaults to the current
|
||||
directory) for the {pattern}. Behaves just like the |:grep| command, but
|
||||
will open the |Quickfix| window for you.
|
||||
will open the |Quickfix| window for you. If [!] is not given the first
|
||||
error is jumped to.
|
||||
|
||||
:AckAdd [options] {pattern} [{directory}] *:AckAdd*
|
||||
|
||||
|
|
@ -47,4 +48,4 @@ with the line number of the occurrence, once for each occurrence. <Enter> on
|
|||
a line in this window will open the file, and place the cursor on the matching
|
||||
line.
|
||||
|
||||
See http://search.cpan.org/~petdance/ack/ack for more information.
|
||||
See http://betterthangrep.com/ for more information.
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@ function! s:Ack(cmd, args)
|
|||
redraw
|
||||
echo "Searching ..."
|
||||
|
||||
" If no pattern is provided, search for the word under the cursor
|
||||
if empty(a:args)
|
||||
let l:grepargs = expand("<cword>")
|
||||
else
|
||||
let l:grepargs = a:args
|
||||
end
|
||||
|
||||
" Format, used to manage column jump
|
||||
if a:cmd =~# '-g$'
|
||||
let g:ackformat="%f"
|
||||
|
|
@ -29,7 +36,7 @@ function! s:Ack(cmd, args)
|
|||
try
|
||||
let &grepprg=g:ackprg
|
||||
let &grepformat=g:ackformat
|
||||
silent execute a:cmd . " " . a:args
|
||||
silent execute a:cmd . " " . l:grepargs
|
||||
finally
|
||||
let &grepprg=grepprg_bak
|
||||
let &grepformat=grepformat_bak
|
||||
|
|
@ -41,7 +48,18 @@ function! s:Ack(cmd, args)
|
|||
botright copen
|
||||
endif
|
||||
|
||||
exec "nnoremap <silent> <buffer> q :ccl<CR>"
|
||||
" TODO: Document this!
|
||||
exec "nnoremap <silent> <buffer> q :ccl<CR>"
|
||||
exec "nnoremap <silent> <buffer> t <C-W><CR><C-W>T"
|
||||
exec "nnoremap <silent> <buffer> T <C-W><CR><C-W>TgT<C-W><C-W>"
|
||||
exec "nnoremap <silent> <buffer> o <CR>"
|
||||
exec "nnoremap <silent> <buffer> go <CR><C-W><C-W>"
|
||||
|
||||
" If highlighting is on, highlight the search keyword.
|
||||
if exists("g:ackhighlight")
|
||||
let @/=a:args
|
||||
set hlsearch
|
||||
end
|
||||
|
||||
redraw!
|
||||
endfunction
|
||||
|
|
|
|||
181
.vim/bundle/command-t/ruby/command-t/Makefile
Normal file
181
.vim/bundle/command-t/ruby/command-t/Makefile
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
|
||||
SHELL = /bin/sh
|
||||
|
||||
#### Start of system configuration section. ####
|
||||
|
||||
srcdir = .
|
||||
topdir = /usr/lib/ruby/1.8/x86_64-linux
|
||||
hdrdir = $(topdir)
|
||||
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
||||
exec_prefix = $(prefix)
|
||||
prefix = $(DESTDIR)/usr
|
||||
sharedstatedir = $(prefix)/com
|
||||
mandir = $(prefix)/share/man
|
||||
psdir = $(docdir)
|
||||
oldincludedir = $(DESTDIR)/usr/include
|
||||
localedir = $(datarootdir)/locale
|
||||
bindir = $(exec_prefix)/bin
|
||||
libexecdir = $(prefix)/lib/ruby1.8
|
||||
sitedir = $(DESTDIR)/usr/local/lib/site_ruby
|
||||
htmldir = $(docdir)
|
||||
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
||||
includedir = $(prefix)/include
|
||||
infodir = $(prefix)/share/info
|
||||
vendorlibdir = $(vendordir)/$(ruby_version)
|
||||
sysconfdir = $(DESTDIR)/etc
|
||||
libdir = $(exec_prefix)/lib
|
||||
sbindir = $(exec_prefix)/sbin
|
||||
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
||||
docdir = $(datarootdir)/doc/$(PACKAGE)
|
||||
dvidir = $(docdir)
|
||||
vendordir = $(libdir)/ruby/vendor_ruby
|
||||
datarootdir = $(prefix)/share
|
||||
pdfdir = $(docdir)
|
||||
archdir = $(rubylibdir)/$(arch)
|
||||
sitearchdir = $(sitelibdir)/$(sitearch)
|
||||
datadir = $(datarootdir)
|
||||
localstatedir = $(DESTDIR)/var
|
||||
sitelibdir = $(sitedir)/$(ruby_version)
|
||||
|
||||
CC = gcc
|
||||
LIBRUBY = $(LIBRUBY_SO)
|
||||
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
||||
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
||||
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
||||
|
||||
RUBY_EXTCONF_H =
|
||||
CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC $(cflags)
|
||||
INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
|
||||
DEFS =
|
||||
CPPFLAGS = -DHAVE_RUBY_H $(DEFS) $(cppflags)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
ldflags = -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic
|
||||
dldflags =
|
||||
archflag =
|
||||
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
|
||||
LDSHARED = $(CC) -shared
|
||||
AR = ar
|
||||
EXEEXT =
|
||||
|
||||
RUBY_INSTALL_NAME = ruby1.8
|
||||
RUBY_SO_NAME = ruby1.8
|
||||
arch = x86_64-linux
|
||||
sitearch = x86_64-linux
|
||||
ruby_version = 1.8
|
||||
ruby = /usr/bin/ruby1.8
|
||||
RUBY = $(ruby)
|
||||
RM = rm -f
|
||||
MAKEDIRS = mkdir -p
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_PROG = $(INSTALL) -m 0755
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
COPY = cp
|
||||
|
||||
#### End of system configuration section. ####
|
||||
|
||||
preload =
|
||||
|
||||
libpath = . $(libdir)
|
||||
LIBPATH = -L. -L$(libdir)
|
||||
DEFFILE =
|
||||
|
||||
CLEANFILES = mkmf.log
|
||||
DISTCLEANFILES =
|
||||
|
||||
extout =
|
||||
extout_prefix =
|
||||
target_prefix =
|
||||
LOCAL_LIBS =
|
||||
LIBS = $(LIBRUBYARG_SHARED) -lpthread -lrt -ldl -lcrypt -lm -lc
|
||||
SRCS = ext.c match.c matcher.c
|
||||
OBJS = ext.o match.o matcher.o
|
||||
TARGET = ext
|
||||
DLLIB = $(TARGET).so
|
||||
EXTSTATIC =
|
||||
STATIC_LIB =
|
||||
|
||||
BINDIR = $(bindir)
|
||||
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
||||
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
||||
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
||||
|
||||
TARGET_SO = $(DLLIB)
|
||||
CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
|
||||
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
||||
|
||||
all: $(DLLIB)
|
||||
static: $(STATIC_LIB)
|
||||
|
||||
clean:
|
||||
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
||||
|
||||
distclean: clean
|
||||
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
||||
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
||||
|
||||
realclean: distclean
|
||||
install: install-so install-rb
|
||||
|
||||
install-so: $(RUBYARCHDIR)
|
||||
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
||||
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
||||
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
||||
install-rb: pre-install-rb install-rb-default
|
||||
install-rb-default: pre-install-rb-default
|
||||
pre-install-rb: Makefile
|
||||
pre-install-rb-default: Makefile
|
||||
$(RUBYARCHDIR):
|
||||
$(MAKEDIRS) $@
|
||||
|
||||
site-install: site-install-so site-install-rb
|
||||
site-install-so: install-so
|
||||
site-install-rb: install-rb
|
||||
|
||||
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
||||
|
||||
.cc.o:
|
||||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
||||
|
||||
.cxx.o:
|
||||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
||||
|
||||
.C.o:
|
||||
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
||||
|
||||
$(DLLIB): $(OBJS) Makefile
|
||||
@-$(RM) $@
|
||||
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
||||
|
||||
|
||||
|
||||
###
|
||||
# Copyright 2010 Wincent Colaiuta. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
CFLAGS += -std=c99 -Wall -Wextra -Wno-unused-parameter
|
||||
10
.vim/bundle/command-t/ruby/command-t/mkmf.log
Normal file
10
.vim/bundle/command-t/ruby/command-t/mkmf.log
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
have_header: checking for ruby.h... -------------------- yes
|
||||
|
||||
"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
|
||||
checked program was:
|
||||
/* begin */
|
||||
1: #include <ruby.h>
|
||||
/* end */
|
||||
|
||||
--------------------
|
||||
|
||||
|
|
@ -404,6 +404,8 @@ then the script would do a sexy comment on the last visual selection.
|
|||
doing visual-block comments.
|
||||
|'NERDCommentWholeLinesInVMode'| Changes behaviour of visual comments.
|
||||
|'NERDCreateDefaultMappings'| Turn the default mappings on/off.
|
||||
|'NERDCustomDelimiters'| Add or override delimiters for any
|
||||
filetypes.
|
||||
|'NERDDefaultNesting'| Tells the script to use nested comments
|
||||
by default.
|
||||
|'NERDMenuMode'| Specifies how the NERD commenter menu
|
||||
|
|
@ -550,7 +552,7 @@ Note that this option does not affect the behaviour of commenting in
|
|||
|visual-block| mode.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDCreateDefaultMappings'*
|
||||
*'NERDCreateDefaultMappings'*
|
||||
Values: 0 or 1.
|
||||
Default: 1.
|
||||
|
||||
|
|
@ -559,6 +561,25 @@ If set to 0, none of the default mappings will be created.
|
|||
See also |NERDComMappings|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDCustomDelimiters'*
|
||||
Values: A map (format specified below).
|
||||
Default: {}
|
||||
|
||||
Use this option if you have new filetypes you want the script to handle, or if
|
||||
you want to override the default delimiters of a filetype.
|
||||
|
||||
Example: >
|
||||
let g:NERDCustomDelimiters = {
|
||||
\ 'ruby': { 'left': '#', 'leftAlt': 'FOO', 'rightAlt': 'BAR' },
|
||||
\ 'grondle': { 'left': '{{', 'right': '}}' }
|
||||
\ }
|
||||
<
|
||||
|
||||
Here we override the delimiter settings for ruby and add FOO/BAR as alternative
|
||||
delimiters. We also add {{ and }} as delimiters for a new filetype called
|
||||
'grondle'.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDRemoveAltComs'*
|
||||
Values: 0 or 1.
|
||||
Default: 1.
|
||||
|
|
@ -576,7 +597,7 @@ It will not be uncommented if the NERDRemoveAltComs is set to 0.
|
|||
------------------------------------------------------------------------------
|
||||
*'NERDRemoveExtraSpaces'*
|
||||
Values: 0 or 1.
|
||||
Default: 1.
|
||||
Default: 0.
|
||||
|
||||
By default, the NERD commenter will remove spaces around comment delimiters if
|
||||
either:
|
||||
|
|
@ -599,8 +620,6 @@ Otherwise they would become: >
|
|||
int bar = 10;
|
||||
int baz = foo + bar
|
||||
<
|
||||
If you want the spaces to be removed only if |'NERDSpaceDelims'| is set then
|
||||
set NERDRemoveExtraSpaces to 0.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDLPlace'*
|
||||
|
|
@ -633,7 +652,7 @@ Default: 3
|
|||
This option can take 4 values:
|
||||
"0": Turns the menu off.
|
||||
"1": Turns the 'comment' menu on with no menu shortcut.
|
||||
"2": Turns the 'comment 'menu on with <alt>-c as the shortcut.
|
||||
"2": Turns the 'comment' menu on with <alt>-c as the shortcut.
|
||||
"3": Turns the 'Plugin -> comment' menu on with <alt>-c as the shortcut.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
|
@ -781,6 +800,15 @@ The latest dev versions are on github
|
|||
==============================================================================
|
||||
8. Changelog *NERDComChangelog*
|
||||
|
||||
2.3.0
|
||||
- remove all filetypes which have a &commentstring in the standard vim
|
||||
runtime for vim > 7.0 unless the script stores an alternate set of
|
||||
delimiters
|
||||
- make the script complain if the user doesnt have filetype plugins enabled
|
||||
- use <leader> instead of comma to start the default mappings
|
||||
- fix a couple of bugs with sexy comments - thanks to Tim Smart
|
||||
- lots of refactoring
|
||||
|
||||
2.2.2
|
||||
- remove the NERDShutup option and the message is suppresses, this makes
|
||||
the plugin silently rely on &commentstring for unknown filetypes.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
" ============================================================================
|
||||
" File: NERD_commenter.vim
|
||||
" Description: vim global plugin that provides easy code commenting
|
||||
" Maintainer: Martin Grenfell <martin_grenfell at msn dot com>
|
||||
" Version: 2.2.2
|
||||
" Last Change: 09th October, 2010
|
||||
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
|
||||
" Version: 2.3.0
|
||||
" Last Change: 08th December, 2010
|
||||
" License: This program is free software. It comes without any warranty,
|
||||
" to the extent permitted by applicable law. You can redistribute
|
||||
" it and/or modify it under the terms of the Do What The Fuck You
|
||||
|
|
@ -47,7 +47,7 @@ endfunction
|
|||
let s:spaceStr = ' '
|
||||
let s:lenSpaceStr = strlen(s:spaceStr)
|
||||
|
||||
" Section: variable init calls {{{2
|
||||
" Section: variable initialization {{{2
|
||||
call s:InitVariable("g:NERDAllowAnyVisualDelims", 1)
|
||||
call s:InitVariable("g:NERDBlockComIgnoreEmpty", 0)
|
||||
call s:InitVariable("g:NERDCommentWholeLinesInVMode", 0)
|
||||
|
|
@ -58,13 +58,15 @@ call s:InitVariable("g:NERDMenuMode", 3)
|
|||
call s:InitVariable("g:NERDLPlace", "[>")
|
||||
call s:InitVariable("g:NERDUsePlaceHolders", 1)
|
||||
call s:InitVariable("g:NERDRemoveAltComs", 1)
|
||||
call s:InitVariable("g:NERDRemoveExtraSpaces", 1)
|
||||
call s:InitVariable("g:NERDRemoveExtraSpaces", 0)
|
||||
call s:InitVariable("g:NERDRPlace", "<]")
|
||||
call s:InitVariable("g:NERDSpaceDelims", 0)
|
||||
call s:InitVariable("g:NERDDelimiterRequests", 1)
|
||||
|
||||
if !exists("g:NERDCustomDelimiters")
|
||||
let g:NERDCustomDelimiters = {}
|
||||
endif
|
||||
|
||||
let s:NERDFileNameEscape="[]#*$%'\" ?`!&();<>\\"
|
||||
"vf ;;dA:hcs"'A {j^f(lyi(k$p0f{a A }0f{a 'left':jdd^
|
||||
|
||||
let s:delimiterMap = {
|
||||
\ 'aap': { 'left': '#' },
|
||||
|
|
@ -144,7 +146,7 @@ let s:delimiterMap = {
|
|||
\ 'eiffel': { 'left': '--' },
|
||||
\ 'elf': { 'left': "'" },
|
||||
\ 'elmfilt': { 'left': '#' },
|
||||
\ 'erlang': { 'left': '%' },
|
||||
\ 'erlang': { 'left': '%', 'leftAlt': '%%' },
|
||||
\ 'eruby': { 'left': '<%#', 'right': '%>', 'leftAlt': '<!--', 'rightAlt': '-->' },
|
||||
\ 'expect': { 'left': '#' },
|
||||
\ 'exports': { 'left': '#' },
|
||||
|
|
@ -173,7 +175,7 @@ let s:delimiterMap = {
|
|||
\ 'gitrebase': { 'left': '#' },
|
||||
\ 'gnuplot': { 'left': '#' },
|
||||
\ 'groovy': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||
\ 'gsp': { 'left': '<%--', 'right': '--%>' },
|
||||
\ 'gsp': { 'left': '<%--', 'right': '--%>', 'leftAlt': '<!--','rightAlt': '-->'},
|
||||
\ 'gtkrc': { 'left': '#' },
|
||||
\ 'haskell': { 'left': '{-','right': '-}', 'leftAlt': '--' },
|
||||
\ 'hb': { 'left': '#' },
|
||||
|
|
@ -206,9 +208,10 @@ let s:delimiterMap = {
|
|||
\ 'kscript': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||
\ 'lace': { 'left': '--' },
|
||||
\ 'ldif': { 'left': '#' },
|
||||
\ 'less': { 'left': '/*','right': '*/' },
|
||||
\ 'lilo': { 'left': '#' },
|
||||
\ 'lilypond': { 'left': '%' },
|
||||
\ 'liquid': { 'left': '{%', 'right': '%}' },
|
||||
\ 'liquid': { 'left': '{% comment %}', 'right': '{% endcomment %}' },
|
||||
\ 'lisp': { 'left': ';', 'leftAlt': '#|', 'rightAlt': '|#' },
|
||||
\ 'llvm': { 'left': ';' },
|
||||
\ 'lotos': { 'left': '(*', 'right': '*)' },
|
||||
|
|
@ -255,6 +258,7 @@ let s:delimiterMap = {
|
|||
\ 'occam': { 'left': '--' },
|
||||
\ 'omlet': { 'left': '(*', 'right': '*)' },
|
||||
\ 'omnimark': { 'left': ';' },
|
||||
\ 'ooc': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||
\ 'openroad': { 'left': '//' },
|
||||
\ 'opl': { 'left': "REM" },
|
||||
\ 'ora': { 'left': '#' },
|
||||
|
|
@ -300,8 +304,10 @@ let s:delimiterMap = {
|
|||
\ 'sass': { 'left': '//', 'leftAlt': '/*' },
|
||||
\ 'sather': { 'left': '--' },
|
||||
\ 'scala': { 'left': '//', 'leftAlt': '/*', 'rightAlt': '*/' },
|
||||
\ 'scheme': { 'left': ';', 'leftAlt': '#|', 'rightAlt': '|#' },
|
||||
\ 'scilab': { 'left': '//' },
|
||||
\ 'scsh': { 'left': ';' },
|
||||
\ 'scss': { 'left': '/*','right': '*/' },
|
||||
\ 'sed': { 'left': '#' },
|
||||
\ 'sgmldecl': { 'left': '--', 'right': '--' },
|
||||
\ 'sgmllnx': { 'left': '<!--', 'right': '-->' },
|
||||
|
|
@ -376,12 +382,17 @@ let s:delimiterMap = {
|
|||
\ 'z8a': { 'left': ';' }
|
||||
\ }
|
||||
|
||||
"merge in the custom delimiters
|
||||
for ft in keys(g:NERDCustomDelimiters)
|
||||
let s:delimiterMap[ft] = g:NERDCustomDelimiters[ft]
|
||||
endfor
|
||||
|
||||
" Section: Comment mapping functions, autocommands and commands {{{1
|
||||
" ============================================================================
|
||||
" Section: Comment enabler autocommands {{{2
|
||||
" ============================================================================
|
||||
|
||||
augroup commentEnablers
|
||||
augroup NERDCommenter
|
||||
|
||||
"if the user enters a buffer or reads a buffer then we gotta set up
|
||||
"the comment delimiters for that new filetype
|
||||
|
|
@ -403,10 +414,24 @@ augroup END
|
|||
" set for this buffer.
|
||||
"
|
||||
function s:SetUpForNewFiletype(filetype, forceReset)
|
||||
let ft = a:filetype
|
||||
|
||||
"for compound filetypes, if we dont know how to handle the full filetype
|
||||
"then break it down and use the first part that we know how to handle
|
||||
if ft =~ '\.' && !has_key(s:delimiterMap, ft)
|
||||
let filetypes = split(a:filetype, '\.')
|
||||
for i in filetypes
|
||||
if has_key(s:delimiterMap, i)
|
||||
let ft = i
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
let b:NERDSexyComMarker = ''
|
||||
|
||||
if has_key(s:delimiterMap, a:filetype)
|
||||
let b:NERDCommenterDelims = s:delimiterMap[a:filetype]
|
||||
if has_key(s:delimiterMap, ft)
|
||||
let b:NERDCommenterDelims = s:delimiterMap[ft]
|
||||
for i in ['left', 'leftAlt', 'right', 'rightAlt']
|
||||
if !has_key(b:NERDCommenterDelims, i)
|
||||
let b:NERDCommenterDelims[i] = ''
|
||||
|
|
@ -1001,6 +1026,10 @@ function! NERDComment(isVisual, type) range
|
|||
let oldIgnoreCase = &ignorecase
|
||||
set noignorecase
|
||||
|
||||
if !exists("g:did_load_ftplugin") || g:did_load_ftplugin != 1
|
||||
call s:NerdEcho("filetype plugins should be enabled. See :help NERDComInstallation and :help :filetype-plugin-on", 0)
|
||||
endif
|
||||
|
||||
if a:isVisual
|
||||
let firstLine = line("'<")
|
||||
let lastLine = line("'>")
|
||||
|
|
@ -2400,10 +2429,10 @@ endfunction
|
|||
function s:NerdEcho(msg, typeOfMsg)
|
||||
if a:typeOfMsg == 0
|
||||
echohl WarningMsg
|
||||
echo 'NERDCommenter:' . a:msg
|
||||
echom 'NERDCommenter:' . a:msg
|
||||
echohl None
|
||||
elseif a:typeOfMsg == 1
|
||||
echo 'NERDCommenter:' . a:msg
|
||||
echom 'NERDCommenter:' . a:msg
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
|
|
|||
|
|
@ -642,6 +642,12 @@ NERD tree. These options should be set in your vimrc.
|
|||
|'NERDTreeWinSize'| Sets the window size when the NERD tree is
|
||||
opened.
|
||||
|
||||
|'NERDTreeMinimalUI'| Disables display of the 'Bookmarks' label and
|
||||
'Press ? for help' text.
|
||||
|
||||
|'NERDTreeDirArrows'| Tells the NERD tree to use arrows instead of
|
||||
+ ~ chars when displaying directories.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3.2. Customisation details *NERDTreeOptionDetails*
|
||||
|
||||
|
|
@ -921,6 +927,30 @@ Default: 31.
|
|||
|
||||
This option is used to change the size of the NERD tree when it is loaded.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeMinimalUI'*
|
||||
Values: 0 or 1
|
||||
Default: 0
|
||||
|
||||
This options disables the 'Bookmarks' label 'Press ? for help' text. Use one
|
||||
of the following lines to set this option: >
|
||||
let NERDTreeMinimalUI=0
|
||||
let NERDTreeMinimalUI=1
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeDirArrows'*
|
||||
Values: 0 or 1
|
||||
Default: 0.
|
||||
|
||||
This option is used to change the default look of directory nodes displayed in
|
||||
the tree. When set to 0 it shows old-school bars (|), + and ~ chars. If set to
|
||||
1 it shows right and down arrows. Use one of the follow lines to set this
|
||||
option: >
|
||||
let NERDTreeDirArrows=0
|
||||
let NERDTreeDirArrows=1
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
4. The NERD tree API *NERDTreeAPI*
|
||||
|
||||
|
|
@ -1080,6 +1110,9 @@ The latest dev versions are on github
|
|||
==============================================================================
|
||||
6. Changelog *NERDTreeChangelog*
|
||||
|
||||
4.x.x
|
||||
- Fix a bug with :NERDTreeFind and symlinks. Thanks to Vitaly Bogdanov.
|
||||
|
||||
4.1.0
|
||||
features:
|
||||
- NERDTreeFind to reveal the node for the current buffer in the tree,
|
||||
|
|
@ -1214,6 +1247,7 @@ just downloaded pr0n instead.
|
|||
Ricky
|
||||
jfilip1024
|
||||
Chris Chambers
|
||||
Vitaly Bogdanov
|
||||
|
||||
==============================================================================
|
||||
8. License *NERDTreeLicense*
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ endif
|
|||
let g:loaded_nerdtree_fs_menu = 1
|
||||
|
||||
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
|
||||
call NERDTreeAddMenuItem({'text': '(m)ove the curent node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
|
||||
call NERDTreeAddMenuItem({'text': '(d)elete the curent node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
|
||||
call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
|
||||
call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
|
||||
if g:NERDTreePath.CopyingSupported()
|
||||
call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
|
||||
endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
1
.vim/bundle/vim-coffee-script/ftdetect/eco.vim
Normal file
1
.vim/bundle/vim-coffee-script/ftdetect/eco.vim
Normal file
|
|
@ -0,0 +1 @@
|
|||
autocmd BufNewFile,BufRead *.eco set filetype=eco
|
||||
|
|
@ -12,3 +12,8 @@ let b:did_ftplugin = 1
|
|||
setlocal formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=s:###,m:\ ,e:###,:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Compile the current file on write.
|
||||
if exists("coffee_compile_on_save")
|
||||
autocmd BufWritePost,FileWritePost *.coffee silent !coffee -c <afile> &
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -11,30 +11,30 @@ let b:did_indent = 1
|
|||
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=GetCoffeeIndent(v:lnum)
|
||||
" Make sure GetCoffeeIndent is run when these are typed so they can be outdented
|
||||
setlocal indentkeys+=0],0),=else,=when,=catch,=finally
|
||||
" Make sure GetCoffeeIndent is run when these are typed so they can be
|
||||
" indented or outdented.
|
||||
setlocal indentkeys+=0],0),0.,=else,=when,=catch,=finally
|
||||
|
||||
" Only define the function once
|
||||
" Only define the function once.
|
||||
if exists("*GetCoffeeIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Join a list of regexps as branches
|
||||
" Join a list of regexps as branches.
|
||||
function! s:RegexpJoin(regexps)
|
||||
return join(a:regexps, '\|')
|
||||
endfunction
|
||||
|
||||
" Create a regexp group from a list of regexps
|
||||
" Create a regexp group from a list of regexps.
|
||||
function! s:RegexpGroup(...)
|
||||
return '\%(' . s:RegexpJoin(a:000) . '\)'
|
||||
endfunction
|
||||
|
||||
" Outdent certain keywords and brackets
|
||||
" Outdent certain keywords and brackets.
|
||||
let s:outdent = '^'
|
||||
\ . s:RegexpGroup('else', 'when', 'catch', 'finally',
|
||||
\ ']', '}', ')')
|
||||
\ . s:RegexpGroup('else', 'when', 'catch', 'finally', ']', '}', ')')
|
||||
|
||||
" Indent after certain keywords
|
||||
" Indent after certain keywords.
|
||||
let s:indent_after_keywords = '^'
|
||||
\ . s:RegexpGroup('if', 'unless', 'else', 'for',
|
||||
\ 'while', 'until', 'loop', 'switch',
|
||||
|
|
@ -42,23 +42,28 @@ let s:indent_after_keywords = '^'
|
|||
\ 'class')
|
||||
\ . '\>'
|
||||
|
||||
" Indent after brackets, functions, and assignments
|
||||
let s:indent_after_literals = s:RegexpGroup('\[', '{', '(', '->', '=>',
|
||||
\ ':', '=')
|
||||
" Indent after brackets, functions, and assignments.
|
||||
let s:indent_after_literals = s:RegexpGroup('\[', '{', '(', '->', '=>', ':', '=')
|
||||
\ . '$'
|
||||
|
||||
" Combine the two regexps above
|
||||
" Combine the two regexps above.
|
||||
let s:indent_after = s:RegexpJoin([s:indent_after_keywords,
|
||||
\ s:indent_after_literals])
|
||||
|
||||
" Indent after certain keywords used in multi-line assignments
|
||||
" Indent after operators at the end of lines.
|
||||
let s:continuations = s:RegexpGroup('-\@<!>', '=\@<!>', '-\@<!-', '+\@<!+',
|
||||
\ '<', '\*', '/', '%', '|', '&', ',',
|
||||
\ '\.\@<!\.', 'is', 'isnt', 'and', 'or')
|
||||
\ . '$'
|
||||
|
||||
" Indent after certain keywords used as multi-line assignments.
|
||||
let s:assignment_keywords = s:RegexpGroup(':', '=')
|
||||
\ . '\s*\<'
|
||||
\ . s:RegexpGroup('if', 'unless', 'for', 'while',
|
||||
\ 'until', 'switch', 'try', 'class')
|
||||
\ . '\>'
|
||||
|
||||
" Outdent after certain keywords
|
||||
" Outdent after certain keywords.
|
||||
let s:outdent_after = '^'
|
||||
\ . s:RegexpGroup('return', 'break', 'continue', 'throw')
|
||||
\ . '\>'
|
||||
|
|
@ -68,37 +73,55 @@ let s:outdent_after = '^'
|
|||
let s:dont_outdent_after = '\<' . s:RegexpGroup('if', 'unless') . '\>'
|
||||
|
||||
" Check for a single-line statement (e.g., 'if a then b'), which doesn't need an
|
||||
" indent afterwards
|
||||
" indent afterwards.
|
||||
function! s:IsSingleLineStatement(line)
|
||||
" The 'then' keyword is usually a good hint
|
||||
" The 'then' keyword is usually a good hint.
|
||||
return a:line =~ '\<then\>'
|
||||
endfunction
|
||||
|
||||
" Check for a single-line 'else' statement (e.g., 'else return a' but
|
||||
" not 'else if a'), which doesn't need an indent afterwards
|
||||
" not 'else if a'), which doesn't need an indent afterwards.
|
||||
function! s:IsSingleLineElse(line)
|
||||
" Check if the line actually starts with 'else', then if the line contains
|
||||
" anything other than 'else', then finally if the line is actually an 'else'
|
||||
" statement rather than an 'else if' statement
|
||||
return a:line =~ '^else\>' && a:line !~ '^else$' && a:line !~ '^else if\>'
|
||||
" statement rather than an 'else if' or 'else unless' statement.
|
||||
return a:line =~ '^else\>'
|
||||
\ && a:line !~ '^else$'
|
||||
\ && a:line !~ '^else if\>'
|
||||
\ && a:line !~ '^else unless\>'
|
||||
endfunction
|
||||
|
||||
" Check if a 'when' statement is the first in a 'switch' block by searching the
|
||||
" Check if a 'when' statement is the first in a switch block by searching the
|
||||
" previous line for the 'switch' keyword. The first 'when' shouldn't be
|
||||
" outdented
|
||||
" outdented.
|
||||
function! s:IsFirstWhen(curline, prevline)
|
||||
return a:curline =~ '^when\>' && a:prevline =~ '\<switch\>'
|
||||
endfunction
|
||||
|
||||
" Check for a multi-line assignment like
|
||||
" a: if b
|
||||
" c
|
||||
" else
|
||||
" d
|
||||
" a = if b
|
||||
" c
|
||||
" else
|
||||
" d
|
||||
function! s:IsMultiLineAssignment(line)
|
||||
return a:line =~ s:assignment_keywords
|
||||
endfunction
|
||||
|
||||
" Check if a line is a comment.
|
||||
function! s:IsComment(line)
|
||||
return a:line =~ '^#'
|
||||
endfunction
|
||||
|
||||
" Check if a line is a dot-access.
|
||||
function! s:IsDotAccess(line)
|
||||
return a:line =~ '^\.'
|
||||
endfunction
|
||||
|
||||
" Check if a line is a continuation.
|
||||
function! s:IsContinuation(line)
|
||||
return a:line =~ s:continuations
|
||||
endfunction
|
||||
|
||||
function! s:ShouldOutdent(curline, prevline)
|
||||
return !s:IsSingleLineStatement(a:prevline)
|
||||
\ && !s:IsFirstWhen(a:curline, a:prevline)
|
||||
|
|
@ -106,11 +129,21 @@ function! s:ShouldOutdent(curline, prevline)
|
|||
\ && a:curline =~ s:outdent
|
||||
endfunction
|
||||
|
||||
function! s:ShouldIndentAfter(prevline)
|
||||
function! s:ShouldIndent(curline, prevline)
|
||||
return !s:IsDotAccess(a:prevline) && s:IsDotAccess(a:curline)
|
||||
endfunction
|
||||
|
||||
function! s:ShouldIndentAfter(prevline, prevprevline)
|
||||
return !s:IsSingleLineStatement(a:prevline)
|
||||
\ && !s:IsSingleLineElse(a:prevline)
|
||||
\ && !s:IsComment(a:prevline)
|
||||
\
|
||||
\ && (a:prevline =~ s:indent_after
|
||||
\ || s:IsMultiLineAssignment(a:prevline))
|
||||
\ || s:IsMultiLineAssignment(a:prevline)
|
||||
\
|
||||
\ || (s:IsContinuation(a:prevline)
|
||||
\ && !s:IsContinuation(a:prevprevline)
|
||||
\ && a:prevprevline !~ s:indent_after_literals))
|
||||
endfunction
|
||||
|
||||
function! s:ShouldOutdentAfter(prevline)
|
||||
|
|
@ -119,21 +152,36 @@ function! s:ShouldOutdentAfter(prevline)
|
|||
\ && a:prevline =~ s:outdent_after
|
||||
endfunction
|
||||
|
||||
function! GetCoffeeIndent(curlinenum)
|
||||
" Find a non-blank line above the current line
|
||||
let prevlinenum = prevnonblank(a:curlinenum - 1)
|
||||
" Get the nearest previous non-blank line.
|
||||
function! s:GetPrevLineNum(linenum)
|
||||
return prevnonblank(a:linenum - 1)
|
||||
endfunction
|
||||
|
||||
" No indenting is needed at the start of a file
|
||||
" Get the contents of a line without leading whitespace.
|
||||
function! s:GetTrimmedLine(linenum, indent)
|
||||
return substitute(getline(a:linenum)[a:indent : -1], '\s\+$', '', '')
|
||||
endfunction
|
||||
|
||||
function! GetCoffeeIndent(curlinenum)
|
||||
let prevlinenum = s:GetPrevLineNum(a:curlinenum)
|
||||
let prevprevlinenum = s:GetPrevLineNum(prevlinenum)
|
||||
|
||||
" No indenting is needed at the start of a file.
|
||||
if prevlinenum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let curindent = indent(a:curlinenum)
|
||||
let previndent = indent(prevlinenum)
|
||||
let prevprevindent = indent(prevprevlinenum)
|
||||
|
||||
" Strip off leading whitespace
|
||||
let curline = getline(a:curlinenum)[curindent : -1]
|
||||
let prevline = getline(prevlinenum)[previndent : -1]
|
||||
let curline = s:GetTrimmedLine(a:curlinenum, curindent)
|
||||
let prevline = s:GetTrimmedLine(prevlinenum, previndent)
|
||||
let prevprevline = s:GetTrimmedLine(prevprevlinenum, prevprevindent)
|
||||
|
||||
if s:ShouldIndent(curline, prevline)
|
||||
return previndent + &shiftwidth
|
||||
endif
|
||||
|
||||
if s:ShouldOutdent(curline, prevline)
|
||||
" Is the line already outdented?
|
||||
|
|
@ -144,7 +192,7 @@ function! GetCoffeeIndent(curlinenum)
|
|||
endif
|
||||
endif
|
||||
|
||||
if s:ShouldIndentAfter(prevline)
|
||||
if s:ShouldIndentAfter(prevline, prevprevline)
|
||||
return previndent + &shiftwidth
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
This project adds [CoffeeScript] support to the vim editor. Currently, it
|
||||
supports [almost][todo] all of CoffeeScript 0.9.2's syntax and indentation style.
|
||||
supports [almost][todo] all of CoffeeScript's syntax and indentation style.
|
||||
|
||||
![Screenshot][screenshot]
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ supports [almost][todo] all of CoffeeScript 0.9.2's syntax and indentation style
|
|||
> so you actually need to "filetype off" before "filetype plugin indent on"
|
||||
> to force reloading.
|
||||
|
||||
[pathogen]: http://vim.org/scripts/script.php?script_id=2332
|
||||
[pathogen]: http://www.vim.org/scripts/script.php?script_id=2332
|
||||
|
||||
2. Create, and change into, the `~/.vim/bundle/` directory:
|
||||
|
||||
|
|
@ -50,12 +50,19 @@ extension or a `Cakefile` will load all the CoffeeScript stuff.
|
|||
|
||||
$ git pull
|
||||
|
||||
Everything will then be brought up to date!
|
||||
Everything will then be brought up to date.
|
||||
|
||||
### Customizing
|
||||
|
||||
Some of the possibly unwanted syntax highlighting elements can be disabled
|
||||
in the following ways.
|
||||
#### Compile the current file on write/save
|
||||
|
||||
If you are using the NodeJS version of CofeeScript, with the `coffee` command
|
||||
in your `$PATH`, you can enable auto-compiling on file write/save like so:
|
||||
|
||||
let coffee_compile_on_save = 1
|
||||
|
||||
This will compile the CoffeeScript to JavaScript. For example,
|
||||
`/Users/brian/ZOMG.coffee` will compile to `/Users/brian/ZOMG.js`.
|
||||
|
||||
#### Disable trailing whitespace error highlighting
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,15 @@ endif
|
|||
|
||||
let b:current_syntax = "coffee"
|
||||
|
||||
" Highlight long strings.
|
||||
syntax sync minlines=100
|
||||
|
||||
" CoffeeScript allows dollar signs in identifiers
|
||||
" CoffeeScript allows dollar signs in identifiers.
|
||||
setlocal isident+=$
|
||||
|
||||
" These are 'matches' rather than 'keywords' because vim's highlighting priority
|
||||
" for keywords (the highest) causes them to be wrongly highlighted when used as
|
||||
" dot-properties.
|
||||
syntax match coffeeStatement /\<\%(return\|break\|continue\|throw\)\>/
|
||||
highlight default link coffeeStatement Statement
|
||||
|
||||
|
|
@ -33,7 +37,7 @@ highlight default link coffeeException Exception
|
|||
syntax match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/
|
||||
highlight default link coffeeOperator Operator
|
||||
|
||||
syntax match coffeeKeyword /\<\%(new\|in\|of\|by\|where\|and\|or\|not\|is\|isnt\|class\|extends\|super\|all\)\>/
|
||||
syntax match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|own\|do\)\>/
|
||||
highlight default link coffeeKeyword Keyword
|
||||
|
||||
syntax match coffeeBoolean /\<\%(\%(true\|on\|yes\|false\|off\|no\)\)\>/
|
||||
|
|
@ -42,50 +46,74 @@ highlight default link coffeeBoolean Boolean
|
|||
syntax match coffeeGlobal /\<\%(null\|undefined\)\>/
|
||||
highlight default link coffeeGlobal Type
|
||||
|
||||
" Keywords reserved by the language
|
||||
syntax cluster coffeeReserved contains=coffeeStatement,coffeeRepeat,
|
||||
\ coffeeConditional,coffeeException,
|
||||
\ coffeeOperator,coffeeKeyword,
|
||||
\ coffeeBoolean,coffeeGlobal
|
||||
|
||||
syntax match coffeeAssignmentMod /\%(\s\+\zs\%(and\|or\)\|\W\{,3}\)\ze=/ contained
|
||||
highlight default link coffeeAssignmentMod SpecialChar
|
||||
|
||||
syntax match coffeeAssignmentChar /:\|=/ contained
|
||||
highlight default link coffeeAssignmentChar SpecialChar
|
||||
|
||||
syntax match coffeeVar /\<\%(this\|prototype\|arguments\)\>/
|
||||
" Matches @-variables like @abc
|
||||
" Matches @-variables like @abc.
|
||||
syntax match coffeeVar /@\%(\I\i*\)\?/
|
||||
highlight default link coffeeVar Type
|
||||
|
||||
" Matches class-like names that start with a capital letter, like Array or
|
||||
" Object
|
||||
" Object.
|
||||
syntax match coffeeObject /\<\u\w*\>/
|
||||
highlight default link coffeeObject Structure
|
||||
|
||||
" Matches constant-like names in SCREAMING_CAPS
|
||||
" Matches constant-like names in SCREAMING_CAPS.
|
||||
syntax match coffeeConstant /\<\u[A-Z0-9_]\+\>/
|
||||
highlight default link coffeeConstant Constant
|
||||
|
||||
syntax match coffeePrototype /::/
|
||||
highlight default link coffeePrototype SpecialChar
|
||||
|
||||
syntax region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=@coffeeInterpString
|
||||
syntax region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=@coffeeSimpleString
|
||||
highlight default link coffeeString String
|
||||
|
||||
" What can make up a variable name
|
||||
syntax cluster coffeeIdentifier contains=coffeeVar,coffeeObject,coffeeConstant,
|
||||
\ coffeePrototype
|
||||
|
||||
syntax match coffeeAssignment /@\?\I\%(\i\|::\|\.\|\[.\+\]\|([^)]*)\)*\s*\%(::\@!\|\%(and\|or\|\|&&\|||\|?\|+\|-\|\/\|\*\|%\|<<\|>>\|>>>\|&\||\|\^\)==\@!>\@!\)/
|
||||
\ contains=@coffeeIdentifier,coffeeAssignmentMod,
|
||||
\ coffeeAssignmentChar,coffeeBrackets,
|
||||
\ coffeeParens
|
||||
syntax match coffeeAssignment /\%("\|'\)[^'"]\+\%("\|'\)\s*:/ contains=coffeeString,
|
||||
\ coffeeAssignmentChar
|
||||
syntax match coffeeAssignment /\d*\%(\.\d\+\)\?\s*:/ contains=coffeeNumber,coffeeAssignmentChar
|
||||
highlight default link coffeeAssignment Identifier
|
||||
syntax region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=@coffeeInterpString
|
||||
syntax region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=@coffeeSimpleString
|
||||
highlight default link coffeeString String
|
||||
|
||||
syntax region coffeeAssignString start=/"/ skip=/\\\\\|\\"/ end=/"/ contained contains=@coffeeSimpleString
|
||||
syntax region coffeeAssignString start=/'/ skip=/\\\\\|\\'/ end=/'/ contained contains=@coffeeSimpleString
|
||||
highlight default link coffeeAssignString String
|
||||
|
||||
" Matches numbers like -10, -10e8, -10E8, 10, 10e8, 10E8.
|
||||
syntax match coffeeNumber /\i\@<![-+]\?\d\+\%([eE][+-]\?\d\+\)\?/
|
||||
" Matches hex numbers like 0xfff, 0x000.
|
||||
syntax match coffeeNumber /\<0[xX]\x\+\>/
|
||||
highlight default link coffeeNumber Number
|
||||
|
||||
" Matches floating-point numbers like -10.42e8, 10.42e-8.
|
||||
syntax match coffeeFloat /\i\@<![-+]\?\d*\.\@<!\.\d\+\%([eE][+-]\?\d\+\)\?/
|
||||
highlight default link coffeeFloat Float
|
||||
|
||||
syntax match coffeeAssignSymbols /:\@<!::\@!\|++\|--\|\%(\%(\s\zs\%(and\|or\)\)\|&&\|||\|?\|+\|-\|\/\|\*\|%\|<<\|>>\|>>>\|&\||\|\^\)\?=\@<!==\@!>\@!/ contained
|
||||
highlight default link coffeeAssignSymbols SpecialChar
|
||||
|
||||
syntax match coffeeAssignBrackets /\[.\+\]/ contained contains=TOP,coffeeAssign
|
||||
|
||||
syntax match coffeeAssign /\%(++\|--\)\s*\%(@\|@\?\I\)\%(\i\|::\|\.\|?\|\[.\+\]\)*/
|
||||
\ contains=@coffeeIdentifier,coffeeAssignSymbols,coffeeAssignBrackets
|
||||
syntax match coffeeAssign /\%(@\|@\?\I\)\%(\i\|::\|\.\|?\|\[.\+\]\)*\%(++\|--\|\s*\%(and\|or\|&&\|||\|?\|+\|-\|\/\|\*\|%\|<<\|>>\|>>>\|&\||\|\^\)\?=\@<!==\@!>\@!\)/
|
||||
\ contains=@coffeeIdentifier,coffeeAssignSymbols,coffeeAssignBrackets
|
||||
|
||||
" Displays an error for reserved words.
|
||||
if !exists("coffee_no_reserved_words_error")
|
||||
syntax match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\)\>/
|
||||
highlight default link coffeeReservedError Error
|
||||
endif
|
||||
|
||||
syntax match coffeeAssign /@\?\I\i*\s*:\@<!::\@!/ contains=@coffeeIdentifier,coffeeAssignSymbols
|
||||
" Matches string assignments in object literals like {'a': 'b'}.
|
||||
syntax match coffeeAssign /\("\|'\)[^'"]\+\1\s*;\@<!::\@!/ contains=coffeeAssignString,
|
||||
\ coffeeAssignSymbols
|
||||
" Matches number assignments in object literals like {42: 'a'}.
|
||||
syntax match coffeeAssign /\d\+\%(\.\d\+\)\?\s*:\@<!::\@!/ contains=coffeeNumber,coffeeAssignSymbols
|
||||
highlight default link coffeeAssign Identifier
|
||||
|
||||
syntax match coffeePrototype /::/
|
||||
highlight default link coffeePrototype SpecialChar
|
||||
|
||||
syntax match coffeeFunction /->\|=>/
|
||||
highlight default link coffeeFunction Function
|
||||
|
|
@ -97,65 +125,51 @@ syntax match coffeeComment /#.*/ contains=@Spell,coffeeTodo
|
|||
syntax match coffeeComment /####\@!\_.\{-}###/ contains=@Spell,coffeeTodo
|
||||
highlight default link coffeeComment Comment
|
||||
|
||||
syntax region coffeeEmbed start=/`/ end=/`/
|
||||
syntax region coffeeHereComment start=/#/ end=/\ze\/\/\// end=/$/ contained contains=@Spell,coffeeTodo
|
||||
highlight default link coffeeHereComment coffeeComment
|
||||
|
||||
syntax region coffeeEmbed start=/`/ skip=/\\\\\|\\`/ end=/`/
|
||||
highlight default link coffeeEmbed Special
|
||||
|
||||
" Matches numbers like -10, -10e8, -10E8, 10, 10e8, 10E8
|
||||
syntax match coffeeNumber /\<-\?\d\+\%([eE][+-]\?\d\+\)\?\>/
|
||||
" Matches hex numbers like 0xfff, 0x000
|
||||
syntax match coffeeNumber /\<0[xX]\x\+\>/
|
||||
highlight default link coffeeNumber Number
|
||||
|
||||
" Matches floating-point numbers like -10.42e8, 10.42e-8
|
||||
syntax match coffeeFloat /-\?\d*\.\@<!\.\d\+\%([eE][+-]\?\d\+\)\?/
|
||||
highlight default link coffeeFloat Float
|
||||
|
||||
syntax region coffeeInterpolation matchgroup=coffeeInterpDelim
|
||||
\ start=/\#{/ end=/}/
|
||||
\ contained contains=TOP
|
||||
highlight default link coffeeInterpDelim Delimiter
|
||||
|
||||
" Matches escape sequences like \000, \x00, \u0000, \n.
|
||||
syntax match coffeeEscape /\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\./ contained
|
||||
highlight default link coffeeEscape SpecialChar
|
||||
|
||||
" What is in a non-interpolated string
|
||||
syntax cluster coffeeSimpleString contains=@Spell,coffeeEscape
|
||||
" What is in an interpolated string
|
||||
syntax cluster coffeeInterpString contains=@coffeeSimpleString,
|
||||
\ coffeeInterpolation
|
||||
|
||||
syntax region coffeeRegExp start=/)\@<!\%(\%((\s*\|=\s\+\)\@<=\/\|\s\zs\/\s\@!\)/
|
||||
\ end=/\/[gimy]\{,4}/ oneline
|
||||
\ contains=@coffeeInterpString
|
||||
\ skip=/\[.*\/.*\]/ end=/\/[gimy]\{,4}/ oneline
|
||||
\ contains=@coffeeSimpleString
|
||||
syntax region coffeeHereRegexp start=/\/\/\// end=/\/\/\/[gimy]\{,4}/ contains=@coffeeInterpString,coffeeHereComment fold
|
||||
highlight default link coffeeHereRegexp coffeeRegExp
|
||||
highlight default link coffeeRegExp String
|
||||
|
||||
syntax region coffeeHeredoc start=/"""/ end=/"""/ contains=@coffeeInterpString
|
||||
syntax region coffeeHeredoc start=/'''/ end=/'''/ contains=@coffeeSimpleString
|
||||
syntax region coffeeHeredoc start=/"""/ end=/"""/ contains=@coffeeInterpString fold
|
||||
syntax region coffeeHeredoc start=/'''/ end=/'''/ contains=@coffeeSimpleString fold
|
||||
highlight default link coffeeHeredoc String
|
||||
|
||||
syntax region coffeeCurlies start=/{/ end=/}/ contains=TOP
|
||||
syntax region coffeeBrackets start=/\[/ end=/\]/ contains=TOP,coffeeAssignment
|
||||
syntax match coffeeParens /(.*)/ contains=TOP,coffeeAssignment
|
||||
|
||||
" Displays an error for trailing whitespace
|
||||
" Displays an error for trailing whitespace.
|
||||
if !exists("coffee_no_trailing_space_error")
|
||||
syntax match coffeeSpaceError /\s\+$/ display
|
||||
syntax match coffeeSpaceError /\S\@<=\s\+$/ display
|
||||
highlight default link coffeeSpaceError Error
|
||||
endif
|
||||
|
||||
" Displays an error for trailing semicolons
|
||||
" Displays an error for trailing semicolons.
|
||||
if !exists("coffee_no_trailing_semicolon_error")
|
||||
syntax match coffeeSemicolonError /;$/ display
|
||||
highlight default link coffeeSemicolonError Error
|
||||
endif
|
||||
|
||||
" Displays an error for reserved words
|
||||
if !exists("coffee_no_reserved_words_error")
|
||||
syntax keyword coffeeReservedError case default do function var void with const
|
||||
\ let enum export import native __hasProp
|
||||
\ __extends __slice
|
||||
highlight default link coffeeReservedError Error
|
||||
endif
|
||||
|
||||
" Reserved words can be used as dot-properties
|
||||
" Reserved words can be used as dot-properties.
|
||||
syntax match coffeeDot /\.\@<!\.\i\+/ transparent
|
||||
\ contains=ALLBUT,@coffeeReserved,
|
||||
\ coffeeReservedError
|
||||
|
|
|
|||
62
.vim/bundle/vim-coffee-script/syntax/eco.vim
Normal file
62
.vim/bundle/vim-coffee-script/syntax/eco.vim
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
" Vim syntax file
|
||||
" Language: eco
|
||||
" Maintainer: Jay Adkisson
|
||||
" Mostly stolen from eruby.vim
|
||||
|
||||
if !exists("g:eco_default_subtype")
|
||||
let g:eco_default_subtype = "html"
|
||||
endif
|
||||
|
||||
if !exists("b:eco_subtype")
|
||||
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
|
||||
let b:eco_subtype = matchstr(s:lines,'eco_subtype=\zs\w\+')
|
||||
if b:eco_subtype == ''
|
||||
let b:eco_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eco\)\+$','',''),'\.\zs\w\+$')
|
||||
endif
|
||||
if b:eco_subtype == 'rhtml'
|
||||
let b:eco_subtype = 'html'
|
||||
elseif b:eco_subtype == 'rb'
|
||||
let b:eco_subtype = 'ruby'
|
||||
elseif b:eco_subtype == 'yml'
|
||||
let b:eco_subtype = 'yaml'
|
||||
elseif b:eco_subtype == 'js'
|
||||
let b:eco_subtype = 'javascript'
|
||||
elseif b:eco_subtype == 'txt'
|
||||
" Conventional; not a real file type
|
||||
let b:eco_subtype = 'text'
|
||||
elseif b:eco_subtype == ''
|
||||
if b:current_syntax == ''
|
||||
let b:eco_subtype = g:eco_default_subtype
|
||||
else
|
||||
let b:eco_subtype = b:current_syntax
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists("b:eruby_subtype") && b:eruby_subtype != ''
|
||||
exec "runtime! syntax/".b:eruby_subtype.".vim"
|
||||
let b:current_syntax = "eco"
|
||||
endif
|
||||
|
||||
syn include @coffeeTop syntax/coffee.vim
|
||||
|
||||
syn cluster ecoRegions contains=ecoBlock,ecoExpression,ecoComment
|
||||
|
||||
syn region ecoBlock matchgroup=ecoDelimiter start=/<%/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend
|
||||
syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend
|
||||
syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend
|
||||
|
||||
" eco features not in coffeescript proper
|
||||
syn keyword ecoEnd end containedin=@ecoRegions
|
||||
syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions
|
||||
|
||||
" Define the default highlighting.
|
||||
|
||||
hi def link ecoDelimiter Delimiter
|
||||
hi def link ecoComment Comment
|
||||
hi def link ecoEnd coffeeConditional
|
||||
hi def link ecoIndentColon None
|
||||
|
||||
let b:current_syntax = 'eco'
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8:
|
||||
22
.vim/bundle/vim-coffee-script/thanks.md
Normal file
22
.vim/bundle/vim-coffee-script/thanks.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
Thanks to the following contributors:
|
||||
|
||||
Brian Egan (3):
|
||||
Adding compile functionality to the ftplugin. Must be enabled in .vimrc
|
||||
Updating the readme with compilation instructions
|
||||
Updating bad header in readme to make instructions easier to read
|
||||
|
||||
Chris Hoffman (3):
|
||||
Add new keywoards from, to, and do
|
||||
Highlight the - in negative integers
|
||||
Add here regex highlighting, increase fold level for here docs
|
||||
|
||||
Jay Adkisson:
|
||||
Support for eco templates
|
||||
|
||||
Karl Guertin (1):
|
||||
Cakefiles are coffeescript
|
||||
|
||||
Simon Lipp (1):
|
||||
Trailing spaces are not error on lines containing only spaces
|
||||
|
||||
And thanks to anyone who files or has filed a bug report.
|
||||
|
|
@ -6,14 +6,6 @@
|
|||
{a, b} = c
|
||||
└──┴─ these should be highlighted as identifiers
|
||||
|
||||
- Assignments inside brackets (sounds simple enough):
|
||||
|
||||
a[b -= c] = d
|
||||
|
||||
this should still be highlighted correctly:
|
||||
|
||||
a[b[c]] = d
|
||||
|
||||
- Smart, lookback outdenting for cases like:
|
||||
|
||||
a = {
|
||||
|
|
@ -22,14 +14,13 @@
|
|||
}
|
||||
└─ bracket should be put here
|
||||
|
||||
- Should indent if the previous line ends, or the current line starts, with one
|
||||
of these:
|
||||
- Fix assignments with brackets in these cases:
|
||||
|
||||
+ - * / % | & , . is isnt and or && ||
|
||||
a[b] = c[d]
|
||||
a[b -= c] = d
|
||||
|
||||
- Support `else unless` in indentation:
|
||||
and still highlight these correctly:
|
||||
|
||||
unless a
|
||||
b
|
||||
else unless c
|
||||
d
|
||||
a[b] = c
|
||||
a[b[c]] = d
|
||||
a[b[c] -= d] = e
|
||||
|
|
|
|||
1
.vim/bundle/vim-fugitive/.gitignore
vendored
Normal file
1
.vim/bundle/vim-fugitive/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/doc/tags
|
||||
70
.vim/bundle/vim-fugitive/README.markdown
Normal file
70
.vim/bundle/vim-fugitive/README.markdown
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
fugitive.vim
|
||||
============
|
||||
|
||||
I'm not going to lie to you; fugitive.vim may very well be the best
|
||||
Git wrapper of all time. Check out these features:
|
||||
|
||||
View any blob, tree, commit, or tag in the repository with `:Gedit` (and
|
||||
`:Gsplit`, `:Gvsplit`, `:Gtabedit`, ...). Edit a file in the index and
|
||||
write to it to stage the changes. Use `:Gdiff` to bring up the staged
|
||||
version of the file side by side with the working tree version and use
|
||||
Vim's diff handling capabilities to stage a subset of the file's
|
||||
changes.
|
||||
|
||||
Bring up the output of `git status` with `:Gstatus`. Press `-` to
|
||||
`add`/`reset` a file's changes, or `p` to `add`/`reset` `--patch` that
|
||||
mofo. And guess what `:Gcommit` does!
|
||||
|
||||
`:Gblame` brings up an interactive vertical split with `git blame`
|
||||
output. Press enter on a line to reblame the file as it stood in that
|
||||
commit, or `o` to open that commit in a split. When you're done, use
|
||||
`:Gedit` in the historic buffer to go back to the work tree version.
|
||||
|
||||
`:Gmove` does a `git mv` on a file and simultaneously renames the
|
||||
buffer. `:Gremove` does a `git rm` on a file and simultaneously deletes
|
||||
the buffer.
|
||||
|
||||
Use `:Ggrep` to search the work tree (or any arbitrary commit) with
|
||||
`git grep`, skipping over that which is not tracked in the repository.
|
||||
`:Glog` loads all previous revisions of a file into the quickfix list so
|
||||
you can iterate over them and watch the file evolve!
|
||||
|
||||
`:Gread` is a variant of `git checkout -- filename` that operates on the
|
||||
buffer rather than the filename. This means you can use `u` to undo it
|
||||
and you never get any warnings about the file changing outside Vim.
|
||||
`:Gwrite` writes to both the work tree and index versions of a file,
|
||||
making it like `git add` when called from a work tree file and like
|
||||
`git checkout` when called from the index or a blob in history.
|
||||
|
||||
Use `:Gbrowse` to open the current file on GitHub, with optional line
|
||||
range (try it in visual mode!). If your current repository isn't on
|
||||
GitHub, `git instaweb` will be spun up instead.
|
||||
|
||||
Add `%{fugitive#statusline()}` to `'statusline'` to get an indicator
|
||||
with the current branch in (surprise!) your statusline.
|
||||
|
||||
Oh, and of course there's `:Git` for running any arbitrary command.
|
||||
|
||||
Like fugitive.vim? Follow the repository on
|
||||
[GitHub](http://github.com/tpope/vim-fugitive) and vote for it on
|
||||
[vim.org](http://www.vim.org/scripts/script.php?script_id=2975).
|
||||
|
||||
FAQ
|
||||
---
|
||||
|
||||
> I installed the plugin and started Vim. Why don't any of the commands
|
||||
> exist?
|
||||
|
||||
Fugitive cares about the current file, not the current working
|
||||
directory. Edit a file from the repository.
|
||||
|
||||
> I opened a new tab. Why don't any of the commands exist?
|
||||
|
||||
Fugitive cares about the current file, not the current working
|
||||
directory. Edit a file from the repository.
|
||||
|
||||
> I changed the current working directory. Why do all the commands use
|
||||
> the old directory?
|
||||
|
||||
Fugitive cares about the current file, not the current working
|
||||
directory. Edit a file from the repository.
|
||||
255
.vim/bundle/vim-fugitive/doc/fugitive.txt
Normal file
255
.vim/bundle/vim-fugitive/doc/fugitive.txt
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
*fugitive.txt* A Git wrapper so awesome, it should be illegal
|
||||
|
||||
Author: Tim Pope <vimNOSPAM@tpope.org> *fugitive-author*
|
||||
License: Same terms as Vim itself (see |license|)
|
||||
|
||||
This plugin is only available if 'compatible' is not set.
|
||||
|
||||
INTRODUCTION *fugitive*
|
||||
|
||||
Install in ~/.vim, or in ~\vimfiles if you're on Windows and feeling lucky.
|
||||
Vim 7.2 is recommended as it ships with syntax highlighting for many Git file
|
||||
types.
|
||||
|
||||
If you're in a hurry to get started, here are some things to try:
|
||||
|
||||
In any file in your repository, run |:Gedit| HEAD. Press <CR> to jump to the
|
||||
current branch. Press <CR> again to jump to the top most commit. Keep using
|
||||
<CR> to explore parent commits, trees, and blobs. Use C in a tree or blob to
|
||||
get back to the commit.
|
||||
|
||||
Edit a file in the work tree and make some changes. Use |:Gdiff| to open up
|
||||
the indexed version. Use |do| and |dp| on various hunks to bring the files in
|
||||
sync, or use |:Gread| to pull in all changes. Write the indexed version to
|
||||
stage the file.
|
||||
|
||||
Run |:Gstatus| to check your repository's status. Use "-" to stage and reset
|
||||
files and "p" to add/reset --patch them. Invoke |:Gcommit| to commit your
|
||||
changes.
|
||||
|
||||
Run |:Gblame| in a work tree file to see a blame in a vertical split. Press
|
||||
<CR> on any line to reopen and reblame that file as it stood in that commit.
|
||||
Press o or O on any line to inspect that commit in a split or a tab.
|
||||
|
||||
Run |:Ggrep| to search the work tree or history. Run |:Gmove| to rename a
|
||||
file. Run |:Gremove| to delete a file.
|
||||
|
||||
COMMANDS *fugitive-commands*
|
||||
|
||||
These commands are local to the buffers in which they work (generally, buffers
|
||||
that are part of Git repositories).
|
||||
|
||||
*fugitive-:Git*
|
||||
:Git [args] Run an arbitrary git command. Similar to :!git [args]
|
||||
but chdir to the repository tree first.
|
||||
|
||||
*fugitive-:Gcd*
|
||||
:Gcd [directory] |:cd| relative to the repository.
|
||||
|
||||
*fugitive-:Glcd*
|
||||
:Glcd [directory] |:lcd| relative to the repository.
|
||||
|
||||
*fugitive-:Gstatus*
|
||||
:Gstatus Bring up the output of git-status in the preview
|
||||
window. In addition to standard motions, you can
|
||||
use <C-N> and <C-P> to jump from filename to
|
||||
filename. Press D to |:Gdiff| the file on the cursor
|
||||
line, or ds to |:Gsdiff|. Press - to stage or unstage
|
||||
the file on the cursor line. Press p to do so on a
|
||||
per hunk basis (--patch). Press C to invoke
|
||||
|:Gcommit|.
|
||||
|
||||
*fugitive-:Gcommit*
|
||||
:Gcommit [args] A wrapper around git-commit. If there is nothing
|
||||
to commit, |:Gstatus| is called instead. Unless the
|
||||
arguments given would skip the invocation of an editor
|
||||
(e.g., -m), a split window will be used to obtain a
|
||||
commit message. Write and close that window (:wq or
|
||||
|:Gwrite|) to finish the commit. Unlike when running
|
||||
the actual git-commit command, it is possible (but
|
||||
unadvisable) to muck with the index with commands like
|
||||
git-add and git-reset while a commit message is
|
||||
pending.
|
||||
|
||||
*fugitive-:Ggrep*
|
||||
:Ggrep [args] |:grep| with git-grep as 'grepprg'.
|
||||
|
||||
*fugitive-:Glog*
|
||||
:Glog [args] Load all previous revisions of the current file into
|
||||
the quickfix list. Additional git-log arguments can
|
||||
be given (for example, --reverse). If "--" appears as
|
||||
an argument, no file specific filtering is done, and
|
||||
commits are loaded into the quickfix list.
|
||||
|
||||
*fugitive-:Gedit* *fugitive-:Ge*
|
||||
:Gedit [revision] |:edit| a |fugitive-revision|.
|
||||
|
||||
*fugitive-:Gsplit*
|
||||
:Gsplit [revision] |:split| a |fugitive-revision|.
|
||||
|
||||
*fugitive-:Gvsplit*
|
||||
:Gvsplit [revision] |:vsplit| a |fugitive-revision|.
|
||||
|
||||
*fugitive-:Gtabedit*
|
||||
:Gtabedit [revision] |:tabedit| a |fugitive-revision|
|
||||
|
||||
*fugitive-:Gpedit*
|
||||
:Gpedit [revision] |:pedit| a |fugitive-revision|
|
||||
|
||||
*fugitive-:Gread*
|
||||
:Gread [revision] Empty the buffer and |:read| a |fugitive-revision|.
|
||||
When the argument is omitted, this is similar to
|
||||
git-checkout on a work tree file or git-add on a stage
|
||||
file, but without writing anything to disk.
|
||||
|
||||
:{range}Gread [revision]
|
||||
|:read| in a |fugitive-revision| after {range}.
|
||||
|
||||
*fugitive-:Gwrite*
|
||||
:Gwrite Write to the current file's path and stage the results.
|
||||
When run in a work tree file, it is effectively git
|
||||
add. Elsewhere, it is effectively git-checkout. A
|
||||
great deal of effort is expended to behave sensibly
|
||||
when the work tree or index version of the file is
|
||||
open in another buffer.
|
||||
|
||||
:Gwrite {path} You can give |:Gwrite| an explicit path of where in
|
||||
the work tree to write. You can also give a path like
|
||||
:0:foo.txt or even :0 to write to just that stage in
|
||||
the index.
|
||||
|
||||
*fugitive-:Gwq*
|
||||
:Gwq [path] Like |:Gwrite| followed by |:quit| if the write
|
||||
succeeded.
|
||||
|
||||
:Gwq! [path] Like |:Gwrite|! followed by |:quit|! if the write
|
||||
succeeded.
|
||||
|
||||
*fugitive-:Gdiff*
|
||||
:Gdiff [revision] Perform a |vimdiff| against the current file in the
|
||||
given revision. With no argument, the version in the
|
||||
index is used (which means a three-way diff during a
|
||||
merge conflict, making it a git-mergetool
|
||||
alternative). The newer of the two files is placed
|
||||
to the right. Use |do| and |dp| and write to the
|
||||
index file to simulate "git add --patch".
|
||||
|
||||
*fugitive-:Gsdiff*
|
||||
:Gsdiff [revision] Like |:Gdiff|, but split horizontally.
|
||||
|
||||
*fugitive-:Gvdiff*
|
||||
:Gvdiff [revision] Identical to |:Gdiff|. For symmetry with |:Gsdiff|.
|
||||
|
||||
*fugitive-:Gmove*
|
||||
:Gmove {destination} Wrapper around git-mv that renames the buffer
|
||||
afterward. The destination is relative to the current
|
||||
directory except when started with a /, in which case
|
||||
it is relative to the work tree. Add a ! to pass -f.
|
||||
|
||||
*fugitive-:Gremove*
|
||||
:Gremove Wrapper around git-rm that deletes the buffer
|
||||
afterward. When invoked in an index file, --cached is
|
||||
passed. Add a ! to pass -f and forcefully discard the
|
||||
buffer.
|
||||
|
||||
*fugitive-:Gblame*
|
||||
:Gblame [flags] Run git-blame on the file and open the results in a
|
||||
scroll bound vertical split. Press enter on a line to
|
||||
reblame the file as it was in that commit. You can
|
||||
give any of ltwfsMC as flags and they will be passed
|
||||
along to git-blame.
|
||||
|
||||
:[range]Gblame [flags] Run git-blame on the given range.
|
||||
|
||||
*fugitive-:Gbrowse*
|
||||
:[range]Gbrowse If the remote for the current branch is on GitHub,
|
||||
open the current file, blob, tree, commit, or tag
|
||||
(with git-web--browse) on GitHub. Otherwise, open the
|
||||
current file, blob, tree, commit, or tag in
|
||||
git-instaweb (if you have issues, verify you can run
|
||||
"git instaweb" from a terminal). If a range is given,
|
||||
it is appropriately appended to the URL as an anchor.
|
||||
|
||||
:[range]Gbrowse! Like :Gbrowse, but put the URL on the clipboard rather
|
||||
than opening it.
|
||||
|
||||
:[range]Gbrowse {revision}
|
||||
Like :Gbrowse, but for a given |fugitive-revision|. A
|
||||
useful value here is -, which ties the URL to the
|
||||
latest commit rather than a volatile branch.
|
||||
|
||||
:[range]Gbrowse [...]@{remote}
|
||||
Force using the given remote rather than the remote
|
||||
for the current branch. The remote is used to
|
||||
determine which GitHub repository to link to.
|
||||
|
||||
MAPPINGS *fugitive-mappings*
|
||||
|
||||
These maps are available in Git objects.
|
||||
|
||||
*fugitive-<CR>*
|
||||
<CR> Jump to the revision under the cursor.
|
||||
|
||||
*fugitive-o*
|
||||
o Jump to the revision under the cursor in a new split.
|
||||
|
||||
*fugitive-O*
|
||||
O Jump to the revision under the cursor in a new tab.
|
||||
|
||||
*fugitive-~*
|
||||
~ Go to the current file in the [count]th first
|
||||
ancestor.
|
||||
|
||||
*fugitive-P*
|
||||
P Go to the current file in the [count]th parent.
|
||||
|
||||
*fugitive-C*
|
||||
C Go to the commit containing the current file.
|
||||
|
||||
*fugitive-a*
|
||||
a Show the current tag, commit, or tree in an alternate
|
||||
format.
|
||||
|
||||
SPECIFYING REVISIONS *fugitive-revision*
|
||||
|
||||
Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING
|
||||
REVISIONS" section in the git-rev-parse man page. For commands that accept an
|
||||
optional revision, the default is the file in the index for work tree files
|
||||
and the work tree file for everything else. Example revisions follow.
|
||||
|
||||
Revision Meaning ~
|
||||
HEAD .git/HEAD
|
||||
master .git/refs/heads/master
|
||||
HEAD^{} The commit referenced by HEAD
|
||||
HEAD^ The parent of the commit referenced by HEAD
|
||||
HEAD: The tree referenced by HEAD
|
||||
/HEAD The file named HEAD in the work tree
|
||||
Makefile The file named Makefile in the work tree
|
||||
HEAD^:Makefile The file named Makefile in the parent of HEAD
|
||||
:Makefile The file named Makefile in the index (writable)
|
||||
- The current file in HEAD
|
||||
^ The current file in the previous commit
|
||||
~3 The current file 3 commits ago
|
||||
: .git/index (Same as |:Gstatus|)
|
||||
:0 The current file in the index
|
||||
:1 The current file's common ancestor during a conflict
|
||||
:2 The current file in the target branch during a conflict
|
||||
:3 The current file in the merged branch during a conflict
|
||||
:/foo The most recent commit with "foo" in the message
|
||||
|
||||
STATUSLINE *fugitive-statusline*
|
||||
|
||||
*fugitive#statusline()*
|
||||
Add %{fugitive#statusline()} to your statusline to get an indicator including
|
||||
the current branch and the currently edited file's commit. If you don't have
|
||||
a statusline, this one matches the default when 'ruler' is set:
|
||||
>
|
||||
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
|
||||
<
|
||||
ABOUT *fugitive-about*
|
||||
|
||||
Grab the latest version or report a bug on GitHub:
|
||||
|
||||
http://github.com/tpope/vim-fugitive
|
||||
|
||||
vim:tw=78:et:ft=help:norl:
|
||||
2016
.vim/bundle/vim-fugitive/plugin/fugitive.vim
Normal file
2016
.vim/bundle/vim-fugitive/plugin/fugitive.vim
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -94,8 +94,6 @@ Mnenomic: encoding always comes before decoding; "[" always comes before "]".
|
|||
|
||||
TODO *unimpaired-todo*
|
||||
|
||||
Descend into and ascend from directories with |[o| and |]o|.
|
||||
|
||||
Avoid munging null characters when encoding and decoding.
|
||||
|
||||
vim:tw=78:et:ft=help:norl:
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ function! s:entries(path)
|
|||
let path = substitute(a:path,'[\\/]$','','')
|
||||
let files = split(glob(path."/.*"),"\n")
|
||||
let files += split(glob(path."/*"),"\n")
|
||||
call filter(files,'v:val !=# "." && v:val !=# ".."')
|
||||
call filter(files,'v:val[-4:-1] !=# ".swp" && v:val[-1:-1] !=# "~"')
|
||||
call map(files,'substitute(v:val,"[\\/]$","","")')
|
||||
call filter(files,'v:val !~# "[\\\\/]\\.\\.\\=$"')
|
||||
call filter(files,'v:val[-4:-1] !=# ".swp" && v:val[-1:-1] !=# "~"')
|
||||
return files
|
||||
endfunction
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ endfunction
|
|||
function! s:Transform(algorithm,type)
|
||||
let sel_save = &selection
|
||||
let cb_save = &clipboard
|
||||
set selection=inclusive clipboard-=unnamed
|
||||
set selection=inclusive clipboard-=unnamed clipboard-=unnamedplus
|
||||
let reg_save = @@
|
||||
if a:type =~ '^\d\+$'
|
||||
silent exe 'norm! ^v'.a:type.'$hy'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue