فهرست منبع

remove unused vim plugin for html tags and add ack alias to zsh

Also update submodules to latest.
Weiyi Lou 13 سال پیش
والد
کامیت
7160382932
6فایلهای تغییر یافته به همراه21 افزوده شده و 99 حذف شده
  1. 1 1
      vim/bundle/snipmate
  2. 1 1
      vim/bundle/snipmate-snippets
  3. 0 72
      vim/plugin/html_autoclosetag.vim
  4. 17 24
      vim/vimrc
  5. 1 1
      zsh/oh-my-zsh
  6. 1 0
      zsh/oh-my-zsh-custom/ack.zsh

+ 1 - 1
vim/bundle/snipmate

@@ -1 +1 @@
-Subproject commit 41152a2c46d131eadb469a8432a92c487895dd62
+Subproject commit b42f80ff212d251062cda66429ad1a0af8c39781

+ 1 - 1
vim/bundle/snipmate-snippets

@@ -1 +1 @@
-Subproject commit a558a9787b280295cb17d264487178b1d5c5f2ec
+Subproject commit 2e9268a1158a11ec61362262706dec92ef91fe79

+ 0 - 72
vim/plugin/html_autoclosetag.vim

@@ -1,72 +0,0 @@
-" File:         HTML AutoCloseTag.vim
-" Author:       Michael Sanders (msanders42 [at] gmail [dot] com)
-" Last Updated: April 7 2009
-" Version:      0.3
-" Description:  Automatically closes HTML tag once you finish typing it with >
-
-if exists('b:mapped_auto_closetag') || &cp | finish | endif
-let g:mapped_auto_closetag = 1
-
-ino <buffer> <silent> < <><left>
-ino <buffer> <silent> > <c-r>=<SID>CloseTag()<cr>
-ino <buffer> <expr> <cr> <SID>Return()
-
-if exists('s:did_auto_closetag') | finish | endif
-let g:did_auto_closetag = 1
-
-" Gets the current HTML tag by the cursor.
-fun s:GetCurrentTag()
-	return matchstr(matchstr(getline('.'),
-						\ '<\zs\(\w\|=\| \|''\|"\)*>\%'.col('.').'c'), '^\a*')
-endf
-
-" Cleanly return after autocompleting an html/xml tag.
-fun s:Return()
-	let tag = s:GetCurrentTag()
-	return tag != '' && match(getline('.'), '</'.tag.'>') > -1 ?
-				\ "\<cr>\<cr>\<up>" : "\<cr>"
-endf
-
-fun s:InComment()
-	return stridx(synIDattr(synID(line('.'), col('.')-1, 0), 'name'), 'omment') != -1
-endf
-
-" Counts occurance of needle in page, when not in a comment.
-fun s:CountInPage(needle)
-	let pos = [line('.'), col('.')]
-	call cursor(1, 1)
-	let counter = search(a:needle, 'Wc')
-	while search(a:needle, 'W')
-		if !s:InComment() | let counter += 1 | endif
-	endw
-	call cursor(pos)
-	return counter
-endf
-
-" Returns whether a closing tag has already been inserted.
-fun s:ClosingTag(tag)
-	return s:CountInPage('\c<'.a:tag.'.\{-}>') <= s:CountInPage('\c</'.a:tag.'>')
-endf
-
-" Automatically inserts closing tag after starting tag is typed
-fun s:CloseTag()
-	let line = getline('.')
-	let col = col('.')
-	if line[col-1] != '>' | return '>' | endif
-	let col += 1
-	call cursor(0, col)
-	" Don't autocomplete next to a word or another tag or if inside comment
-	if line[col] !~ '\w\|<\|>' && !s:InComment()
-		let tag = s:GetCurrentTag()
-		" Insert closing tag if tag is not self-closing and has not already
-		" been closed
-		if tag != '' && tag !~ '\vimg|input|link|meta|br|hr|area|base|param|dd|dt'
-					\ && !s:ClosingTag(tag)
-			let line = substitute(line, '\%'.col.'c', '</'.escape(tag, '/').'>', '')
-			call setline('.', line)
-			call cursor(0, col)
-		endif
-	endif
-	return ''
-endf
-" vim:noet:sw=4:ts=4:ft=vim

+ 17 - 24
vim/vimrc

@@ -1,4 +1,4 @@
-set nocompatible "Don't have to try to be compatible with old vi
+set nocompatible    " Don't have to try to be compatible with old vi
 set encoding=utf-8
 
 """"""""
@@ -9,10 +9,9 @@ call pathogen#helptags()
 
 
 """"""""
-"" Environment
+"" Environment - What kind of machine are we on?
 """""""""""""""""""""""""""""""""""""""""""""""""""
 
-" Determine what kind of machine we're on e.g. Linux, Darwin, Win(?)
 if has("unix")
   " remove the newline character from the uname command
   let s:uname = substitute(system("uname"), "\n", "", "")
@@ -23,9 +22,10 @@ endif
 "" General Behaviours
 """""""""""""""""""""""""""""""""""""""""""""""""""
 
-set splitbelow "New splits appear below current window instead of above
-set splitright "New splits appear right of current window
-set ttyfast "Smooth movement
+set splitbelow    " New splits appear below current window instead of above
+set splitright    " New splits appear right of current window
+set ttyfast       " Smooth movement
+set ttymouse=xterm2
 
 " Persistent undo
 if has("persistent_undo")
@@ -33,8 +33,6 @@ if has("persistent_undo")
     set undodir=~/.vimundo
 endif
 
-set ttymouse=xterm2
-
 if has("autocmd")
     " Enable filetype specific features
     filetype plugin indent on
@@ -65,9 +63,9 @@ endif
 """"""""
 "" Start Up
 """""""""""""""""""""""""""""""""""""""""""""""""""
+
 function! StartUp()
-    " Stuff in here will be called by autocmd below
-    " example, start NERDTree if vim called with no arguments
+    " start NERDTree if vim called with no arguments
     if 0 == argc()
         NERDTree
     end
@@ -83,10 +81,10 @@ set tabstop=2       " actual tab press distance
 set shiftround      " indent to nearest tabstops
 set shiftwidth=2    " amount to indent with > and <
 set smarttab        " backspace tabs where appropriate even if spaces
-set softtabstop=2   " let backspace delete indent
+set softtabstop=2   " let backspace delete by indents
 set wrap lbr        " wrap long lines of text
 set backspace=eol,start,indent "backspace over everything
-set textwidth=80
+set textwidth=80    " try to keep text within 80 characters
 set colorcolumn=+1  " mark out the limits of the textwidth
 
 
@@ -98,7 +96,8 @@ syntax enable
 colorscheme solarized
 set t_Co=16
 set background=dark
-hi Folded term=none cterm=none ctermfg=darkred ctermbg=none "set colour for folded lines
+" set colour for folded lines
+hi Folded term=none cterm=none ctermfg=darkred ctermbg=none 
 
 
 """"""""
@@ -140,13 +139,13 @@ set magic       " enables wildcard searching
 "" Key Remaps
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-let mapleader = "," "Leader key lets you make more kinds of shortcuts!
+let mapleader = ","    " easier to use than \
 
 " More convenient escape
 imap ii <Esc>
 imap II <Esc>
 
-" Yank to end of line, like D
+" Yank to end of line, like D deletes to end of line
 nmap Y y$
 
 " Add extra lines up and down
@@ -220,7 +219,7 @@ nnoremap <silent> <expr> $ ScreenMovement("$")
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 """"""""" NERDTree
-let g:NERDTreeQuitOnOpen = 1
+let g:NERDTreeQuitOnOpen = 1 " close sidebar after we go to selection
 if s:uname == "Darwin"
   let g:NERDTreeDirArrows=0 " Problems showing NERDTree arrows in OS X
 endif
@@ -237,22 +236,16 @@ let g:gundo_preview_bottom = 1
 let g:did_surrounding = 1  " Disable msander's surrounding (surround fork)
 
 
-""""""""" HTML Autoclose Tag
-" We are instead trying out sparkup
-let g:mapped_auto_closetag = 1  " Disable html autoclose plugin
-let g:did_auto_closetag = 1  " Disable html autoclose plugin
-
-
 """"""""" Powerline
 let g:Powerline_symbols = 'compatible' " alternatives: fancy, unicode
 
 
 """"""""" Tagbar
-let g:tagbar_autoclose = 1
+let g:tagbar_autoclose = 1 " close sidebar after we go to selection
 
 
 """"""""
-"" Functions, the Givers of Power (in order of use)
+"" Functions
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""
 
 function! FoldText()

+ 1 - 1
zsh/oh-my-zsh

@@ -1 +1 @@
-Subproject commit 11034217a7ea3cffe6e0fe631837c518b8c7e1a5
+Subproject commit d05b2010ffd4cd33ff9402c402051b1caf985d97

+ 1 - 0
zsh/oh-my-zsh-custom/ack.zsh

@@ -0,0 +1 @@
+alias ackl='ack -a --ignore-dir=webroot'