mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 18:17:35 +00:00
A lot of changes to config
This commit is contained in:
parent
5bfb7cc24d
commit
9e8ebac387
@ -1,23 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: HTML (version 5)
|
||||
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
|
||||
" URL: http://rm.blog.br/vim/syntax/html.vim
|
||||
" Last Change: 2009 Aug 19
|
||||
" License: Public domain
|
||||
" (but let me know if you liked it :) )
|
||||
"
|
||||
" Note: This file just adds the new tags from HTML 5
|
||||
" and don't replace default html.vim syntax file
|
||||
|
||||
" HTML 5 tags
|
||||
syn keyword htmlTagName contained article aside audio bb canvas command datagrid
|
||||
syn keyword htmlTagName contained datalist details dialog embed figure footer
|
||||
syn keyword htmlTagName contained header hgroup keygen mark meter nav output
|
||||
syn keyword htmlTagName contained progress time ruby rt rp section time video
|
||||
|
||||
" HTML 5 arguments
|
||||
syn keyword htmlArg contained autofocus placeholder min max step
|
||||
syn keyword htmlArg contained contenteditable contextmenu draggable hidden item
|
||||
syn keyword htmlArg contained itemprop list subject spellcheck
|
||||
" this doesn't work because default syntax file alredy define a 'data' attribute
|
||||
syn match htmlArg "\<\(data-[\-a-zA-Z0-9_]\+\)=" contained
|
123
vim/dot_vim/colors/BusyBee.vim
Normal file
123
vim/dot_vim/colors/BusyBee.vim
Normal file
@ -0,0 +1,123 @@
|
||||
" Vim color file - BusyBee
|
||||
" Generated by http://bytefluent.com/vivify 2013-08-29
|
||||
set background=dark
|
||||
if version > 580
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
|
||||
set t_Co=256
|
||||
let g:colors_name = "BusyBee"
|
||||
|
||||
"hi IncSearch -- no settings --
|
||||
"hi WildMenu -- no settings --
|
||||
"hi SignColumn -- no settings --
|
||||
hi SpecialComment guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Typedef guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi Title guifg=#f6f3e8 guibg=NONE guisp=NONE gui=bold ctermfg=230 ctermbg=NONE cterm=bold
|
||||
hi Folded guifg=#a0a8b0 guibg=#384048 guisp=#384048 gui=NONE ctermfg=103 ctermbg=238 cterm=NONE
|
||||
hi PreCondit guifg=#faf4c6 guibg=NONE guisp=NONE gui=NONE ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
hi Include guifg=#faf4c6 guibg=NONE guisp=NONE gui=NONE ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
"hi TabLineSel -- no settings --
|
||||
hi StatusLineNC guifg=#939395 guibg=#303030 guisp=#303030 gui=NONE ctermfg=246 ctermbg=236 cterm=NONE
|
||||
"hi CTagsMember -- no settings --
|
||||
hi NonText guifg=#808080 guibg=#202020 guisp=#202020 gui=NONE ctermfg=8 ctermbg=234 cterm=NONE
|
||||
"hi CTagsGlobalConstant -- no settings --
|
||||
"hi DiffText -- no settings --
|
||||
"hi ErrorMsg -- no settings --
|
||||
"hi Ignore -- no settings --
|
||||
hi Debug guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi PMenuSbar guifg=NONE guibg=#202020 guisp=#202020 gui=NONE ctermfg=NONE ctermbg=234 cterm=NONE
|
||||
hi Identifier guifg=#b1d631 guibg=NONE guisp=NONE gui=NONE ctermfg=149 ctermbg=NONE cterm=NONE
|
||||
hi SpecialChar guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Conditional guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi StorageClass guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi Todo guifg=#8f8f8f guibg=NONE guisp=NONE gui=NONE ctermfg=245 ctermbg=NONE cterm=NONE
|
||||
hi Special guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi LineNr guifg=#303030 guibg=#202020 guisp=#202020 gui=NONE ctermfg=236 ctermbg=234 cterm=NONE
|
||||
hi StatusLine guifg=#d3d3d5 guibg=#303030 guisp=#303030 gui=NONE ctermfg=188 ctermbg=236 cterm=NONE
|
||||
hi Normal guifg=#e2e2e5 guibg=#202020 guisp=#202020 gui=NONE ctermfg=254 ctermbg=234 cterm=NONE
|
||||
hi Label guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
"hi CTagsImport -- no settings --
|
||||
hi PMenuSel guifg=#000000 guibg=#b1d631 guisp=#b1d631 gui=NONE ctermfg=NONE ctermbg=149 cterm=NONE
|
||||
"hi Search -- no settings --
|
||||
"hi CTagsGlobalVariable -- no settings --
|
||||
hi Delimiter guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Statement guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
"hi SpellRare -- no settings --
|
||||
"hi EnumerationValue -- no settings --
|
||||
hi Comment guifg=#3f3f3f guibg=NONE guisp=NONE gui=italic ctermfg=237 ctermbg=NONE cterm=NONE
|
||||
hi Character guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Float guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Number guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Boolean guifg=#b1d631 guibg=NONE guisp=NONE gui=NONE ctermfg=149 ctermbg=NONE cterm=NONE
|
||||
hi Operator guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi CursorLine guifg=NONE guibg=#202020 guisp=#202020 gui=NONE ctermfg=NONE ctermbg=234 cterm=NONE
|
||||
"hi Union -- no settings --
|
||||
"hi TabLineFill -- no settings --
|
||||
"hi Question -- no settings --
|
||||
"hi WarningMsg -- no settings --
|
||||
"hi VisualNOS -- no settings --
|
||||
"hi DiffDelete -- no settings --
|
||||
"hi ModeMsg -- no settings --
|
||||
hi CursorColumn guifg=NONE guibg=#202020 guisp=#202020 gui=NONE ctermfg=NONE ctermbg=234 cterm=NONE
|
||||
hi Define guifg=#faf4c6 guibg=NONE guisp=NONE gui=NONE ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
hi Function guifg=#ffff00 guibg=NONE guisp=NONE gui=NONE ctermfg=11 ctermbg=NONE cterm=NONE
|
||||
"hi FoldColumn -- no settings --
|
||||
hi PreProc guifg=#faf4c6 guibg=NONE guisp=NONE gui=NONE ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
"hi EnumerationName -- no settings --
|
||||
hi Visual guifg=#faf4c6 guibg=#3c414c guisp=#3c414c gui=NONE ctermfg=230 ctermbg=239 cterm=NONE
|
||||
"hi MoreMsg -- no settings --
|
||||
"hi SpellCap -- no settings --
|
||||
hi VertSplit guifg=#444444 guibg=#303030 guisp=#303030 gui=NONE ctermfg=238 ctermbg=236 cterm=NONE
|
||||
hi Exception guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi Keyword guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi Type guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
"hi DiffChange -- no settings --
|
||||
hi Cursor guifg=NONE guibg=#626262 guisp=#626262 gui=NONE ctermfg=NONE ctermbg=241 cterm=NONE
|
||||
"hi SpellLocal -- no settings --
|
||||
"hi Error -- no settings --
|
||||
hi PMenu guifg=#ffffff guibg=#202020 guisp=#202020 gui=NONE ctermfg=15 ctermbg=234 cterm=NONE
|
||||
hi SpecialKey guifg=#808080 guibg=#343434 guisp=#343434 gui=NONE ctermfg=8 ctermbg=236 cterm=NONE
|
||||
hi Constant guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
"hi DefinedName -- no settings --
|
||||
hi Tag guifg=#ff9800 guibg=NONE guisp=NONE gui=NONE ctermfg=208 ctermbg=NONE cterm=NONE
|
||||
hi String guifg=#606060 guibg=NONE guisp=NONE gui=NONE ctermfg=59 ctermbg=NONE cterm=NONE
|
||||
hi PMenuThumb guifg=NONE guibg=#303030 guisp=#303030 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE
|
||||
hi MatchParen guifg=#d0ffc0 guibg=#202020 guisp=#202020 gui=bold ctermfg=193 ctermbg=234 cterm=bold
|
||||
"hi LocalVariable -- no settings --
|
||||
hi Repeat guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
"hi SpellBad -- no settings --
|
||||
"hi CTagsClass -- no settings --
|
||||
"hi Directory -- no settings --
|
||||
hi Structure guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi Macro guifg=#faf4c6 guibg=NONE guisp=NONE gui=NONE ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
"hi Underlined -- no settings --
|
||||
"hi DiffAdd -- no settings --
|
||||
"hi TabLine -- no settings --
|
||||
hi cursorim guifg=#192224 guibg=#536991 guisp=#536991 gui=NONE ctermfg=235 ctermbg=60 cterm=NONE
|
||||
"hi clear -- no settings --
|
||||
hi stringdelimiter guifg=#556633 guibg=NONE guisp=NONE gui=NONE ctermfg=101 ctermbg=NONE cterm=NONE
|
||||
hi rubyregexp guifg=#dd0093 guibg=NONE guisp=NONE gui=NONE ctermfg=162 ctermbg=NONE cterm=NONE
|
||||
hi string guifg=#99ad6a guibg=NONE guisp=NONE gui=NONE ctermfg=107 ctermbg=NONE cterm=NONE
|
||||
hi constant guifg=#cf6a4c guibg=NONE guisp=NONE gui=NONE ctermfg=173 ctermbg=NONE cterm=NONE
|
||||
hi normal guifg=#e8e8d3 guibg=#151515 guisp=#151515 gui=NONE ctermfg=187 ctermbg=233 cterm=NONE
|
||||
hi rubyinstancevariable guifg=#c6b6fe guibg=NONE guisp=NONE gui=NONE ctermfg=147 ctermbg=NONE cterm=NONE
|
||||
hi rubyclass guifg=#447799 guibg=NONE guisp=NONE gui=NONE ctermfg=67 ctermbg=NONE cterm=NONE
|
||||
hi identifier guifg=#c6b6ee guibg=NONE guisp=NONE gui=NONE ctermfg=183 ctermbg=NONE cterm=NONE
|
||||
hi comment guifg=#888888 guibg=NONE guisp=NONE gui=italic ctermfg=102 ctermbg=NONE cterm=NONE
|
||||
hi rubyregexpdelimiter guifg=#540063 guibg=NONE guisp=NONE gui=NONE ctermfg=53 ctermbg=NONE cterm=NONE
|
||||
hi rubyregexpspecial guifg=#a40073 guibg=NONE guisp=NONE gui=NONE ctermfg=126 ctermbg=NONE cterm=NONE
|
||||
hi rubypredefinedidentifier guifg=#de5577 guibg=NONE guisp=NONE gui=NONE ctermfg=168 ctermbg=NONE cterm=NONE
|
||||
hi function guifg=#fad07a guibg=NONE guisp=NONE gui=NONE ctermfg=222 ctermbg=NONE cterm=NONE
|
||||
hi directory guifg=#dad085 guibg=NONE guisp=NONE gui=NONE ctermfg=186 ctermbg=NONE cterm=NONE
|
||||
hi rubysymbol guifg=#7697d6 guibg=NONE guisp=NONE gui=NONE ctermfg=110 ctermbg=NONE cterm=NONE
|
||||
hi rubycontrol guifg=#7597c6 guibg=NONE guisp=NONE gui=NONE ctermfg=110 ctermbg=NONE cterm=NONE
|
||||
hi rubyidentifier guifg=#c6b6fe guibg=NONE guisp=NONE gui=NONE ctermfg=147 ctermbg=NONE cterm=NONE
|
||||
hi pythonimport guifg=#009000 guibg=NONE guisp=NONE gui=NONE ctermfg=28 ctermbg=NONE cterm=NONE
|
||||
hi pythonexception guifg=#f00000 guibg=NONE guisp=NONE gui=NONE ctermfg=196 ctermbg=NONE cterm=NONE
|
||||
hi pythonbuiltinfunction guifg=#009000 guibg=NONE guisp=NONE gui=NONE ctermfg=28 ctermbg=NONE cterm=NONE
|
||||
hi pythonoperator guifg=#7e8aa2 guibg=NONE guisp=NONE gui=NONE ctermfg=103 ctermbg=NONE cterm=NONE
|
||||
hi pythonexclass guifg=#009000 guibg=NONE guisp=NONE gui=NONE ctermfg=28 ctermbg=NONE cterm=NONE
|
139
vim/dot_vim/colors/github.vim
Normal file
139
vim/dot_vim/colors/github.vim
Normal file
@ -0,0 +1,139 @@
|
||||
" Vim color file
|
||||
"
|
||||
" Author: Anthony Carapetis <anthony.carapetis@gmail.com>
|
||||
"
|
||||
" Note: Based on github's syntax highlighting theme
|
||||
" Used Brian Mock's darkspectrum as a starting point/template
|
||||
" Thanks to Ryan Heath for an easy list of some of the colours:
|
||||
" http://rpheath.com/posts/356-github-theme-for-syntax-gem
|
||||
|
||||
hi clear
|
||||
|
||||
set background=light
|
||||
if version > 580
|
||||
" no guarantees for version 5.8 and below, but this makes it stop
|
||||
" complaining
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
let g:colors_name="github"
|
||||
|
||||
hi Normal guifg=#000000 guibg=#F8F8FF
|
||||
|
||||
" {{{ Cursor
|
||||
hi Cursor guibg=#444454 guifg=#F8F8FF
|
||||
hi CursorLine guibg=#D8D8DD
|
||||
hi CursorColumn guibg=#E8E8EE
|
||||
" }}}
|
||||
|
||||
" {{{ Diff
|
||||
hi DiffAdd guifg=#003300 guibg=#DDFFDD gui=none
|
||||
hi DiffChange guibg=#ececec gui=none
|
||||
hi DiffText guifg=#000033 guibg=#DDDDFF gui=none
|
||||
hi DiffDelete guifg=#DDCCCC guibg=#FFDDDD gui=none
|
||||
" }}}
|
||||
|
||||
" {{{ Folding / Line Numbering / Status Lines
|
||||
hi Folded guibg=#ECECEC guifg=#808080 gui=bold
|
||||
hi vimFold guibg=#ECECEC guifg=#808080 gui=bold
|
||||
hi FoldColumn guibg=#ECECEC guifg=#808080 gui=bold
|
||||
|
||||
hi LineNr guifg=#959595 guibg=#ECECEC gui=bold
|
||||
hi NonText guifg=#808080 guibg=#ECECEC
|
||||
hi Folded guifg=#808080 guibg=#ECECEC gui=bold
|
||||
hi FoldeColumn guifg=#808080 guibg=#ECECEC gui=bold
|
||||
|
||||
hi VertSplit guibg=#bbbbbb guifg=#bbbbbb gui=none
|
||||
hi StatusLine guibg=#bbbbbb guifg=#404040 gui=bold
|
||||
hi StatusLineNC guibg=#d4d4d4 guifg=#404040 gui=italic
|
||||
" }}}
|
||||
|
||||
" {{{ Misc
|
||||
hi ModeMsg guifg=#990000
|
||||
hi MoreMsg guifg=#990000
|
||||
|
||||
hi Title guifg=#ef5939
|
||||
hi WarningMsg guifg=#ef5939
|
||||
hi SpecialKey guifg=#177F80 gui=italic
|
||||
|
||||
hi MatchParen guibg=#cdcdfd guifg=#000000
|
||||
hi Underlined guifg=#000000 gui=underline
|
||||
hi Directory guifg=#990000
|
||||
" }}}
|
||||
|
||||
" {{{ Search, Visual, etc
|
||||
hi Visual guifg=#FFFFFF guibg=#3465a4 gui=none
|
||||
hi VisualNOS guifg=#FFFFFF guibg=#204a87 gui=none
|
||||
hi IncSearch guibg=#cdcdfd guifg=#000000 gui=italic
|
||||
hi Search guibg=#cdcdfd guifg=#000000 gui=italic
|
||||
" }}}
|
||||
|
||||
" {{{ Syntax groups
|
||||
hi Ignore guifg=#808080
|
||||
hi Identifier guifg=#0086B3
|
||||
hi PreProc guifg=#A0A0A0 gui=bold
|
||||
hi Comment guifg=#999988
|
||||
hi Constant guifg=#177F80 gui=none
|
||||
hi String guifg=#D81745
|
||||
hi Function guifg=#990000 gui=bold
|
||||
hi Statement guifg=#000000 gui=bold
|
||||
hi Type guifg=#445588 gui=bold
|
||||
hi Number guifg=#1C9898
|
||||
hi Todo guifg=#FFFFFF guibg=#990000 gui=bold
|
||||
hi Special guifg=#159828 gui=bold
|
||||
hi rubySymbol guifg=#960B73
|
||||
hi Error guibg=#f8f8ff guifg=#ff1100 gui=undercurl
|
||||
hi Todo guibg=#f8f8ff guifg=#ff1100 gui=underline
|
||||
hi Label guifg=#000000 gui=bold
|
||||
hi StorageClass guifg=#000000 gui=bold
|
||||
hi Structure guifg=#000000 gui=bold
|
||||
hi TypeDef guifg=#000000 gui=bold
|
||||
" }}}
|
||||
|
||||
" {{{ Completion menus
|
||||
hi WildMenu guifg=#7fbdff guibg=#425c78 gui=none
|
||||
|
||||
hi Pmenu guibg=#808080 guifg=#ffffff gui=bold
|
||||
hi PmenuSel guibg=#cdcdfd guifg=#000000 gui=italic
|
||||
hi PmenuSbar guibg=#000000 guifg=#444444
|
||||
hi PmenuThumb guibg=#aaaaaa guifg=#aaaaaa
|
||||
" }}}
|
||||
|
||||
" {{{ Spelling
|
||||
hi spellBad guisp=#fcaf3e
|
||||
hi spellCap guisp=#73d216
|
||||
hi spellRare guisp=#fcaf3e
|
||||
hi spellLocal guisp=#729fcf
|
||||
" }}}
|
||||
|
||||
" {{{ Aliases
|
||||
hi link cppSTL Function
|
||||
hi link cppSTLType Type
|
||||
hi link Character Number
|
||||
hi link htmlTag htmlEndTag
|
||||
"hi link htmlTagName htmlTag
|
||||
hi link htmlLink Underlined
|
||||
hi link pythonFunction Identifier
|
||||
hi link Question Type
|
||||
hi link CursorIM Cursor
|
||||
hi link VisualNOS Visual
|
||||
hi link xmlTag Identifier
|
||||
hi link xmlTagName Identifier
|
||||
hi link shDeref Identifier
|
||||
hi link shVariable Function
|
||||
hi link rubySharpBang Special
|
||||
hi link perlSharpBang Special
|
||||
hi link schemeFunc Statement
|
||||
"hi link shSpecialVariables Constant
|
||||
"hi link bashSpecialVariables Constant
|
||||
" }}}
|
||||
|
||||
" {{{ Tabs (non-gui0
|
||||
hi TabLine guifg=#404040 guibg=#dddddd gui=none
|
||||
hi TabLineFill guifg=#404040 guibg=#dddddd gui=none
|
||||
hi TabLineSel guifg=#404040 gui=bold
|
||||
" }}}
|
||||
"
|
||||
" vim: sw=4 ts=4 foldmethod=marker
|
@ -1,251 +0,0 @@
|
||||
|
||||
" Description: html indenter
|
||||
" Author: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Mo, 05 Jun 2006 22:32:41 CEST
|
||||
" Restoring 'cpo' and 'ic' added by Bram 2006 May 5
|
||||
" Globals: g:html_indent_tags -- indenting tags
|
||||
" g:html_indent_strict -- inhibit 'O O' elements
|
||||
" g:html_indent_strict_table -- inhibit 'O -' elements
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
"if exists("b:did_indent")
|
||||
"finish
|
||||
"endif
|
||||
"let b:did_indent = 1
|
||||
|
||||
if exists("g:js_indent")
|
||||
so g:js_indent
|
||||
else
|
||||
ru! indent/javascript.vim
|
||||
endif
|
||||
|
||||
" [-- local settings (must come before aborting the script) --]
|
||||
setlocal indentexpr=HtmlIndentGetter(v:lnum)
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,{,}
|
||||
|
||||
|
||||
if exists('g:html_indent_tags')
|
||||
unlet g:html_indent_tags
|
||||
endif
|
||||
|
||||
" [-- helper function to assemble tag list --]
|
||||
fun! <SID>HtmlIndentPush(tag)
|
||||
if exists('g:html_indent_tags')
|
||||
let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag
|
||||
else
|
||||
let g:html_indent_tags = a:tag
|
||||
endif
|
||||
endfun
|
||||
|
||||
|
||||
" [-- <ELEMENT ? - - ...> --]
|
||||
call <SID>HtmlIndentPush('a')
|
||||
call <SID>HtmlIndentPush('abbr')
|
||||
call <SID>HtmlIndentPush('acronym')
|
||||
call <SID>HtmlIndentPush('address')
|
||||
call <SID>HtmlIndentPush('b')
|
||||
call <SID>HtmlIndentPush('bdo')
|
||||
call <SID>HtmlIndentPush('big')
|
||||
call <SID>HtmlIndentPush('blockquote')
|
||||
call <SID>HtmlIndentPush('button')
|
||||
call <SID>HtmlIndentPush('caption')
|
||||
call <SID>HtmlIndentPush('center')
|
||||
call <SID>HtmlIndentPush('cite')
|
||||
call <SID>HtmlIndentPush('code')
|
||||
call <SID>HtmlIndentPush('colgroup')
|
||||
call <SID>HtmlIndentPush('del')
|
||||
call <SID>HtmlIndentPush('dfn')
|
||||
call <SID>HtmlIndentPush('dir')
|
||||
call <SID>HtmlIndentPush('div')
|
||||
call <SID>HtmlIndentPush('dl')
|
||||
call <SID>HtmlIndentPush('em')
|
||||
call <SID>HtmlIndentPush('fieldset')
|
||||
call <SID>HtmlIndentPush('font')
|
||||
call <SID>HtmlIndentPush('form')
|
||||
call <SID>HtmlIndentPush('frameset')
|
||||
call <SID>HtmlIndentPush('h1')
|
||||
call <SID>HtmlIndentPush('h2')
|
||||
call <SID>HtmlIndentPush('h3')
|
||||
call <SID>HtmlIndentPush('h4')
|
||||
call <SID>HtmlIndentPush('h5')
|
||||
call <SID>HtmlIndentPush('h6')
|
||||
call <SID>HtmlIndentPush('i')
|
||||
call <SID>HtmlIndentPush('iframe')
|
||||
call <SID>HtmlIndentPush('ins')
|
||||
call <SID>HtmlIndentPush('kbd')
|
||||
call <SID>HtmlIndentPush('label')
|
||||
call <SID>HtmlIndentPush('legend')
|
||||
call <SID>HtmlIndentPush('map')
|
||||
call <SID>HtmlIndentPush('menu')
|
||||
call <SID>HtmlIndentPush('noframes')
|
||||
call <SID>HtmlIndentPush('noscript')
|
||||
call <SID>HtmlIndentPush('object')
|
||||
call <SID>HtmlIndentPush('ol')
|
||||
call <SID>HtmlIndentPush('optgroup')
|
||||
" call <SID>HtmlIndentPush('pre')
|
||||
call <SID>HtmlIndentPush('q')
|
||||
call <SID>HtmlIndentPush('s')
|
||||
call <SID>HtmlIndentPush('samp')
|
||||
call <SID>HtmlIndentPush('script')
|
||||
call <SID>HtmlIndentPush('select')
|
||||
call <SID>HtmlIndentPush('small')
|
||||
call <SID>HtmlIndentPush('span')
|
||||
call <SID>HtmlIndentPush('strong')
|
||||
call <SID>HtmlIndentPush('style')
|
||||
call <SID>HtmlIndentPush('sub')
|
||||
call <SID>HtmlIndentPush('sup')
|
||||
call <SID>HtmlIndentPush('table')
|
||||
call <SID>HtmlIndentPush('textarea')
|
||||
call <SID>HtmlIndentPush('title')
|
||||
call <SID>HtmlIndentPush('tt')
|
||||
call <SID>HtmlIndentPush('u')
|
||||
call <SID>HtmlIndentPush('ul')
|
||||
call <SID>HtmlIndentPush('var')
|
||||
|
||||
|
||||
" [-- <ELEMENT ? O O ...> --]
|
||||
if !exists('g:html_indent_strict')
|
||||
call <SID>HtmlIndentPush('body')
|
||||
call <SID>HtmlIndentPush('head')
|
||||
call <SID>HtmlIndentPush('html')
|
||||
call <SID>HtmlIndentPush('tbody')
|
||||
endif
|
||||
|
||||
|
||||
" [-- <ELEMENT ? O - ...> --]
|
||||
if !exists('g:html_indent_strict_table')
|
||||
call <SID>HtmlIndentPush('th')
|
||||
call <SID>HtmlIndentPush('td')
|
||||
call <SID>HtmlIndentPush('tr')
|
||||
call <SID>HtmlIndentPush('tfoot')
|
||||
call <SID>HtmlIndentPush('thead')
|
||||
endif
|
||||
|
||||
delfun <SID>HtmlIndentPush
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
" [-- count indent-increasing tags of line a:lnum --]
|
||||
fun! <SID>HtmlIndentOpen(lnum, pattern)
|
||||
let s = substitute('x'.getline(a:lnum),
|
||||
\ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g')
|
||||
let s = substitute(s, "[^\1].*$", '', '')
|
||||
return strlen(s)
|
||||
endfun
|
||||
|
||||
" [-- count indent-decreasing tags of line a:lnum --]
|
||||
fun! <SID>HtmlIndentClose(lnum, pattern)
|
||||
let s = substitute('x'.getline(a:lnum),
|
||||
\ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g')
|
||||
let s = substitute(s, "[^\1].*$", '', '')
|
||||
return strlen(s)
|
||||
endfun
|
||||
|
||||
" [-- count indent-increasing '{' of (java|css) line a:lnum --]
|
||||
fun! <SID>HtmlIndentOpenAlt(lnum)
|
||||
return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
|
||||
endfun
|
||||
|
||||
" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
|
||||
fun! <SID>HtmlIndentCloseAlt(lnum)
|
||||
return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
|
||||
endfun
|
||||
|
||||
" [-- return the sum of indents respecting the syntax of a:lnum --]
|
||||
fun! <SID>HtmlIndentSum(lnum, style)
|
||||
if a:style == match(getline(a:lnum), '^\s*</')
|
||||
if a:style == match(getline(a:lnum), '^\s*</\<\('.g:html_indent_tags.'\)\>')
|
||||
let open = <SID>HtmlIndentOpen(a:lnum, g:html_indent_tags)
|
||||
let close = <SID>HtmlIndentClose(a:lnum, g:html_indent_tags)
|
||||
if 0 != open || 0 != close
|
||||
return open - close
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if '' != &syntax &&
|
||||
\ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
|
||||
\ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name')
|
||||
\ =~ '\(css\|java\).*'
|
||||
if a:style == match(getline(a:lnum), '^\s*}')
|
||||
return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
|
||||
endif
|
||||
endif
|
||||
return 0
|
||||
endfun
|
||||
|
||||
fun! HtmlIndentGetter(lnum)
|
||||
|
||||
echo "Grabbing html indent for line: " . a:lnum
|
||||
" Find a non-empty line above the current line.
|
||||
let lnum = prevnonblank(a:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let restore_ic = &ic
|
||||
setlocal ic " ignore case
|
||||
|
||||
" [-- special handling for <pre>: no indenting --]
|
||||
if getline(a:lnum) =~ '\c</pre>'
|
||||
\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb')
|
||||
\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW')
|
||||
" we're in a line with </pre> or inside <pre> ... </pre>
|
||||
if restore_ic == 0
|
||||
setlocal noic
|
||||
endif
|
||||
return -1
|
||||
endif
|
||||
|
||||
" [-- special handling for <javascript>: use cindent --]
|
||||
let js = '<script.*type\s*=.*javascript'
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" by Tye Zdrojewski <zdro@yahoo.com>, 05 Jun 2006
|
||||
" ZDR: This needs to be an AND (we are 'after the start of the pair' AND
|
||||
" we are 'before the end of the pair'). Otherwise, indentation
|
||||
" before the start of the script block will be affected; the end of
|
||||
" the pair will still match if we are before the beginning of the
|
||||
" pair.
|
||||
"
|
||||
if 0 < searchpair(js, '', '</script>', 'nWb')
|
||||
\ && 0 < searchpair(js, '', '</script>', 'nW')
|
||||
" we're inside javascript
|
||||
|
||||
if getline(lnum) !~ js && getline(a:lnum) !~ '</script>'
|
||||
if restore_ic == 0
|
||||
setlocal noic
|
||||
endif
|
||||
return GetJsIndent(a:lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
if getline(lnum) =~ '\c</pre>'
|
||||
" line before the current line a:lnum contains
|
||||
" a closing </pre>. --> search for line before
|
||||
" starting <pre> to restore the indent.
|
||||
let preline = prevnonblank(search('\c<pre>', 'bW') - 1)
|
||||
if preline > 0
|
||||
if restore_ic == 0
|
||||
setlocal noic
|
||||
endif
|
||||
return indent(preline)
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = <SID>HtmlIndentSum(lnum, -1)
|
||||
let ind = ind + <SID>HtmlIndentSum(a:lnum, 0)
|
||||
|
||||
if restore_ic == 0
|
||||
setlocal noic
|
||||
endif
|
||||
|
||||
return indent(lnum) + (&sw * ind)
|
||||
endfun
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" [-- EOF <runtime>/indent/html.vim --]
|
@ -1,407 +0,0 @@
|
||||
" Vim indent file Language: JavaScript
|
||||
" Author: Preston Koprivica (pkopriv2@gmail.com)
|
||||
" URL:
|
||||
" Last Change: April 30, 2010
|
||||
|
||||
" 0. Standard Stuff
|
||||
" =================
|
||||
|
||||
" Only load one indent script per buffer
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
" Set the global log variable 1 = logging enabled, 0 = logging disabled
|
||||
if !exists("g:js_indent_log")
|
||||
let g:js_indent_log = 0
|
||||
endif
|
||||
|
||||
setlocal indentexpr=GetJsIndent(v:lnum)
|
||||
setlocal indentkeys=
|
||||
|
||||
|
||||
setlocal cindent
|
||||
setlocal autoindent
|
||||
|
||||
|
||||
" 1. Variables
|
||||
" ============
|
||||
|
||||
" Inline comments (for anchoring other statements)
|
||||
let s:js_mid_line_comment = '\s*\(\/\*.*\*\/\)*\s*'
|
||||
let s:js_end_line_comment = s:js_mid_line_comment . '\s*\(//.*\)*'
|
||||
let s:js_line_comment = s:js_end_line_comment
|
||||
|
||||
" Comment/String Syntax Key
|
||||
let s:syn_comment = '\(Comment\|String\|Regexp\)'
|
||||
|
||||
|
||||
" 2. Aux. Functions
|
||||
" =================
|
||||
|
||||
" = Method: IsInComment
|
||||
"
|
||||
" Determines whether the specified position is contained in a comment. "Note:
|
||||
" This depends on a
|
||||
function! s:IsInComment(lnum, cnum)
|
||||
return synIDattr(synID(a:lnum, a:cnum, 1), 'name') =~? s:syn_comment
|
||||
endfunction
|
||||
|
||||
|
||||
" = Method: IsComment
|
||||
"
|
||||
" Determines whether a line is a comment or not.
|
||||
function! s:IsComment(lnum)
|
||||
let line = getline(a:lnum)
|
||||
|
||||
return s:IsInComment(a:lnum, 1) && s:IsInComment(a:lnum, strlen(line)) "Doesn't absolutely work. Only Probably!
|
||||
endfunction
|
||||
|
||||
|
||||
" = Method: GetNonCommentLine
|
||||
"
|
||||
" Grabs the nearest non-commented line
|
||||
function! s:GetNonCommentLine(lnum)
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
|
||||
while lnum > 0
|
||||
if s:IsComment(lnum)
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
else
|
||||
return lnum
|
||||
endif
|
||||
endwhile
|
||||
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" = Method: SearchForPair
|
||||
"
|
||||
" Returns the beginning tag of a given pair starting from the given line.
|
||||
function! s:SearchForPair(lnum, beg, end)
|
||||
" Save the cursor position.
|
||||
let curpos = getpos(".")
|
||||
|
||||
" Set the cursor position to the beginning of the line (default
|
||||
" behavior when using ==)
|
||||
call cursor(a:lnum, 0)
|
||||
|
||||
" Search for the opening tag
|
||||
let mnum = searchpair(a:beg, '', a:end, 'bW',
|
||||
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? s:syn_comment' )
|
||||
|
||||
"Restore the cursor position
|
||||
call cursor(curpos)
|
||||
|
||||
" Finally, return the matched line number
|
||||
return mnum
|
||||
endfunction
|
||||
|
||||
|
||||
" Object Helpers
|
||||
" ==============
|
||||
let s:object_beg = '{[^}]*' . s:js_end_line_comment . '$'
|
||||
let s:object_end = '^' . s:js_mid_line_comment . '}[;,]\='
|
||||
|
||||
|
||||
function! s:IsObjectBeg(line)
|
||||
return a:line =~ s:object_beg
|
||||
endfunction
|
||||
|
||||
function! s:IsObjectEnd(line)
|
||||
return a:line =~ s:object_end
|
||||
endfunction
|
||||
|
||||
function! s:GetObjectBeg(lnum)
|
||||
return s:SearchForPair(a:lnum, '{', '}')
|
||||
endfunction
|
||||
|
||||
|
||||
" Array Helpers
|
||||
" ==============
|
||||
let s:array_beg = '\[[^\]]*' . s:js_end_line_comment . '$'
|
||||
let s:array_end = '^' . s:js_mid_line_comment . '[^\[]*\][;,]*' . s:js_end_line_comment . '$'
|
||||
|
||||
|
||||
function! s:IsArrayBeg(line)
|
||||
return a:line =~ s:array_beg
|
||||
endfunction
|
||||
|
||||
function! s:IsArrayEnd(line)
|
||||
return a:line =~ s:array_end
|
||||
endfunction
|
||||
|
||||
function! s:GetArrayBeg(lnum)
|
||||
return s:SearchForPair(a:lnum, '\[', '\]')
|
||||
endfunction
|
||||
|
||||
|
||||
" MultiLine Declaration/Invocation Helpers
|
||||
" ========================================
|
||||
let s:paren_beg = '([^)]*' . s:js_end_line_comment . '$'
|
||||
let s:paren_end = '^' . s:js_mid_line_comment . '[^(]*)[;,]*'
|
||||
|
||||
function! s:IsParenBeg(line)
|
||||
return a:line =~ s:paren_beg
|
||||
endfunction
|
||||
|
||||
function! s:IsParenEnd(line)
|
||||
return a:line =~ s:paren_end
|
||||
endfunction
|
||||
|
||||
function! s:GetParenBeg(lnum)
|
||||
return s:SearchForPair(a:lnum, '(', ')')
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
" Continuation Helpers
|
||||
" ====================
|
||||
let s:continuation = '\(+\|\\\)\{1}' . s:js_line_comment . '$'
|
||||
|
||||
function! s:IsContinuationLine(line)
|
||||
return a:line =~ s:continuation
|
||||
endfunction
|
||||
|
||||
function! s:GetContinuationBegin(lnum)
|
||||
let cur = a:lnum
|
||||
|
||||
while s:IsContinuationLine(getline(cur))
|
||||
let cur -= 1
|
||||
endwhile
|
||||
|
||||
return cur + 1
|
||||
endfunction
|
||||
|
||||
|
||||
" Switch Helpers
|
||||
" ==============
|
||||
let s:switch_beg_next_line = 'switch\s*(.*)\s*' . s:js_mid_line_comment . s:js_end_line_comment . '$'
|
||||
let s:switch_beg_same_line = 'switch\s*(.*)\s*' . s:js_mid_line_comment . '{\s*' . s:js_line_comment . '$'
|
||||
let s:switch_mid = '^.*\(case.*\|default\)\s*:\s*'
|
||||
|
||||
function! s:IsSwitchBeginNextLine(line)
|
||||
return a:line =~ s:switch_beg_next_line
|
||||
endfunction
|
||||
|
||||
function! s:IsSwitchBeginSameLine(line)
|
||||
return a:line =~ s:switch_beg_same_line
|
||||
endfunction
|
||||
|
||||
function! s:IsSwitchMid(line)
|
||||
return a:line =~ s:switch_mid
|
||||
endfunction
|
||||
|
||||
|
||||
" Control Helpers
|
||||
" ===============
|
||||
let s:cntrl_beg_keys = '\(\(\(if\|for\|with\|while\)\s*(.*)\)\|\(try\|do\)\)\s*'
|
||||
let s:cntrl_mid_keys = '\(\(\(else\s*if\|catch\)\s*(.*)\)\|\(finally\|else\)\)\s*'
|
||||
|
||||
let s:cntrl_beg = s:cntrl_beg_keys . s:js_end_line_comment . '$'
|
||||
let s:cntrl_mid = s:cntrl_mid_keys . s:js_end_line_comment . '$'
|
||||
|
||||
let s:cntrl_end = '\(while\s*(.*)\)\s*;\=\s*' . s:js_end_line_comment . '$'
|
||||
|
||||
function! s:IsControlBeg(line)
|
||||
return a:line =~ s:cntrl_beg
|
||||
endfunction
|
||||
|
||||
function! s:IsControlMid(line)
|
||||
return a:line =~ s:cntrl_mid
|
||||
endfunction
|
||||
|
||||
function! s:IsControlMidStrict(line)
|
||||
return a:line =~ s:cntrl_mid
|
||||
endfunction
|
||||
|
||||
function! s:IsControlEnd(line)
|
||||
return a:line =~ s:cntrl_end
|
||||
endfunction
|
||||
|
||||
" = Method: Log
|
||||
"
|
||||
" Logs a message to the stdout.
|
||||
function! s:Log(msg)
|
||||
if g:js_indent_log
|
||||
echo "LOG: " . a:msg
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
" 3. Indenter
|
||||
" ===========
|
||||
function! GetJsIndent(lnum)
|
||||
" Grab the first non-comment line prior to this line
|
||||
let pnum = s:GetNonCommentLine(a:lnum-1)
|
||||
|
||||
" First line, start at indent = 0
|
||||
if pnum == 0
|
||||
call s:Log("No, noncomment lines prior to the current line.")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Grab the second non-comment line prior to this line
|
||||
let ppnum = s:GetNonCommentLine(pnum-1)
|
||||
|
||||
call s:Log("Line: " . a:lnum)
|
||||
call s:Log("PLine: " . pnum)
|
||||
call s:Log("PPLine: " . ppnum)
|
||||
|
||||
" Grab the lines themselves.
|
||||
let line = getline(a:lnum)
|
||||
let pline = getline(pnum)
|
||||
let ppline = getline(ppnum)
|
||||
|
||||
" Determine the current level of indentation
|
||||
let ind = indent(pnum)
|
||||
|
||||
|
||||
" Handle: Object Closers (ie })
|
||||
" =============================
|
||||
if s:IsObjectEnd(line) && !s:IsComment(a:lnum)
|
||||
call s:Log("Line matched object end")
|
||||
|
||||
let obeg = s:GetObjectBeg(a:lnum)
|
||||
let oind = indent(obeg)
|
||||
let oline = getline(obeg)
|
||||
|
||||
call s:Log("The object beg was found at: " . obeg)
|
||||
return oind
|
||||
endif
|
||||
|
||||
if s:IsObjectBeg(pline)
|
||||
call s:Log("Pline matched object beg")
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
|
||||
" Handle: Array Closer (ie ])
|
||||
" ============================
|
||||
if s:IsArrayEnd(line) && !s:IsComment(a:lnum)
|
||||
call s:Log("Line matched array end")
|
||||
|
||||
let abeg = s:GetArrayBeg(a:lnum)
|
||||
let aind = indent(abeg)
|
||||
|
||||
call s:Log("The array beg was found at: " . abeg)
|
||||
return aind
|
||||
endif
|
||||
|
||||
if s:IsArrayBeg(pline)
|
||||
call s:Log("Pline matched array beg")
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
" Handle: Parens
|
||||
" ==============
|
||||
if s:IsParenEnd(line) && !s:IsComment(a:lnum)
|
||||
call s:Log("Line matched paren end")
|
||||
|
||||
let abeg = s:GetParenBeg(a:lnum)
|
||||
let aind = indent(abeg)
|
||||
|
||||
call s:Log("The paren beg was found at: " . abeg)
|
||||
return aind
|
||||
endif
|
||||
|
||||
if s:IsParenBeg(pline)
|
||||
call s:Log("Pline matched paren beg")
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
|
||||
" Handle: Continuation Lines.
|
||||
" ========================================================
|
||||
if s:IsContinuationLine(pline)
|
||||
call s:Log('Pline is a continuation line.')
|
||||
|
||||
let cbeg = s:GetContinuationBegin(pnum)
|
||||
let cind = indent(cbeg)
|
||||
|
||||
call s:Log('The continuation block begin found at: ' . cbeg)
|
||||
return cind + &sw
|
||||
endif
|
||||
|
||||
if s:IsContinuationLine(ppline)
|
||||
call s:Log('PPline was a continuation line but pline wasnt.')
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" Handle: Switch Control Blocks
|
||||
" =============================
|
||||
if s:IsSwitchMid(pline)
|
||||
call s:Log("PLine matched switch cntrl mid")
|
||||
if s:IsSwitchMid(line) || s:IsObjectEnd(line)
|
||||
call s:Log("Line matched a cntrl mid")
|
||||
return ind
|
||||
else
|
||||
call s:Log("Line didnt match a cntrl mid")
|
||||
return ind + &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:IsSwitchMid(line)
|
||||
call s:Log("Line matched switch cntrl mid")
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
|
||||
" Handle: Single Line Control Blocks
|
||||
" ==================================
|
||||
if s:IsControlBeg(pline)
|
||||
call s:Log("Pline matched control beginning")
|
||||
|
||||
if s:IsControlMid(line)
|
||||
call s:Log("Line matched a control mid")
|
||||
return ind
|
||||
elseif line =~ '^\s*{\s*$'
|
||||
call s:Log("Line matched an object beg")
|
||||
return ind
|
||||
else
|
||||
return ind + &sw
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
if s:IsControlMid(pline)
|
||||
call s:Log("Pline matched a control mid")
|
||||
|
||||
if s:IsControlMid(line)
|
||||
call s:Log("Line matched a control mid")
|
||||
return ind
|
||||
elseif s:IsObjectBeg(line)
|
||||
call s:Log("Line matched an object beg")
|
||||
return ind
|
||||
else
|
||||
call s:Log("Line didn't match a control mid or object beg."
|
||||
return ind + &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:IsControlMid(line)
|
||||
call s:Log("Line matched a control mid.")
|
||||
|
||||
if s:IsControlEnd(pline) || s:IsObjectEnd(pline)
|
||||
call s:Log("PLine matched control end")
|
||||
return ind
|
||||
else
|
||||
call s:Log("Pline didn't match object end")
|
||||
return ind - &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
if ( s:IsControlBeg(ppline) || s:IsControlMid(ppline) ) &&
|
||||
\ !s:IsObjectBeg(pline) && !s:IsObjectEnd(pline)
|
||||
call s:Log("PPLine matched single line control beg or mid")
|
||||
return ind - &sw
|
||||
endif
|
||||
|
||||
" Handle: No matches
|
||||
" ==================
|
||||
"call s:Log("Line didn't match anything. Retaining indent")
|
||||
return ind
|
||||
endfunction
|
@ -23,7 +23,7 @@ Bundle 'file-line'
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
" Needs Vim compiled with Ruby
|
||||
" Quick find files in project
|
||||
Bundle 'wincent/Command-T'
|
||||
Bundle 'wincent/Command-T'
|
||||
|
||||
" -- Buffer Nav --
|
||||
" Tree view for managing tabs
|
||||
@ -54,20 +54,31 @@ Bundle 'tpope/vim-surround'
|
||||
Bundle 'terryma/vim-multiple-cursors'
|
||||
|
||||
" -- GUI --
|
||||
Bundle 'vividchalk.vim'
|
||||
" Can probably drop this for wombat256
|
||||
Bundle 'vim-scripts/Wombat'
|
||||
Bundle 'wombat256.vim'
|
||||
Bundle 'gregsexton/MatchTag'
|
||||
" Custom Status Line
|
||||
Bundle 'bling/vim-airline'
|
||||
"Powerline Config
|
||||
"If using a patched font: https://github.com/Lokaltog/vim-powerline/wiki/Patched-fonts
|
||||
"If using a patched font: https://github.com/Lokaltog/vim-powerline/wiki/Patched-fonts
|
||||
"let g:airline_powerline_fonts = 1
|
||||
|
||||
" -- Themes --
|
||||
Bundle 'vividchalk.vim'
|
||||
Bundle 'wombat256.vim'
|
||||
"Bundle 'BusyBee.vim'
|
||||
Bundle 'nanotech/jellybeans.vim'
|
||||
"Bundle 'github.vim'
|
||||
Bundle 'candy.vim'
|
||||
Bundle 'therubymug/vim-pyte'
|
||||
Bundle 'eclipse.vim'
|
||||
Bundle 'summerfruit256.vim'
|
||||
Bundle 'nuvola.vim'
|
||||
Bundle 'altercation/vim-colors-solarized'
|
||||
|
||||
" -- Filetypes --
|
||||
Bundle 'ViViDboarder/vim-forcedotcom'
|
||||
Bundle 'pdurbin/vim-tsv'
|
||||
"Bundle 'chrisbra/csv.vim'
|
||||
Bundle 'pangloss/vim-javascript'
|
||||
|
||||
" ***************************
|
||||
" Built in settings
|
||||
@ -140,19 +151,24 @@ try
|
||||
colorscheme $VIM_COLOR
|
||||
else
|
||||
if has("gui_running")
|
||||
colorscheme wombat
|
||||
colorscheme wombat256mod
|
||||
else
|
||||
colorscheme vividchalk
|
||||
endif
|
||||
endif
|
||||
catch /^Vim\%((\a\+)\)\=:E185/
|
||||
" Colorschemes not installed yet
|
||||
" This happens when first installing bundles
|
||||
" Colorschemes not installed yet
|
||||
" This happens when first installing bundles
|
||||
endtry
|
||||
|
||||
" Set Airline theme
|
||||
if g:colors_name == 'github'
|
||||
let g:airline_theme = 'solarized'
|
||||
endif
|
||||
|
||||
" Set gui fonts
|
||||
if has("gui_running")
|
||||
if has("gui_win32")
|
||||
if has("gui_win32")
|
||||
set guifont=Consolas:h10:b
|
||||
elseif has("gui_macvim")
|
||||
try
|
||||
@ -209,7 +225,7 @@ nmap <leader>lw :set wrap!<CR>
|
||||
nmap <leader>ws :set list!<CR>
|
||||
|
||||
" Map Shift+U to redo
|
||||
nnoremap <S-u> <C-r>
|
||||
nnoremap <S-u> <C-r>
|
||||
|
||||
" Stupid shift key fixes
|
||||
cmap WQ<CR> wq<CR>
|
||||
@ -217,11 +233,16 @@ cmap Wq<CR> wq<CR>
|
||||
cmap W<CR> w<CR>
|
||||
cmap Q<CR> q<CR>
|
||||
cmap Q!<CR> q!<CR>
|
||||
" Stupid semicolon files
|
||||
cnoremap w; w
|
||||
cnoremap W; w
|
||||
cnoremap q; q
|
||||
cnoremap Q; q
|
||||
|
||||
" Clearing highlighted search
|
||||
nmap <silent> <leader>/ :set hlsearch! hlsearch?<CR>
|
||||
noremap <C-h><C-s> :set hlsearch! hlsearch?<CR>
|
||||
" Clear search
|
||||
" Clear search
|
||||
nmap <silent> <leader>cs :nohlsearch<CR>
|
||||
|
||||
" Code fold
|
||||
@ -231,6 +252,29 @@ nmap <leader>cf ?{<CR>zf%<ESC>:nohlsearch<CR>
|
||||
" PLUGIN SETTINGS
|
||||
" ********************************
|
||||
|
||||
" Airline config
|
||||
" Use short-form mode text
|
||||
let g:airline_mode_map = {
|
||||
\ '__' : '-',
|
||||
\ 'n' : 'N',
|
||||
\ 'i' : 'I',
|
||||
\ 'R' : 'R',
|
||||
\ 'c' : 'C',
|
||||
\ 'v' : 'V',
|
||||
\ 'V' : 'V',
|
||||
\ '' : 'V',
|
||||
\ 's' : 'S',
|
||||
\ 'S' : 'S',
|
||||
\ '' : 'S',
|
||||
\ }
|
||||
let g:airline#extensions#whitespace#trailing_format = 'tw[%s]'
|
||||
let g:airline#extensions#whitespace#mixed_indent_format = 'i[%s]'
|
||||
let g:airline_left_sep=''
|
||||
let g:airline_left_alt_sep=''
|
||||
let g:airline_right_sep=''
|
||||
let g:airline_right_alt_sep=''
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
|
||||
" Buffet shortcut
|
||||
nnoremap <silent> <F2> :Bufferlist<CR>
|
||||
nnoremap <leader>bl :Bufferlist<CR>
|
||||
@ -289,7 +333,7 @@ endif
|
||||
nnoremap <leader>u :CtrlPCurFile<CR>
|
||||
nnoremap <leader>m :CtrlPMRUFiles<CR>
|
||||
|
||||
" fugitive
|
||||
" fugitive
|
||||
" Add some shortcuts for git commands
|
||||
nnoremap <leader>gs :Gstatus<CR>
|
||||
nnoremap <leader>gc :Gcommit<CR>
|
||||
|
Loading…
Reference in New Issue
Block a user