diff options
author | xero <x@xero.nu> | 2014-05-05 15:09:26 -0400 |
---|---|---|
committer | xero <x@xero.nu> | 2014-05-05 15:09:26 -0400 |
commit | 89a2b67f2427d961bb2f0de771a0290d85e379f9 (patch) | |
tree | a30fa26360b7c3cf442689650da54865ac0f6fc3 /.vim/bundle/indentLine | |
parent | 53b47ce8258f7efe380cc9dab09826b1f0e9bc27 (diff) | |
download | dotfiles_ascii-89a2b67f2427d961bb2f0de771a0290d85e379f9.tar.xz dotfiles_ascii-89a2b67f2427d961bb2f0de771a0290d85e379f9.zip |
add vim configs -- yes i have joined the cult of vim
Diffstat (limited to '')
-rw-r--r-- | .vim/bundle/indentLine/.gitattributes | 22 | ||||
-rw-r--r-- | .vim/bundle/indentLine/.gitignore | 163 | ||||
-rw-r--r-- | .vim/bundle/indentLine/README.md | 34 | ||||
-rw-r--r-- | .vim/bundle/indentLine/after/plugin/indentLine.vim | 166 | ||||
-rw-r--r-- | .vim/bundle/indentLine/doc/indentLine.txt | 143 |
5 files changed, 528 insertions, 0 deletions
diff --git a/.vim/bundle/indentLine/.gitattributes b/.vim/bundle/indentLine/.gitattributes new file mode 100644 index 0000000..412eeda --- /dev/null +++ b/.vim/bundle/indentLine/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.vim/bundle/indentLine/.gitignore b/.vim/bundle/indentLine/.gitignore new file mode 100644 index 0000000..5ebd21a --- /dev/null +++ b/.vim/bundle/indentLine/.gitignore @@ -0,0 +1,163 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.vspscc +.builds +*.dotCover + +## TODO: If you have NuGet Package Restore enabled, uncomment this +#packages/ + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp + +# ReSharper is a .NET coding add-in +_ReSharper* + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Others +[Bb]in +[Oo]bj +sql +TestResults +*.Cache +ClientBin +stylecop.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + + +############ +## Windows +############ + +# Windows image file caches +Thumbs.db + +# Folder config file +Desktop.ini + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Mac crap +.DS_Store diff --git a/.vim/bundle/indentLine/README.md b/.vim/bundle/indentLine/README.md new file mode 100644 index 0000000..c15f359 --- /dev/null +++ b/.vim/bundle/indentLine/README.md @@ -0,0 +1,34 @@ +indentLine +========== + +This plugin is used for displaying thin vertical lines at each indentation level for code indented with spaces. For code indented with tabs I think there is no need to support it, because you can use `:set list lcs=tab:\|\ ` (here is a space). + +## Requirements +This plugin takes advantage of the newly provided `conceal` feature in Vim 7.3, so this plugin will not work with lower versions of Vim. + +## Installation +To install the plugin just put the plugin files in your `~/.vim` (Linux) or `~/vimfiles` (Windows). + +If you use a plugin manager you can put the whole directory into your `~/.vim/bundle/` directory ([Pathogen][pathogen]) or add the line `Bundle 'Yggdroot/indentLine'` to your `.vimrc` ([Vundle][vundle]). + +## Customization +You can change the color of indentLines: +for Vim, set `g:indentLine_color_term` in your `.vimrc`, e.g. `let g:indentLine_color_term = 239`, +for GVim, set `g:indentLine_color_gui` in your `.vimrc`, e.g. `let g:indentLine_color_gui = '#A4E57E'` +for none X terminal, set `g:indentLine_color_tty_light` and `g:indentLine_color_tty_dark` in your `.vimrc`. e.g. `let g:indentLine_color_tty_light = 7`(default: 4), `let g:indentLine_color_dark = 1`(default: 2). + +You can also change the indentLine char: +for both Vim and GVim, set `let g:indentLine_char = 'c'` where `'c'` can be any ASCII character. You can also use one of `¦`, `┆` or `│` to display more beautiful lines. However, these characters will only work with files whose encoding is UTF-8. + +## Self promotion +If you think this script is helpful, follow the [GitHub repository][repository], and don't forget to vote for it on Vim.org! ([vimscript #4354][script]). + +[pathogen]: https://github.com/tpope/vim-pathogen +[vundle]: https://github.com/gmarik/vundle +[repository]: https://github.com/Yggdroot/indentLine +[script]: http://www.vim.org/scripts/script.php?script_id=4354 + + +## Screenshots +![Screenshot](http://i.imgur.com/KVi0T.jpg) + diff --git a/.vim/bundle/indentLine/after/plugin/indentLine.vim b/.vim/bundle/indentLine/after/plugin/indentLine.vim new file mode 100644 index 0000000..fc78278 --- /dev/null +++ b/.vim/bundle/indentLine/after/plugin/indentLine.vim @@ -0,0 +1,166 @@ +" Script Name: indentLine.vim +" Author: Yggdroot <archofortune@gmail.com> +" +" Description: To show the indention levels with thin vertical lines + +scriptencoding utf-8 + +if ! has("conceal") || exists("g:indentLine_loaded") + finish +endif +let g:indentLine_loaded = 1 + + +let g:indentLine_char = get(g:,'indentLine_char',(&encoding is# "utf-8" && &term isnot# "linux" ? '¦' : '|')) +let g:indentLine_first_char = get(g:,'indentLine_first_char',(&encoding is# "utf-8" && &term isnot# "linux" ? '¦' : '|')) +let g:indentLine_indentLevel = get(g:,'indentLine_indentLevel',10) +let g:indentLine_enabled = get(g:,'indentLine_enabled',1) +let g:indentLine_fileType = get(g:,'indentLine_fileType',[]) +let g:indentLine_fileTypeExclude = get(g:,'indentLine_fileTypeExclude',[]) +let g:indentLine_bufNameExclude = get(g:,'indentLine_bufNameExclude',[]) +let g:indentLine_showFirstIndentLevel = get(g:,'indentLine_showFirstIndentLevel',0) +let g:indentLine_maxLines = get(g:,'indentLine_maxLines',3000) +let g:indentLine_setColors = get(g:,'indentLine_setColors',1) +let g:indentLine_faster = get(g:,'indentLine_faster',0) + +"{{{1 function! s:InitColor() +function! s:InitColor() + if ! g:indentLine_setColors + return + endif + + if ! exists("g:indentLine_color_term") + if &background is# "light" + let term_color = 249 + else + let term_color = 239 + endif + else + let term_color = g:indentLine_color_term + endif + + if ! exists("g:indentLine_color_gui") + if &background is# "light" + let gui_color = "Grey70" + else + let gui_color = "Grey30" + endif + else + let gui_color = g:indentLine_color_gui + endif + + execute "highlight Conceal ctermfg=" . term_color . " ctermbg=NONE" + execute "highlight Conceal guifg=" . gui_color . " guibg=NONE" + + if &term is# "linux" + if &background is# "light" + let tty_color = exists("g:indentLine_color_tty_light") ? g:indentLine_color_tty_light : 4 + else + let tty_color = exists("g:indentLine_color_tty_dark") ? g:indentLine_color_tty_dark : 2 + endif + execute "highlight Conceal cterm=bold ctermfg=" . tty_color . " ctermbg=NONE" + endif +endfunction + +"{{{1 function! s:SetIndentLine() +function! s:SetIndentLine() + let b:indentLine_enabled = 1 + let space = &l:shiftwidth is 0 ? &l:tabstop : &l:shiftwidth + + if g:indentLine_showFirstIndentLevel + execute 'syntax match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_first_char + endif + + if g:indentLine_faster + execute 'syntax match IndentLineSpace /^\s\+/ containedin=ALL contains=IndentLine' + execute 'syntax match IndentLine / \{'.(space-1).'}\zs / contained conceal cchar=' . g:indentLine_char + execute 'syntax match IndentLine /\t\zs / contained conceal cchar=' . g:indentLine_char + else + let pattern = line('$') < g:indentLine_maxLines ? 'v' : 'c' + for i in range(space+1, space * g:indentLine_indentLevel + 1, space) + execute 'syntax match IndentLine /\%(^\s\+\)\@<=\%'.i.pattern.' / containedin=ALL conceal cchar=' . g:indentLine_char + endfor + endif +endfunction + +"{{{1 function! s:ResetWidth(...) +function! s:ResetWidth(...) + if 0 < a:0 + let &l:shiftwidth = a:1 + endif + + if exists("b:indentLine_enabled") + syntax clear IndentLine + endif + call s:SetIndentLine() +endfunction + +"{{{1 function! s:IndentLinesToggle() +function! s:IndentLinesToggle() + if ! exists("b:indentLine_enabled") + let b:indentLine_enabled = 0 + endif + + if b:indentLine_enabled + let b:indentLine_enabled = 0 + syntax clear IndentLine + else + call s:SetIndentLine() + endif +endfunction + +"{{{1 function! s:Setup() +function! s:Setup() + if index(g:indentLine_fileTypeExclude, &filetype) isnot -1 + return + endif + + if len(g:indentLine_fileType) isnot 0 && index(g:indentLine_fileType, &filetype) is -1 + return + end + + for name in g:indentLine_bufNameExclude + if matchstr(bufname(''), name) is bufname('') + return + endif + endfor + + if ! exists("b:indentLine_bufNr") + let b:indentLine_bufNr = bufnr('%') + let g:indentLine_bufNr = bufnr('%') + elseif g:indentLine_bufNr != bufnr('%') && &hidden + let g:indentLine_bufNr = bufnr('%') + return + endif + + if ! exists("g:indentLine_noConcealCursor") + setlocal concealcursor=inc + endif + setlocal conceallevel=2 + + if &filetype is# "" + call s:InitColor() + endif + + if ! exists("b:indentLine_enabled") + let b:indentLine_enabled = g:indentLine_enabled + endif + + if b:indentLine_enabled + call s:SetIndentLine() + endif +endfunction + +"{{{1 augroup indentLine +augroup indentLine + autocmd! + autocmd BufWinEnter * call <SID>Setup() + autocmd BufRead,BufNewFile,ColorScheme * call <SID>InitColor() +augroup END + +"{{{1 commands +command! -nargs=? IndentLinesReset call <SID>ResetWidth(<f-args>) +command! IndentLinesToggle call <SID>IndentLinesToggle() + +" vim:et:ts=4:sw=4:fdm=marker:fmr={{{,}}} + diff --git a/.vim/bundle/indentLine/doc/indentLine.txt b/.vim/bundle/indentLine/doc/indentLine.txt new file mode 100644 index 0000000..82db783 --- /dev/null +++ b/.vim/bundle/indentLine/doc/indentLine.txt @@ -0,0 +1,143 @@ +*indentLine.txt* Show vertical lines for indent with conceal feature + +CONTENTS *indentLine-contents* +Introduction |indentLine-introduction| +Config |indentLine-config| +Variables |indentLine-variables| +Commands |indentLine-commands| +FAQ |indentLine-faq| +Changelog |indentLine-changelog| +Credits |indentLine-credits| +============================================================================== +INTRODUCTION *indentLine-introduction* +This plugin is used for displaying thin vertical lines at each indentation +level for code indented with spaces. For code indented with tabs, I think +there is no need to support it, using :set list lcs=tab:\|\ (here is a space) +can achieve it. +============================================================================== +CONFIG *indentLine-config* + +============================================================================== +VARIABLES *indentLine-variables* + +g:indentLine_loaded *g:loaded_indentLine* + Whether load indentLine plugin. + Default value is 0. + +g:indentLine_char *g:indentLine_char* + Specify a character to be used as indent line. + You also can use other characters: + | ¦ ┆ │ + Default value is "|". + +g:indentLine_first_char *g:indentLine_first_char* + Specify a character to be used as indent line + on the first level. + You also can use other characters: + | ¦ ┆ │ + Default value is "|". + +g:indentLine_color_term *g:indentLine_color_term* + Specify terminal vim indent line color. + e.g. let g:indentLine_color_term = 239 + + +g:indentLine_color_gui *g:indentLine_color_gui* + Specify GUI vim indent line color. + e.g. let g:indentLine_color_gui = '#A4E57E' + +g:indentLine_color_tty_light *g:indentLine_color_tty_light* + Specify none X terminal vim indent line color in bg light. + default: 4 + e.g. let g:indentLine_color_tty_light = 7 + +g:indentLine_color_tty_dark *g:indentLine_color_tty_dark* + Specify none X terminal vim indent line color in bg dark. + default: 2 + e.g. let g:indentLine_color_tty_dark = 1 + +g:indentLine_indentLevel *g:indentLine_indentLevel* + Specify how much indent level do you want to use for + indentLine. Most program will not has bigger indent level than + 10. + Default value is 10. + +g:indentLine_showFirstIndentLevel *g:indentLine_showFirstIndentLevel* + Specify whether the first indent level should be shown. + This is useful if you use indentLine in comination with + |listchars| in order to show tabs. + Default value is 0. + +g:indentLine_enabled *g:indentLine_enabled* + Specify whether to enable indentLine plugin by default. + If value is not 0, the plugin is on by default, otherwise off. + Default value is 1. + +g:indentLine_fileType *g:indentLine_fileType* + This variable specify a list of file types. + When opening these types of files, the plugin is enabled by + default. + e.g. let g:indentLine_fileType = ['c', 'cpp'] + Default value is [] which means all file types is supported. + +g:indentLine_fileTypeExclude *g:indentLine_fileTypeExclude* + This variable specify a list of file types. + When opening these types of files, the plugin is disabled by + default. + e.g. let g:indentLine_fileTypeExclude = ['text', 'sh'] + Default value is [] which means no file types is excluded. + +g:indentLine_bufNameExclude *g:indentLine_bufNameExclude* + This variable specify a list of buffer names, which can be + regular expression. If the buffer's name fall into this list, + the indentLine won't display. + e.g. let g:indentLine_bufNameExclude = ['_.*', 'NERD_tree.*'] + Default value is []. + +g:indentLine_maxLines *g:indentLine_maxLines* + This variable specify a number, when the number of buffer's + lines exceed it, the plugin try to use another pattern to make + the performance better. + Default value is 3000. + +g:indentLine_faster *g:indentLine_faster* + If you want the performance better, you can set the value as + 1, default value is 0. But better performance may bring little + issue with it. + +g:indentLine_noConcealCursor *g:indentLine_noConcealCursor* + This variable toggles cursor lines behavior. If variable + exists, then cursorline will be above conceal chars. + Default value is not set. + +============================================================================== +COMMANDS *indentLine-commands* + +IndentLinesReset [number] + if 'shiftwidth' changes, using this command can redraw the + indentLines. number is optional, it means the width between + two indent level, if ommited, value of 'shiftwidth' is used. + +IndentLinesToggle + toggle the indent lines of the current buffer. +============================================================================== +FAQ *indentLine-faq* + +Q. How can I make the indent line visuall similar to the line used in Sublime + Text 2? + +A. Use let g:indentLine_char = '┊' + +============================================================================== +CHANGELOG *indentLine-changelog* + +============================================================================== +CREDITS *indentLine-credits* + +Thanks to the following people for suggestions and patches: + +NagatoPain +Salman Halim +Christophe +============================================================================== +vim:tw=78:ts=8:ft=help:norl |