├── .vimrc ├── after └── syntax │ ├── css.vim │ ├── less.vim │ └── python.vim ├── autoload ├── pathogen.vim └── repeat.vim ├── bundle ├── ack │ ├── doc │ │ ├── ack.txt │ │ └── tags │ └── plugin │ │ └── ack.vim ├── bufexplorer │ ├── doc │ │ └── bufexplorer.txt │ └── plugin │ │ └── bufexplorer.vim ├── conf2dif │ ├── doc │ │ └── conf2dif.txt │ └── plugin │ │ └── conf2dif.vim ├── html5.vim │ ├── Makefile │ ├── README.markdown │ ├── autoload │ │ ├── htmlcomplete.vim │ │ └── xml │ │ │ └── html5.vim │ ├── config.mk │ └── syntax │ │ └── html │ │ └── html5.vim ├── makegreen │ ├── README.md │ └── plugin │ │ └── makegreen.vim ├── markdown │ ├── ftdetect │ │ └── markdown.vim │ ├── ftplugin │ │ └── markdown.vim │ └── syntax │ │ └── markdown.vim ├── nerdcommenter │ ├── .gitignore │ ├── Rakefile │ ├── doc │ │ └── NERD_commenter.txt │ └── plugin │ │ └── NERD_commenter.vim ├── nerdtree │ ├── .gitignore │ ├── Rakefile │ ├── doc │ │ └── NERD_tree.txt │ ├── nerdtree_plugin │ │ ├── exec_menuitem.vim │ │ └── fs_menu.vim │ └── plugin │ │ └── NERD_tree.vim ├── rainbow │ ├── autoload │ │ └── rainbow_parentheses.vim │ ├── doc │ │ └── rainbow_parentheses.txt │ └── plugin │ │ └── rainbow_parentheses.vim ├── snipmate │ ├── after │ │ └── plugin │ │ │ └── snipMate.vim │ ├── autoload │ │ └── snipMate.vim │ ├── doc │ │ └── snipMate.txt │ ├── ftplugin │ │ └── html_snip_helper.vim │ ├── plugin │ │ └── snipMate.vim │ ├── snippets │ │ ├── _.snippets │ │ ├── autoit.snippets │ │ ├── c.snippets │ │ ├── cpp.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 │ │ └── snippet.vim ├── sparkup │ └── ftplugin │ │ ├── html │ │ ├── sparkup.py │ │ └── sparkup.vim │ │ └── htmldjango ├── surround │ ├── doc │ │ └── surround.txt │ └── plugin │ │ └── surround.vim ├── vcscommand │ ├── doc │ │ └── vcscommand.txt │ ├── plugin │ │ ├── vcscommand.vim │ │ ├── vcsgit.vim │ │ └── vcshg.vim │ └── syntax │ │ ├── gitannotate.vim │ │ ├── hgannotate.vim │ │ └── vcscommit.vim └── yankring │ ├── doc │ └── yankring.txt │ └── plugin │ └── yankring.vim ├── colors └── railscasts.vim ├── ftplugin ├── html │ └── closetags.vim ├── htmldjango │ └── closetags.vim ├── python.vim └── python │ ├── README.rst │ ├── pyflakes.vim │ └── pyflakes │ ├── LICENSE │ ├── 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 ├── plugin ├── DirDiff.vim ├── lodgeit.vim ├── scratch.vim └── slime.vim ├── snippets ├── django.snippets ├── htmldjango.snippets ├── htmljinja.snippets ├── jinja.snippets └── scheme.snippets └── syntax ├── django.vim ├── htmldjango.vim ├── htmljinja.vim ├── jinja.vim ├── less.vim ├── mako.vim ├── nginx.vim └── scss.vim /.vimrc: -------------------------------------------------------------------------------- 1 | filetype off 2 | call pathogen#runtime_append_all_bundles() 3 | filetype plugin indent on 4 | 5 | set nocompatible 6 | 7 | " Security 8 | set modelines=0 9 | 10 | " Tabs/spaces 11 | set tabstop=4 12 | set shiftwidth=4 13 | set softtabstop=4 14 | set expandtab 15 | 16 | " Basic options 17 | set encoding=utf-8 18 | set scrolloff=3 19 | set autoindent 20 | set showmode 21 | set showcmd 22 | set hidden 23 | set wildmenu 24 | set wildmode=list:longest 25 | set visualbell 26 | set cursorline 27 | set ttyfast 28 | set ruler 29 | set backspace=indent,eol,start 30 | set relativenumber 31 | set laststatus=2 32 | set undofile 33 | set numberwidth=6 34 | 35 | "Informative status line 36 | set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)]\ Col:%c 37 | 38 | 39 | " Backups 40 | set backupdir=~/.vim/tmp/backup/ " backups 41 | set directory=~/.vim/tmp/swap/ " swap files 42 | set backup " enable backups 43 | 44 | " Leader 45 | let mapleader = "," 46 | 47 | " Searching 48 | nnoremap / /\v 49 | vnoremap / /\v 50 | set ignorecase 51 | set smartcase 52 | set incsearch 53 | set showmatch 54 | set hlsearch 55 | set gdefault 56 | map :noh 57 | runtime macros/matchit.vim 58 | nmap % 59 | vmap % 60 | 61 | " Soft/hard wrapping 62 | set nowrap 63 | set textwidth=79 64 | set formatoptions=qrn1 65 | set colorcolumn=79 66 | set sidescroll=5 67 | 68 | " Use the same symbols as TextMate for tabstops and EOLs 69 | set list 70 | set listchars=tab:▷⋅,trail:⋅,nbsp:⋅" mark trailing white space 71 | 72 | " Color scheme (terminal) 73 | syntax on 74 | set background=dark 75 | colorscheme delek 76 | 77 | " NERD Tree 78 | map :NERDTreeToggle 79 | let NERDTreeIgnore=['.vim$', '\~$', '.*\.pyc$', 'pip-log\.txt$'] 80 | "let NERDTreeWinPos="right" 81 | let NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.bak$', '\~$'] 82 | 83 | " Use the damn hjkl keys 84 | nnoremap 85 | nnoremap 86 | nnoremap 87 | nnoremap 88 | 89 | " And make them fucking work, too. 90 | nnoremap j gj 91 | nnoremap k gk 92 | 93 | " Easy buffer navigation 94 | map h 95 | map j 96 | map k 97 | map l 98 | map w vl 99 | 100 | " Folding 101 | set foldlevelstart=20 102 | nnoremap za 103 | vnoremap za 104 | au BufNewFile,BufRead *.html 105 | map ft Vatzf 106 | autocmd Syntax c,cpp,vim,xml,html,xhtml,py setlocal foldmethod=syntax 107 | autocmd Syntax c,cpp,vim,xml,html,xhtml,py,perl normal zR 108 | 109 | " Reformat xml documents 110 | au FileType xml exe ":silent 1,$!xmllint --format --recover - 2>/dev/null" 111 | 112 | function! MyFoldText() 113 | let line = getline(v:foldstart) 114 | 115 | let nucolwidth = &fdc + &number * &numberwidth 116 | let windowwidth = winwidth(0) - nucolwidth - 3 117 | let foldedlinecount = v:foldend - v:foldstart 118 | 119 | " expand tabs into spaces 120 | let onetab = strpart(' ', 0, &tabstop) 121 | let line = substitute(line, '\t', onetab, 'g') 122 | 123 | let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount)) 124 | let fillcharcount = windowwidth - len(line) - len(foldedlinecount) - 4 125 | return line . '…' . repeat(" ",fillcharcount) . foldedlinecount . '…' . ' ' 126 | endfunction 127 | set foldtext=MyFoldText() 128 | 129 | " Fuck you, help key. 130 | set fuoptions=maxvert,maxhorz 131 | inoremap :set invfullscreena 132 | nnoremap :set invfullscreen 133 | vnoremap :set invfullscreen 134 | 135 | " Various syntax stuff 136 | au BufNewFile,BufRead *.less set filetype=less 137 | au BufRead,BufNewFile *.scss set filetype=scss 138 | 139 | au BufNewFile,BufRead *.m*down set filetype=markdown 140 | au BufNewFile,BufRead *.m*down nnoremap 1 yypVr= 141 | au BufNewFile,BufRead *.m*down nnoremap 2 yypVr- 142 | au BufNewFile,BufRead *.m*down nnoremap 3 I### 143 | 144 | " Sort CSS 145 | map S ?{jV/^\s*\}?$k:sort:noh 146 | 147 | " Clean whitespace 148 | map x :%s/\s\+$//:let @/='' 149 | map b :%s/\s\+$//:let @/='' 150 | 151 | 152 | " Exuberant ctags! 153 | let Tlist_Ctags_Cmd = "/usr/local/bin/ctags" 154 | let Tlist_WinWidth = 50 155 | map :TlistToggle 156 | map :!/usr/local/bin/ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --exclude='@.ctagsignore' . 157 | 158 | " Ack 159 | map a :Ack 160 | 161 | " Yankring 162 | nnoremap :YRShow 163 | nnoremap y :YRShow 164 | 165 | " Formatting, TextMate-style 166 | map q gqip 167 | 168 | nmap m :make 169 | 170 | " Google's JSLint 171 | au BufNewFile,BufRead *.js set makeprg=gjslint\ % 172 | au BufNewFile,BufRead *.js set errorformat=%-P-----\ FILE\ \ :\ \ %f\ -----,Line\ %l\\,\ E:%n:\ %m,%-Q,%-GFound\ %s,%-GSome\ %s,%-Gfixjsstyle%s,%-Gscript\ can\ %s,%-G 173 | 174 | " TESTING GOAT APPROVES OF THESE LINES 175 | au BufNewFile,BufRead test_*.py set makeprg=nosetests\ --machine-out\ --nocapture 176 | au BufNewFile,BufRead test_*.py set shellpipe=2>&1\ >/dev/null\ \|\ tee 177 | au BufNewFile,BufRead test_*.py set errorformat=%f:%l:\ %m 178 | au BufNewFile,BufRead test_*.py nmap n MakeGreen 179 | au BufNewFile,BufRead test_*.py nmap N :make 180 | nmap ff :QFix 181 | nmap fn :cn 182 | nmap fp :cp 183 | 184 | command -bang -nargs=? QFix call QFixToggle(0) 185 | function! QFixToggle(forced) 186 | if exists("g:qfix_win") && a:forced == 0 187 | cclose 188 | unlet g:qfix_win 189 | else 190 | copen 10 191 | let g:qfix_win = bufnr("$") 192 | endif 193 | endfunction 194 | 195 | 196 | " TODO: Put this in filetype-specific files 197 | au BufNewFile,BufRead *.less set foldmethod=marker 198 | au BufNewFile,BufRead *.less set foldmarker={,} 199 | au BufNewFile,BufRead *.less set nocursorline 200 | au BufRead,BufNewFile /etc/nginx/conf/* set ft=nginx 201 | au BufRead,BufNewFile /etc/nginx/sites-available/* set ft=nginx 202 | au BufRead,BufNewFile /usr/local/etc/nginx/sites-available/* set ft=nginx 203 | 204 | " Easier linewise reselection 205 | map v V`] 206 | 207 | " HTML tag closing 208 | inoremap :call InsertCloseTag()a 209 | 210 | " Faster Esc 211 | "inoremap 212 | inoremap jj 213 | 214 | " Scratch 215 | nmap :Sscratchx:resize 15 216 | 217 | " Diff 218 | nmap d :!git diff % 219 | 220 | " Rainbows! 221 | nmap R :RainbowParenthesesToggle 222 | 223 | " Edit .vimrc 224 | nmap ev :e $MYVIMRC 225 | map sv :source $MYVIMRC 226 | 227 | " Sudo to write 228 | cmap w!! w !sudo tee % >/dev/null 229 | 230 | " Easy filetype switching 231 | nnoremap _dt :set ft=htmldjango 232 | 233 | " VCS Stuff 234 | let VCSCommandMapPrefix = "h" 235 | 236 | " Disable useless HTML5 junk 237 | let g:event_handler_attributes_complete = 0 238 | let g:rdfa_attributes_complete = 0 239 | let g:microdata_attributes_complete = 0 240 | let g:atia_attributes_complete = 0 241 | 242 | " Shouldn't need shift 243 | nnoremap ; : 244 | 245 | " Save when losing focus 246 | "au FocusLost * :wa 247 | 248 | " Stop it, hash key 249 | inoremap # X# 250 | 251 | if has('gui_running') 252 | set guifont=Monaco:h13.00 253 | colorscheme railscasts 254 | syntax enable 255 | set number "add line numbers 256 | 257 | set go-=T 258 | set go-=l 259 | set go-=L 260 | set go-=r 261 | set go-=R 262 | 263 | if has("gui_macvim") 264 | macmenu &File.New\ Tab key= 265 | end 266 | 267 | let g:sparkupExecuteMapping = '' 268 | 269 | highlight SpellBad term=underline gui=undercurl guisp=Orange 270 | endif 271 | ":autocmd VimEnter * NERDTree 272 | -------------------------------------------------------------------------------- /after/syntax/less.vim: -------------------------------------------------------------------------------- 1 | /Users/sjl/lib/dotfiles/vim/after/syntax/css.vim -------------------------------------------------------------------------------- /after/syntax/python.vim: -------------------------------------------------------------------------------- 1 | RainbowParenthesesLoadSquare 2 | RainbowParenthesesLoadBraces 3 | RainbowParenthesesLoadRound 4 | 5 | -------------------------------------------------------------------------------- /autoload/pathogen.vim: -------------------------------------------------------------------------------- 1 | " pathogen.vim - path option manipulation 2 | " Maintainer: Tim Pope 3 | " Version: 1.2 4 | 5 | " Install in ~/.vim/autoload (or ~\vimfiles\autoload). 6 | " 7 | " API is documented below. 8 | 9 | if exists("g:loaded_pathogen") || &cp 10 | finish 11 | endif 12 | let g:loaded_pathogen = 1 13 | 14 | " Split a path into a list. 15 | function! pathogen#split(path) abort " {{{1 16 | if type(a:path) == type([]) | return a:path | endif 17 | let split = split(a:path,'\\\@ output 71 | silent filetype 72 | redir END 73 | let result = {} 74 | let result.detection = match(output,'detection:ON') >= 0 75 | let result.indent = match(output,'indent:ON') >= 0 76 | let result.plugin = match(output,'plugin:ON') >= 0 77 | return result 78 | endfunction " }}}1 79 | 80 | " \ on Windows unless shellslash is set, / everywhere else. 81 | function! pathogen#separator() abort " {{{1 82 | return !exists("+shellslash") || &shellslash ? '/' : '\' 83 | endfunction " }}}1 84 | 85 | " Convenience wrapper around glob() which returns a list. 86 | function! pathogen#glob(pattern) abort " {{{1 87 | let files = split(glob(a:pattern),"\n") 88 | return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")') 89 | endfunction "}}}1 90 | 91 | " Like pathogen#glob(), only limit the results to directories. 92 | function! pathogen#glob_directories(pattern) abort " {{{1 93 | return filter(pathogen#glob(a:pattern),'isdirectory(v:val)') 94 | endfunction "}}}1 95 | 96 | " Prepend all subdirectories of path to the rtp, and append all after 97 | " directories in those subdirectories. 98 | function! pathogen#runtime_prepend_subdirectories(path) " {{{1 99 | let sep = pathogen#separator() 100 | let before = pathogen#glob_directories(a:path.sep."*[^~]") 101 | let after = pathogen#glob_directories(a:path.sep."*[^~]".sep."after") 102 | let rtp = pathogen#split(&rtp) 103 | let path = expand(a:path) 104 | call filter(rtp,'v:val[0:strlen(path)-1] !=# path') 105 | let &rtp = pathogen#join(pathogen#uniq(before + rtp + after)) 106 | return &rtp 107 | endfunction " }}}1 108 | 109 | " For each directory in rtp, check for a subdirectory named dir. If it 110 | " exists, add all subdirectories of that subdirectory to the rtp, immediately 111 | " after the original directory. If no argument is given, 'bundle' is used. 112 | " Repeated calls with the same arguments are ignored. 113 | function! pathogen#runtime_append_all_bundles(...) " {{{1 114 | let sep = pathogen#separator() 115 | let name = a:0 ? a:1 : 'bundle' 116 | let list = [] 117 | for dir in pathogen#split(&rtp) 118 | if dir =~# '\MappingToRepeatCommand",3) 13 | " 14 | " The first argument is the mapping that will be invoked when the |.| key is 15 | " pressed. Typically, it will be the same as the mapping the user invoked. 16 | " This sequence will be stuffed into the input queue literally. Thus you must 17 | " encode special keys by prefixing them with a backslash inside double quotes. 18 | " 19 | " The second argument is the default count. This is the number that will be 20 | " prefixed to the mapping if no explicit numeric argument was given. The 21 | " value of the v:count variable is usually correct and it will be used if the 22 | " second parameter is omitted. If your mapping doesn't accept a numeric 23 | " argument and you never want to receive one, pass a value of -1. 24 | " 25 | " Make sure to call the repeat#set function _after_ making changes to the 26 | " file. 27 | 28 | if exists("g:loaded_repeat") || &cp || v:version < 700 29 | finish 30 | endif 31 | let g:loaded_repeat = 1 32 | 33 | let g:repeat_tick = -1 34 | 35 | function! repeat#set(sequence,...) 36 | silent exe "norm! \"=''\p" 37 | let g:repeat_sequence = a:sequence 38 | let g:repeat_count = a:0 ? a:1 : v:count 39 | let g:repeat_tick = b:changedtick 40 | endfunction 41 | 42 | function! s:repeat(count) 43 | if g:repeat_tick == b:changedtick 44 | let c = g:repeat_count 45 | let s = g:repeat_sequence 46 | let cnt = c == -1 ? "" : (a:count ? a:count : (c ? c : '')) 47 | call feedkeys(cnt . s) 48 | else 49 | call feedkeys((a:count ? a:count : '') . '.', 'n') 50 | endif 51 | endfunction 52 | 53 | function! s:wrap(command,count) 54 | let preserve = (g:repeat_tick == b:changedtick) 55 | exe 'norm! '.(a:count ? a:count : '').a:command 56 | if preserve 57 | let g:repeat_tick = b:changedtick 58 | endif 59 | endfunction 60 | 61 | nnoremap . :call repeat(v:count) 62 | nnoremap u :call wrap('u',v:count) 63 | nnoremap U :call wrap('U',v:count) 64 | nnoremap :call wrap("\C-R>",v:count) 65 | 66 | augroup repeatPlugin 67 | autocmd! 68 | autocmd BufLeave,BufWritePre,BufReadPre * let g:repeat_tick = (g:repeat_tick == b:changedtick || g:repeat_tick == 0) ? 0 : -1 69 | autocmd BufEnter,BufWritePost * if g:repeat_tick == 0|let g:repeat_tick = b:changedtick|endif 70 | augroup END 71 | 72 | " vim:set ft=vim et sw=4 sts=4: 73 | -------------------------------------------------------------------------------- /bundle/ack/doc/ack.txt: -------------------------------------------------------------------------------- 1 | *ack.txt* Plugin that integrates ack with Vim 2 | 3 | ============================================================================== 4 | Author: Antoine Imbert *ack-author* 5 | License: Same terms as Vim itself (see |license|) 6 | 7 | ============================================================================== 8 | INTRODUCTION *ack* 9 | 10 | This plugin is a front for the Perl module App::Ack. Ack can be used as a 11 | replacement for grep. This plugin will allow you to run ack from vim, and 12 | shows the results in a split window. 13 | 14 | :Ack [options] {pattern} [{directory}] *:Ack* 15 | 16 | Search recursively in {directory} (which defaults to the current 17 | directory) for the {pattern}. Behaves just like the |:grep| command, but 18 | will open the |Quickfix| window for you. 19 | 20 | :AckAdd [options] {pattern} [{directory}] *:AckAdd* 21 | 22 | Just like |:Ack| + |:grepadd|. Appends the |quickfix| with the results 23 | 24 | :AckFromSearch [{directory}] *:AckFromSearch* 25 | 26 | Just like |:Ack| but the pattern is from previous search. 27 | 28 | :LAck [options] {pattern} [{directory}] *:LAck* 29 | 30 | Just like |:Ack| + |:lgrep|. Searches, but opens in |location-list| 31 | 32 | :LAckAdd [options] {pattern} [{directory}] *:LAckAdd* 33 | 34 | Just like |:Ack| + |:lgrepadd|. Searches, but appends results to 35 | |location-list| 36 | 37 | Files containing the search term will be listed in the split window, along 38 | with the line number of the occurrence, once for each occurrence. on 39 | a line in this window will open the file, and place the cursor on the matching 40 | line. 41 | 42 | See http://search.cpan.org/~petdance/ack/ack for more information. 43 | -------------------------------------------------------------------------------- /bundle/ack/doc/tags: -------------------------------------------------------------------------------- 1 | :Ack ack.txt /*:Ack* 2 | :AckAdd ack.txt /*:AckAdd* 3 | :AckFromSearch ack.txt /*:AckFromSearch* 4 | :LAck ack.txt /*:LAck* 5 | :LAckAdd ack.txt /*:LAckAdd* 6 | ack ack.txt /*ack* 7 | ack-author ack.txt /*ack-author* 8 | ack.txt ack.txt /*ack.txt* 9 | -------------------------------------------------------------------------------- /bundle/ack/plugin/ack.vim: -------------------------------------------------------------------------------- 1 | " NOTE: You must, of course, install the ack script 2 | " in your path. 3 | " On Ubuntu: 4 | " sudo apt-get install ack-grep 5 | " ln -s /usr/bin/ack-grep /usr/bin/ack 6 | " With MacPorts: 7 | " sudo port install p5-app-ack 8 | 9 | let g:ackprg="ack -H --nocolor --nogroup" 10 | 11 | function! s:Ack(cmd, args) 12 | redraw 13 | echo "Searching ..." 14 | 15 | let grepprg_bak=&grepprg 16 | try 17 | let &grepprg=g:ackprg 18 | silent execute a:cmd . " " . a:args 19 | finally 20 | let &grepprg=grepprg_bak 21 | endtry 22 | 23 | if a:cmd =~# '^l' 24 | botright lopen 25 | else 26 | botright copen 27 | endif 28 | redraw! 29 | endfunction 30 | 31 | function! s:AckFromSearch(cmd, args) 32 | let search = getreg('/') 33 | " translate vim regular expression to perl regular expression. 34 | let search = substitute(search,'\(\\<\|\\>\)','\\b','g') 35 | call s:Ack(a:cmd, '"' . search .'" '. a:args) 36 | endfunction 37 | 38 | command! -bang -nargs=* -complete=file Ack call s:Ack('grep',) 39 | command! -bang -nargs=* -complete=file AckAdd call s:Ack('grepadd', ) 40 | command! -bang -nargs=* -complete=file AckFromSearch call s:AckFromSearch('grep', ) 41 | command! -bang -nargs=* -complete=file LAck call s:Ack('lgrep', ) 42 | command! -bang -nargs=* -complete=file LAckAdd call s:Ack('lgrepadd', ) 43 | -------------------------------------------------------------------------------- /bundle/bufexplorer/doc/bufexplorer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/empty/vimrc/418de809f4a3b491a8923fa469abcffa7b70781c/bundle/bufexplorer/doc/bufexplorer.txt -------------------------------------------------------------------------------- /bundle/conf2dif/doc/conf2dif.txt: -------------------------------------------------------------------------------- 1 | *conf2dif.txt* Plugin for resolving CVS conflicts 2 | 3 | This plugin splits a CVS conflict file into three |diff| windows. The 2 4 | conflicting versions of the file are put on the left and right. The central 5 | window contains the file, with each conflicting area replaced by "=======". 6 | 7 | To begin, either select the "Plugin->CVS Conflict->Resolve" menu item, or issue 8 | the command: > 9 | 10 | :Conflict2Diff 11 | 12 | In the central window, the following buffer specific mappings are created: 13 | 14 | Move to the next conflict 15 | 16 | Move to the previous conflict 17 | 18 | Use the text from the lefthand file for this 19 | conflicting area 20 | 21 | Use the text from the righthand file for this 22 | conflicting area 23 | 24 | Finish by closing the left and righthand windows, 25 | turning off diff and removing the mappings 26 | 27 | The latter 3 have corresponding menu items: 28 | "Use Left", "Use Right" and "Finish". 29 | 30 | These can also be accessed via the commands: > 31 | 32 | :Conflict2DiffGetLeft 33 | :Conflict2DiffGetRight 34 | :Conflict2DiffFinish 35 | 36 | Note: If you begin resolving the conflicts and wish to abandon the changes, 37 | simply finishing will close the right and left hand windows, leaving the file 38 | with just "=======" for each conflict. You will then need to |undo| to get 39 | back to the original state. 40 | -------------------------------------------------------------------------------- /bundle/conf2dif/plugin/conf2dif.vim: -------------------------------------------------------------------------------- 1 | " Plugin to turn a CVS conflict file into a set of diff'ed files 2 | " with mappings to simplify the merging 3 | " 4 | " Version: 1.1 5 | " Last Changed: 07 Jul 2003 6 | " 7 | " Maintainer: Chris Rimmer 8 | 9 | let s:save_cpo = &cpo 10 | set cpo&vim 11 | 12 | if exists("loaded_conf2dif") 13 | finish 14 | endif 15 | 16 | let s:starts = "<<<<<<<" 17 | let s:middle = "=======" 18 | let s:ends = ">>>>>>>" 19 | 20 | let s:conf2dif_orig = "" 21 | 22 | function s:FilterConf(which) range 23 | let switch = 1 24 | let linenum = a:firstline 25 | let lastline = a:lastline 26 | let s:conflict = 0 27 | while linenum <= lastline 28 | execute linenum 29 | let line = getline(".") 30 | 31 | let newline = "" 32 | if line =~ "^".s:starts 33 | let switch = (a:which == 0) 34 | let s:conflict = 1 35 | elseif line =~ "^".s:middle 36 | let switch = (a:which == 1) 37 | let s:conflict = 1 38 | elseif line =~ "^".s:ends 39 | let s:conflict = 1 40 | let switch = 1 41 | if a:which == 2 42 | let newline = s:middle 43 | endif 44 | else 45 | let newline = line 46 | endif 47 | 48 | if (newline == "" && line != "") || switch == 0 49 | normal dd 50 | let lastline = lastline - 1 51 | else 52 | if newline != line 53 | call setline(".", newline) 54 | endif 55 | let linenum = linenum + 1 56 | endif 57 | endwhile 58 | endfunction 59 | 60 | function s:NewBuffer(which) 61 | vnew 62 | setlocal noswapfile 63 | normal "ap 64 | execute 0 65 | normal dd 66 | %call s:FilterConf(a:which) 67 | diffthis 68 | setlocal nomodifiable 69 | setlocal buftype=nowrite 70 | setlocal bufhidden=delete 71 | endfunction 72 | 73 | function s:GotoOriginal() 74 | execute bufwinnr(s:conf2dif_orig)."wincmd W" 75 | endfunction 76 | 77 | function s:GetLeft() 78 | if bufnr("%") != s:conf2dif_orig 79 | return 80 | endif 81 | execute "diffget ".s:conf2dif_left 82 | diffupdate 83 | endfunction 84 | 85 | function s:GetRight() 86 | if bufnr("%") != s:conf2dif_orig 87 | return 88 | endif 89 | call s:GotoOriginal() 90 | execute "diffget ".s:conf2dif_right 91 | diffupdate 92 | endfunction 93 | 94 | function s:Finish() 95 | if s:conf2dif_orig == "" 96 | return 97 | endif 98 | call s:GotoOriginal() 99 | set nodiff 100 | set foldcolumn=0 101 | nmapclear 102 | execute "bunload ".s:conf2dif_left 103 | execute "bunload ".s:conf2dif_right 104 | let s:conf2dif_orig = "" 105 | call s:MenusBefore() 106 | endfunction 107 | 108 | function s:Conflict2Diff() 109 | if s:conf2dif_orig != "" 110 | return 111 | endif 112 | let s:conf2dif_orig = bufnr("%") 113 | let temp_a = @a 114 | %yank a 115 | %call s:FilterConf(2) 116 | if s:conflict == 0 117 | execute 0 118 | echoerr "This doesn't seem to be a CVS Conflict File!" 119 | let s:conf2dif_orig = "" 120 | return 121 | endif 122 | set nosplitright 123 | call s:NewBuffer(0) 124 | let s:conf2dif_left = bufnr("%") 125 | call s:GotoOriginal() 126 | set splitright 127 | call s:NewBuffer(1) 128 | let s:conf2dif_right = bufnr("%") 129 | call s:GotoOriginal() 130 | diffthis 131 | execute 0 132 | nmap :Conflict2DiffGetLeft 133 | nmap :Conflict2DiffGetRight 134 | nmap [cz. 135 | nmap ]cz. 136 | nmap :Conflict2DiffFinish 137 | call s:MenusDuring() 138 | normal ]c 139 | let @a = temp_a 140 | endfunction 141 | 142 | function s:MenusBefore() 143 | nmenu enable Plugin.CVS\ Conflict.Resolve 144 | nmenu disable Plugin.CVS\ Conflict.Use\ Left 145 | nmenu disable Plugin.CVS\ Conflict.Use\ Right 146 | nmenu disable Plugin.CVS\ Conflict.Finish 147 | endfunction 148 | 149 | function s:MenusDuring() 150 | nmenu disable Plugin.CVS\ Conflict.Resolve 151 | nmenu enable Plugin.CVS\ Conflict.Use\ Left 152 | nmenu enable Plugin.CVS\ Conflict.Use\ Right 153 | nmenu enable Plugin.CVS\ Conflict.Finish 154 | endfunction 155 | 156 | command Conflict2Diff :call s:Conflict2Diff() 157 | command Conflict2DiffGetLeft :call s:GetLeft() 158 | command Conflict2DiffGetRight :call s:GetRight() 159 | command Conflict2DiffFinish :call s:Finish() 160 | 161 | nmenu Plugin.CVS\ Conflict.Resolve :Conflict2Diff 162 | nmenu Plugin.CVS\ Conflict.Use\ Left :Conflict2DiffGetLeft 163 | nmenu Plugin.CVS\ Conflict.Use\ Right :Conflict2DiffGetRight 164 | nmenu Plugin.CVS\ Conflict.Finish :Conflict2DiffFinish 165 | 166 | call s:MenusBefore() 167 | 168 | let &cpo = s:save_cpo 169 | -------------------------------------------------------------------------------- /bundle/html5.vim/README.markdown: -------------------------------------------------------------------------------- 1 | # html5.vim 2 | 3 | HTML5 omnicomplete funtion and syntax for Vim. 4 | Based on the default htmlcomplete.vim. 5 | 6 | ## Feature 7 | 8 | - Support all new elements and attribute. 9 | - Support [microdata][microdata]. 10 | - Support [RDFa][RDFa]. 11 | - Support [WAI-ARIA][aria]. 12 | 13 | ## Install 14 | 15 | curl http://github.com/othree/html5.vim/raw/master/autoload/htmlcomplete.vim > ~/.vim/autoload/htmlcomplete.vim 16 | curl http://github.com/othree/html5.vim/raw/master/autoload/xml/html5.vim > ~/.vim/autoload/xml/html5.vim 17 | curl http://github.com/othree/html5.vim/raw/master/syntax/html.vim > ~/.vim/syntax/html.vim 18 | 19 | or 20 | 21 | git clone git://github.com/othree/html5.vim.git 22 | cd html5.vim 23 | cp -R autoload ~/.vim/ 24 | 25 | ## Configure 26 | 27 | Disable event-handler attributes support: 28 | 29 | let g:event_handler_attributes_complete = 0 30 | 31 | Disable RDFa attributes support: 32 | 33 | let g:rdfa_attributes_complete = 0 34 | 35 | Disable microdata attributes support: 36 | 37 | let g:microdata_attributes_complete = 0 38 | 39 | Disable WAI-ARIA attribute support: 40 | 41 | let g:atia_attributes_complete = 0 42 | 43 | ## Change Log 44 | 45 | ### Version 0.2 46 | 47 | - attributes now must match from beginning 48 | - fix some attr(\w*on\w*) will use jscomplete for their value 49 | - add vim-makefile 50 | 51 | ## References 52 | 53 | 1. [HTML5 Spec][1] 54 | 2. [HTML5 Markup][2] 55 | 3. [Custom Data Attributes][3] 56 | 4. [microdata][4] 57 | 5. [RDFa 1.0 Rec][5] 58 | 6. [RDFa 1.1 Core WD][6] 59 | 7. [WAI-ARIA][7] 60 | 8. [IANA Language Sub Tags][8] 61 | 9. [IANA Charset][9] 62 | 63 | [microdata]:http://dev.w3.org/html5/md/ 64 | [RDFa]:http://www.w3.org/TR/rdfa-syntax/ 65 | [aria]:http://www.w3.org/TR/wai-aria/ 66 | 67 | [1]:http://dev.w3.org/html5/spec/ 68 | [2]:http://dev.w3.org/html5/markup/ 69 | [3]:http://dev.w3.org/html5/spec/Overview.html#custom-data-attribute 70 | [4]:http://dev.w3.org/html5/md/ 71 | [5]:http://www.w3.org/TR/rdfa-syntax/#a_xhtmlrdfa_dtd 72 | [6]:http://www.w3.org/TR/rdfa-core/ 73 | [7]:http://www.w3.org/TR/wai-aria/ 74 | [8]:http://www.iana.org/assignments/language-subtag-registry 75 | [9]:http://www.iana.org/assignments/character-sets 76 | -------------------------------------------------------------------------------- /bundle/html5.vim/config.mk: -------------------------------------------------------------------------------- 1 | VERSION=0.2 2 | 3 | -------------------------------------------------------------------------------- /bundle/html5.vim/syntax/html/html5.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: HTML (version 5) 3 | " Maintainer: Rodrigo Machado 4 | " URL: http://rm.blog.br/vim/syntax/html.vim 5 | " Last Change: 2009 Aug 19 6 | " License: Public domain 7 | " (but let me know if you like :) ) 8 | " 9 | " Note: This file just adds the new tags from HTML 5 10 | " and don't replace default html.vim syntax file 11 | " 12 | " Modified: othree 13 | " Last Change: 2010/09/09 14 | " Changes: update to Draft 28 August 2010 15 | " add complete new attributes 16 | " add wai-aria attributes 17 | " add microdata attributes 18 | " add rdfa attributes 19 | 20 | " HTML 5 tags 21 | syn keyword htmlTagName contained article aside audio canvas command 22 | syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer 23 | syn keyword htmlTagName contained header hgroup keygen mark meter menu nav output 24 | syn keyword htmlTagName contained progress time ruby rt rp section source summary time track video wbr 25 | 26 | " HTML 5 arguments 27 | " Core Attributes 28 | syn keyword htmlArg contained accesskey class contenteditable contextmenu dir 29 | syn keyword htmlArg contained draggable hidden id lang spellcheck style tabindex title 30 | " Event-handler Attributes 31 | syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange 32 | syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover 33 | syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange 34 | syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata 35 | syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup 36 | syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange 37 | syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate 38 | syn keyword htmlArg contained onvolumechange onwaiting 39 | " XML Attributes 40 | syn keyword htmlArg contained xml:lang xml:space xml:base 41 | " new features 42 | " 43 | syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload 44 | syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload 45 | "