.vim: Dammit
Forgot to trim .git information from plugins
This commit is contained in:
parent
85b63b8319
commit
58b1e98578
@ -1 +0,0 @@
|
|||||||
Subproject commit 96f0b0c69e11f4d3aa480b6a6b1396b100815ace
|
|
117
.vim/bundle/gruvbox/CHANGELOG.md
Normal file
117
.vim/bundle/gruvbox/CHANGELOG.md
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
# Change Log
|
||||||
|
|
||||||
|
## [Unreleased](https://github.com/morhetz/gruvbox/tree/HEAD)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/morhetz/gruvbox/compare/v1.3.5...HEAD)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Lighter background on terminal [\#8](https://github.com/morhetz/gruvbox/issues/8)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Installation issue. [\#54](https://github.com/morhetz/gruvbox/issues/54)
|
||||||
|
|
||||||
|
- Italic font in terminal\(urxvt\) [\#49](https://github.com/morhetz/gruvbox/issues/49)
|
||||||
|
|
||||||
|
- Unable to log in when sourcing the palette shellscript [\#48](https://github.com/morhetz/gruvbox/issues/48)
|
||||||
|
|
||||||
|
- How can i modify multiple comment scheme [\#46](https://github.com/morhetz/gruvbox/issues/46)
|
||||||
|
|
||||||
|
- Remove comment highlight in iterm [\#44](https://github.com/morhetz/gruvbox/issues/44)
|
||||||
|
|
||||||
|
- Comments looking strange withing tmux [\#43](https://github.com/morhetz/gruvbox/issues/43)
|
||||||
|
|
||||||
|
- comments are reverse-video in xterm [\#41](https://github.com/morhetz/gruvbox/issues/41)
|
||||||
|
|
||||||
|
- What font are you using in the screenshots? [\#39](https://github.com/morhetz/gruvbox/issues/39)
|
||||||
|
|
||||||
|
- vim-signature crashes when I use gruvbox [\#38](https://github.com/morhetz/gruvbox/issues/38)
|
||||||
|
|
||||||
|
- Color of statusbar in inactive windows [\#37](https://github.com/morhetz/gruvbox/issues/37)
|
||||||
|
|
||||||
|
- Go method and struct highlighting missing [\#36](https://github.com/morhetz/gruvbox/issues/36)
|
||||||
|
|
||||||
|
- gruvbox\_256palette.sh doesn't work for Konsole [\#35](https://github.com/morhetz/gruvbox/issues/35)
|
||||||
|
|
||||||
|
- Contrast in jekyll markdown files [\#33](https://github.com/morhetz/gruvbox/issues/33)
|
||||||
|
|
||||||
|
- Pentadactyl Gruvbox Theme [\#32](https://github.com/morhetz/gruvbox/issues/32)
|
||||||
|
|
||||||
|
- make vertsplit better [\#31](https://github.com/morhetz/gruvbox/issues/31)
|
||||||
|
|
||||||
|
- Console support. [\#30](https://github.com/morhetz/gruvbox/issues/30)
|
||||||
|
|
||||||
|
- How can I change the background color? [\#29](https://github.com/morhetz/gruvbox/issues/29)
|
||||||
|
|
||||||
|
- Some words are not bold [\#28](https://github.com/morhetz/gruvbox/issues/28)
|
||||||
|
|
||||||
|
- Terminal theme on base gruvbox [\#25](https://github.com/morhetz/gruvbox/issues/25)
|
||||||
|
|
||||||
|
- Markdown has inverted colors when using \* [\#24](https://github.com/morhetz/gruvbox/issues/24)
|
||||||
|
|
||||||
|
- how install it on mac osx [\#23](https://github.com/morhetz/gruvbox/issues/23)
|
||||||
|
|
||||||
|
- Comments color for Terminal Vim [\#22](https://github.com/morhetz/gruvbox/issues/22)
|
||||||
|
|
||||||
|
- Move palette files to gruvbox-generalized [\#20](https://github.com/morhetz/gruvbox/issues/20)
|
||||||
|
|
||||||
|
- Maybe add Gruvbox Airline theme? [\#19](https://github.com/morhetz/gruvbox/issues/19)
|
||||||
|
|
||||||
|
- For Sublime text [\#18](https://github.com/morhetz/gruvbox/issues/18)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix the 256 palette script failed login issue [\#53](https://github.com/morhetz/gruvbox/pull/53) ([jonasmalacofilho](https://github.com/jonasmalacofilho))
|
||||||
|
|
||||||
|
- add minimal coloring for gitcommit highlighting [\#52](https://github.com/morhetz/gruvbox/pull/52) ([daniely](https://github.com/daniely))
|
||||||
|
|
||||||
|
- For terminals, turn off italics by default. [\#47](https://github.com/morhetz/gruvbox/pull/47) ([ryanmjacobs](https://github.com/ryanmjacobs))
|
||||||
|
|
||||||
|
- Change color of vertical/horizontal seperators between split windows [\#45](https://github.com/morhetz/gruvbox/pull/45) ([deshtop](https://github.com/deshtop))
|
||||||
|
|
||||||
|
- Improve gruvbox with C code [\#34](https://github.com/morhetz/gruvbox/pull/34) ([gladiac](https://github.com/gladiac))
|
||||||
|
|
||||||
|
- Fix for linux console [\#27](https://github.com/morhetz/gruvbox/pull/27) ([vyp](https://github.com/vyp))
|
||||||
|
|
||||||
|
- Colors for plugin vimshell.vim [\#21](https://github.com/morhetz/gruvbox/pull/21) ([joelmo](https://github.com/joelmo))
|
||||||
|
|
||||||
|
## [v1.3.5](https://github.com/morhetz/gruvbox/tree/v1.3.5) (2014-03-19)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/morhetz/gruvbox/compare/v0.0.8...v1.3.5)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Better selection colors [\#15](https://github.com/morhetz/gruvbox/issues/15)
|
||||||
|
|
||||||
|
- When hlsearch is on, the cursor inverts the search color and not visible [\#2](https://github.com/morhetz/gruvbox/issues/2)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- Problem with changing between dark and light on 256 color terminal [\#7](https://github.com/morhetz/gruvbox/issues/7)
|
||||||
|
|
||||||
|
- IndentGuides coloring doesn't show up [\#1](https://github.com/morhetz/gruvbox/issues/1)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Requesting rxvt-unicode theme [\#17](https://github.com/morhetz/gruvbox/issues/17)
|
||||||
|
|
||||||
|
- gruvbox\_256palette.sh gets reset \(gnome-terminal on Ubuntu\) [\#13](https://github.com/morhetz/gruvbox/issues/13)
|
||||||
|
|
||||||
|
- Powerline colors [\#12](https://github.com/morhetz/gruvbox/issues/12)
|
||||||
|
|
||||||
|
- Info necessary for making a port of this colorscheme [\#10](https://github.com/morhetz/gruvbox/issues/10)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fix GNU screen detection for \*-bce [\#16](https://github.com/morhetz/gruvbox/pull/16) ([blueyed](https://github.com/blueyed))
|
||||||
|
|
||||||
|
- Added iTerm2 dark theme [\#11](https://github.com/morhetz/gruvbox/pull/11) ([Greduan](https://github.com/Greduan))
|
||||||
|
|
||||||
|
- Fix typo in Readme [\#5](https://github.com/morhetz/gruvbox/pull/5) ([ViViDboarder](https://github.com/ViViDboarder))
|
||||||
|
|
||||||
|
## [v0.0.8](https://github.com/morhetz/gruvbox/tree/v0.0.8) (2012-12-08)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
113
.vim/bundle/gruvbox/README.md
Normal file
113
.vim/bundle/gruvbox/README.md
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
<p align="center"><img src="http://imgh.us/gruvbox_logo.svg"></p>
|
||||||
|
|
||||||
|
gruvbox is heavily inspired by [badwolf][], [jellybeans][] and [solarized][].
|
||||||
|
|
||||||
|
Designed as a bright theme with pastel 'retro groove' colors and light/dark mode switching in the way of [solarized][]. The main focus when developing gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes.
|
||||||
|
|
||||||
|
[badwolf]: https://github.com/sjl/badwolf
|
||||||
|
[jellybeans]: https://github.com/nanotech/jellybeans.vim
|
||||||
|
[solarized]: http://ethanschoonover.com/solarized
|
||||||
|
|
||||||
|
Attention
|
||||||
|
---------
|
||||||
|
|
||||||
|
1. [Read this first](https://github.com/morhetz/gruvbox/wiki/Terminal-specific)
|
||||||
|
2. Typeface from gallery is [Fantasque Sans Mono](https://github.com/belluzj/fantasque-sans)
|
||||||
|
3. Typeface from screenshots below is [Fira Mono](http://www.carrois.com/fira-4-1/)
|
||||||
|
|
||||||
|
Screenshots
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Refer [Gallery][] for more syntax-specific screenshots.
|
||||||
|
|
||||||
|
[Gallery]: https://github.com/morhetz/gruvbox/wiki/Gallery
|
||||||
|
|
||||||
|
### Dark mode
|
||||||
|
|
||||||
|
![Screenshot Dark](http://i.imgur.com/GkIl8Fn.png)
|
||||||
|
|
||||||
|
### Light mode
|
||||||
|
|
||||||
|
![Screenshot Light](http://i.imgur.com/X75niEa.png)
|
||||||
|
|
||||||
|
### Airline theme
|
||||||
|
|
||||||
|
![Screenshot Airline](http://i.imgur.com/wRQceUR.png)
|
||||||
|
|
||||||
|
Palette
|
||||||
|
-------
|
||||||
|
|
||||||
|
### Dark mode
|
||||||
|
|
||||||
|
![Palette Dark](http://i.imgur.com/wa666xg.png)
|
||||||
|
|
||||||
|
### Light mode
|
||||||
|
|
||||||
|
![Palette Light](http://i.imgur.com/49qKyYW.png)
|
||||||
|
|
||||||
|
Contrast options
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Refer [wiki section][] for contrast configuration and other options.
|
||||||
|
|
||||||
|
[wiki section]: https://github.com/morhetz/gruvbox/wiki/Configuration#ggruvbox_contrast_dark
|
||||||
|
|
||||||
|
![Contrast Options](http://i.imgur.com/5MSbe6T.png)
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Please check [wiki][] for installation details, terminal-specific setup, troubleshooting, configuration options and others.
|
||||||
|
|
||||||
|
[wiki]: https://github.com/morhetz/gruvbox/wiki
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
* Lots of style-customization options (contrast, color invertion, italics usage etc.)
|
||||||
|
* Extended filetype highlighting: Html, Xml, Vim, Clojure, C, Python, JavaScript, TypeScript, PureScript, CoffeeScript, Ruby, Objective-C, Go, Lua, MoonScript, Java, Markdown, Haskell, Elixir
|
||||||
|
* Supported plugins: [EasyMotion][], [vim-sneak][], [Indent Guides][], [indentLine][], [Rainbow Parentheses][], [Airline][], [Lightline][], [GitGutter][], [Signify][], [ShowMarks][], [Signature][], [Syntastic][], [Ale][], [CtrlP][], [Startify][], [NERDTree][], [Dirvish][]
|
||||||
|
|
||||||
|
[EasyMotion]: https://github.com/Lokaltog/vim-easymotion
|
||||||
|
[vim-sneak]: https://github.com/justinmk/vim-sneak
|
||||||
|
[Indent Guides]: https://github.com/nathanaelkane/vim-indent-guides
|
||||||
|
[indentLine]: https://github.com/Yggdroot/indentLine
|
||||||
|
[Rainbow Parentheses]: https://github.com/kien/rainbow_parentheses.vim
|
||||||
|
[Airline]: https://github.com/bling/vim-airline
|
||||||
|
[Lightline]: https://github.com/itchyny/lightline.vim
|
||||||
|
[GitGutter]: https://github.com/airblade/vim-gitgutter
|
||||||
|
[Signify]: https://github.com/mhinz/vim-signify
|
||||||
|
[ShowMarks]: http://www.vim.org/scripts/script.php?script_id=152
|
||||||
|
[Signature]: https://github.com/kshenoy/vim-signature
|
||||||
|
[Syntastic]: https://github.com/scrooloose/syntastic
|
||||||
|
[Ale]: https://github.com/w0rp/ale
|
||||||
|
[CtrlP]: https://github.com/kien/ctrlp.vim
|
||||||
|
[Startify]: https://github.com/mhinz/vim-startify
|
||||||
|
[NERDTree]: https://github.com/scrooloose/nerdtree
|
||||||
|
[Dirvish]: https://github.com/justinmk/vim-dirvish
|
||||||
|
|
||||||
|
Contributions
|
||||||
|
-------------
|
||||||
|
|
||||||
|
See [gruvbox-contrib][] repo for contributions, ports and extras.
|
||||||
|
|
||||||
|
[gruvbox-contrib]: https://github.com/morhetz/gruvbox-contrib
|
||||||
|
|
||||||
|
ToDo
|
||||||
|
----
|
||||||
|
|
||||||
|
* Filetype syntax highlighting (R, TeX, Swift, Erlang)
|
||||||
|
* Plugin support (Tagbar, VimPlug)
|
||||||
|
|
||||||
|
Self-Promotion
|
||||||
|
--------------
|
||||||
|
|
||||||
|
If you like gruvbox follow the repository on
|
||||||
|
[GitHub](https://github.com/morhetz/gruvbox) and vote for it on
|
||||||
|
[vim.org](http://www.vim.org/scripts/script.php?script_id=4349).
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
[MIT/X11][]
|
||||||
|
|
||||||
|
[MIT/X11]: https://en.wikipedia.org/wiki/MIT_License
|
79
.vim/bundle/gruvbox/autoload/airline/themes/gruvbox.vim
Normal file
79
.vim/bundle/gruvbox/autoload/airline/themes/gruvbox.vim
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" File: gruvbox.vim
|
||||||
|
" Description: Retro groove color scheme for Airline
|
||||||
|
" Author: morhetz <morhetz@gmail.com>
|
||||||
|
" Source: https://github.com/morhetz/gruvbox
|
||||||
|
" Last Modified: 12 Aug 2017
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
let g:airline#themes#gruvbox#palette = {}
|
||||||
|
|
||||||
|
function! airline#themes#gruvbox#refresh()
|
||||||
|
|
||||||
|
let M0 = airline#themes#get_highlight('Identifier')
|
||||||
|
let accents_group = airline#themes#get_highlight('Special')
|
||||||
|
let modified_group = [M0[0], '', M0[2], '', '']
|
||||||
|
let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
|
||||||
|
let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg'])
|
||||||
|
|
||||||
|
let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg'])
|
||||||
|
let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['Pmenu', 'bg'])
|
||||||
|
let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg'])
|
||||||
|
let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
||||||
|
let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group }
|
||||||
|
let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group
|
||||||
|
let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group
|
||||||
|
let g:airline#themes#gruvbox#palette.normal.airline_error = error_group
|
||||||
|
let g:airline#themes#gruvbox#palette.normal_modified.airline_error = error_group
|
||||||
|
|
||||||
|
let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg'])
|
||||||
|
let s:I2 = s:N2
|
||||||
|
let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['Pmenu', 'bg'])
|
||||||
|
let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
||||||
|
let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified
|
||||||
|
let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
||||||
|
let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
||||||
|
let g:airline#themes#gruvbox#palette.insert.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
|
||||||
|
let g:airline#themes#gruvbox#palette.insert_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
|
||||||
|
|
||||||
|
let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg'])
|
||||||
|
let s:R2 = s:I2
|
||||||
|
let s:R3 = s:I3
|
||||||
|
let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
|
||||||
|
let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified
|
||||||
|
let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
||||||
|
let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
||||||
|
let g:airline#themes#gruvbox#palette.replace.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
|
||||||
|
let g:airline#themes#gruvbox#palette.replace_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
|
||||||
|
|
||||||
|
let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
|
||||||
|
let s:V2 = s:N2
|
||||||
|
let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg'])
|
||||||
|
let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
||||||
|
let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] }
|
||||||
|
let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
|
||||||
|
let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
|
||||||
|
let g:airline#themes#gruvbox#palette.visual.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
|
||||||
|
let g:airline#themes#gruvbox#palette.visual_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
|
||||||
|
|
||||||
|
let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg'])
|
||||||
|
let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
|
||||||
|
let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group }
|
||||||
|
|
||||||
|
let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group }
|
||||||
|
|
||||||
|
let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg'])
|
||||||
|
let g:airline#themes#gruvbox#palette.tabline = {
|
||||||
|
\ 'airline_tab': s:N2,
|
||||||
|
\ 'airline_tabsel': s:N1,
|
||||||
|
\ 'airline_tabtype': s:V1,
|
||||||
|
\ 'airline_tabfill': s:TF,
|
||||||
|
\ 'airline_tabhid': s:IA,
|
||||||
|
\ 'airline_tabmod': s:I1
|
||||||
|
\ }
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call airline#themes#gruvbox#refresh()
|
||||||
|
|
||||||
|
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:
|
41
.vim/bundle/gruvbox/autoload/gruvbox.vim
Normal file
41
.vim/bundle/gruvbox/autoload/gruvbox.vim
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" File: gruvbox.vim
|
||||||
|
" Description: Retro groove color scheme for Vim
|
||||||
|
" Author: morhetz <morhetz@gmail.com>
|
||||||
|
" Source: https://github.com/morhetz/gruvbox
|
||||||
|
" Last Modified: 09 Apr 2014
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function! gruvbox#invert_signs_toggle()
|
||||||
|
if g:gruvbox_invert_signs == 0
|
||||||
|
let g:gruvbox_invert_signs=1
|
||||||
|
else
|
||||||
|
let g:gruvbox_invert_signs=0
|
||||||
|
endif
|
||||||
|
|
||||||
|
colorscheme gruvbox
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Search Highlighting {{{
|
||||||
|
|
||||||
|
function! gruvbox#hls_show()
|
||||||
|
set hlsearch
|
||||||
|
call GruvboxHlsShowCursor()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! gruvbox#hls_hide()
|
||||||
|
set nohlsearch
|
||||||
|
call GruvboxHlsHideCursor()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! gruvbox#hls_toggle()
|
||||||
|
if &hlsearch
|
||||||
|
call gruvbox#hls_hide()
|
||||||
|
else
|
||||||
|
call gruvbox#hls_show()
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:
|
@ -0,0 +1,53 @@
|
|||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" File: gruvbox.vim
|
||||||
|
" Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim)
|
||||||
|
" Author: gmoe <me@griffinmoe.com>
|
||||||
|
" Source: https://github.com/morhetz/gruvbox
|
||||||
|
" Last Modified: 31 Oct 2015
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function! s:getGruvColor(group)
|
||||||
|
let guiColor = synIDattr(hlID(a:group), "fg", "gui")
|
||||||
|
let termColor = synIDattr(hlID(a:group), "fg", "cterm")
|
||||||
|
return [ guiColor, termColor ]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
if exists('g:lightline')
|
||||||
|
|
||||||
|
let s:bg0 = s:getGruvColor('GruvboxBg0')
|
||||||
|
let s:bg1 = s:getGruvColor('GruvboxBg1')
|
||||||
|
let s:bg2 = s:getGruvColor('GruvboxBg2')
|
||||||
|
let s:bg4 = s:getGruvColor('GruvboxBg4')
|
||||||
|
let s:fg1 = s:getGruvColor('GruvboxFg1')
|
||||||
|
let s:fg4 = s:getGruvColor('GruvboxFg4')
|
||||||
|
|
||||||
|
let s:yellow = s:getGruvColor('GruvboxYellow')
|
||||||
|
let s:blue = s:getGruvColor('GruvboxBlue')
|
||||||
|
let s:aqua = s:getGruvColor('GruvboxAqua')
|
||||||
|
let s:orange = s:getGruvColor('GruvboxOrange')
|
||||||
|
|
||||||
|
let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}}
|
||||||
|
let s:p.normal.left = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ]
|
||||||
|
let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ]
|
||||||
|
let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ]
|
||||||
|
let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ]
|
||||||
|
let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ]
|
||||||
|
let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ]
|
||||||
|
let s:p.insert.left = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ]
|
||||||
|
let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ]
|
||||||
|
let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ]
|
||||||
|
let s:p.replace.left = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ]
|
||||||
|
let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ]
|
||||||
|
let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ]
|
||||||
|
let s:p.visual.left = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ]
|
||||||
|
let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ]
|
||||||
|
let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ]
|
||||||
|
let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ]
|
||||||
|
let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ]
|
||||||
|
let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ]
|
||||||
|
let s:p.tabline.right = [ [ s:bg0, s:orange ] ]
|
||||||
|
let s:p.normal.error = [ [ s:bg0, s:orange ] ]
|
||||||
|
let s:p.normal.warning = [ [ s:bg2, s:yellow ] ]
|
||||||
|
|
||||||
|
let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p)
|
||||||
|
endif
|
1393
.vim/bundle/gruvbox/colors/gruvbox.vim
Normal file
1393
.vim/bundle/gruvbox/colors/gruvbox.vim
Normal file
File diff suppressed because it is too large
Load Diff
118
.vim/bundle/gruvbox/gruvbox_256palette.sh
Executable file
118
.vim/bundle/gruvbox/gruvbox_256palette.sh
Executable file
@ -0,0 +1,118 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "${TERM%%-*}" = "screen" ]; then
|
||||||
|
if [ -n "$TMUX" ]; then
|
||||||
|
printf "\033Ptmux;\033\033]4;236;rgb:32/30/2f\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;234;rgb:1d/20/21\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;235;rgb:28/28/28\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;237;rgb:3c/38/36\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;239;rgb:50/49/45\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;241;rgb:66/5c/54\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;243;rgb:7c/6f/64\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;244;rgb:92/83/74\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;245;rgb:92/83/74\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;228;rgb:f2/e5/bc\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;230;rgb:f9/f5/d7\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;229;rgb:fb/f1/c7\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;223;rgb:eb/db/b2\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;250;rgb:d5/c4/a1\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;248;rgb:bd/ae/93\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;246;rgb:a8/99/84\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;167;rgb:fb/49/34\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;142;rgb:b8/bb/26\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;214;rgb:fa/bd/2f\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;109;rgb:83/a5/98\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;175;rgb:d3/86/9b\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;108;rgb:8e/c0/7c\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;208;rgb:fe/80/19\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;88;rgb:9d/00/06\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;100;rgb:79/74/0e\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;136;rgb:b5/76/14\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;24;rgb:07/66/78\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;96;rgb:8f/3f/71\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;66;rgb:42/7b/58\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;130;rgb:af/3a/03\007\033\\"
|
||||||
|
else
|
||||||
|
printf "\033P\033]4;236;rgb:32/30/2f\007\033\\"
|
||||||
|
printf "\033P\033]4;234;rgb:1d/20/21\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;235;rgb:28/28/28\007\033\\"
|
||||||
|
printf "\033P\033]4;237;rgb:3c/38/36\007\033\\"
|
||||||
|
printf "\033P\033]4;239;rgb:50/49/45\007\033\\"
|
||||||
|
printf "\033P\033]4;241;rgb:66/5c/54\007\033\\"
|
||||||
|
printf "\033P\033]4;243;rgb:7c/6f/64\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;244;rgb:92/83/74\007\033\\"
|
||||||
|
printf "\033P\033]4;245;rgb:92/83/74\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;228;rgb:f2/e5/bc\007\033\\"
|
||||||
|
printf "\033P\033]4;230;rgb:f9/f5/d7\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;229;rgb:fb/f1/c7\007\033\\"
|
||||||
|
printf "\033P\033]4;223;rgb:eb/db/b2\007\033\\"
|
||||||
|
printf "\033P\033]4;250;rgb:d5/c4/a1\007\033\\"
|
||||||
|
printf "\033P\033]4;248;rgb:bd/ae/93\007\033\\"
|
||||||
|
printf "\033P\033]4;246;rgb:a8/99/84\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;167;rgb:fb/49/34\007\033\\"
|
||||||
|
printf "\033P\033]4;142;rgb:b8/bb/26\007\033\\"
|
||||||
|
printf "\033P\033]4;214;rgb:fa/bd/2f\007\033\\"
|
||||||
|
printf "\033P\033]4;109;rgb:83/a5/98\007\033\\"
|
||||||
|
printf "\033P\033]4;175;rgb:d3/86/9b\007\033\\"
|
||||||
|
printf "\033P\033]4;108;rgb:8e/c0/7c\007\033\\"
|
||||||
|
printf "\033P\033]4;208;rgb:fe/80/19\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;88;rgb:9d/00/06\007\033\\"
|
||||||
|
printf "\033P\033]4;100;rgb:79/74/0e\007\033\\"
|
||||||
|
printf "\033P\033]4;136;rgb:b5/76/14\007\033\\"
|
||||||
|
printf "\033P\033]4;24;rgb:07/66/78\007\033\\"
|
||||||
|
printf "\033P\033]4;96;rgb:8f/3f/71\007\033\\"
|
||||||
|
printf "\033P\033]4;66;rgb:42/7b/58\007\033\\"
|
||||||
|
printf "\033P\033]4;130;rgb:af/3a/03\007\033\\"
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ "$TERM" != "linux" ] && [ "$TERM" != "vt100" ] && [ "$TERM" != "vt220" ]; then
|
||||||
|
|
||||||
|
printf "\033]4;236;rgb:32/30/2f\033\\"
|
||||||
|
printf "\033]4;234;rgb:1d/20/21\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;235;rgb:28/28/28\033\\"
|
||||||
|
printf "\033]4;237;rgb:3c/38/36\033\\"
|
||||||
|
printf "\033]4;239;rgb:50/49/45\033\\"
|
||||||
|
printf "\033]4;241;rgb:66/5c/54\033\\"
|
||||||
|
printf "\033]4;243;rgb:7c/6f/64\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;244;rgb:92/83/74\033\\"
|
||||||
|
printf "\033]4;245;rgb:92/83/74\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;228;rgb:f2/e5/bc\033\\"
|
||||||
|
printf "\033]4;230;rgb:f9/f5/d7\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;229;rgb:fb/f1/c7\033\\"
|
||||||
|
printf "\033]4;223;rgb:eb/db/b2\033\\"
|
||||||
|
printf "\033]4;250;rgb:d5/c4/a1\033\\"
|
||||||
|
printf "\033]4;248;rgb:bd/ae/93\033\\"
|
||||||
|
printf "\033]4;246;rgb:a8/99/84\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;167;rgb:fb/49/34\033\\"
|
||||||
|
printf "\033]4;142;rgb:b8/bb/26\033\\"
|
||||||
|
printf "\033]4;214;rgb:fa/bd/2f\033\\"
|
||||||
|
printf "\033]4;109;rgb:83/a5/98\033\\"
|
||||||
|
printf "\033]4;175;rgb:d3/86/9b\033\\"
|
||||||
|
printf "\033]4;108;rgb:8e/c0/7c\033\\"
|
||||||
|
printf "\033]4;208;rgb:fe/80/19\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;88;rgb:9d/00/06\033\\"
|
||||||
|
printf "\033]4;100;rgb:79/74/0e\033\\"
|
||||||
|
printf "\033]4;136;rgb:b5/76/14\033\\"
|
||||||
|
printf "\033]4;24;rgb:07/66/78\033\\"
|
||||||
|
printf "\033]4;96;rgb:8f/3f/71\033\\"
|
||||||
|
printf "\033]4;66;rgb:42/7b/58\033\\"
|
||||||
|
printf "\033]4;130;rgb:af/3a/03\033\\"
|
||||||
|
fi
|
116
.vim/bundle/gruvbox/gruvbox_256palette_osx.sh
Executable file
116
.vim/bundle/gruvbox/gruvbox_256palette_osx.sh
Executable file
@ -0,0 +1,116 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "${TERM%%-*}" = "screen" ]; then
|
||||||
|
if [ -n "$TMUX" ]; then
|
||||||
|
printf "\033Ptmux;\033\033]4;236;rgb:26/24/23\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;234;rgb:16/18/19\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;235;rgb:1e/1e/1e\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;237;rgb:2e/2a/29\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;239;rgb:3f/39/35\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;241;rgb:53/4a/42\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;243;rgb:68/5c/51\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;244;rgb:7f/70/61\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;245;rgb:7f/70/61\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;228;rgb:ef/df/ae\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;230;rgb:f8/f4/cd\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;229;rgb:fa/ee/bb\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;223;rgb:e6/d4/a3\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;250;rgb:cb/b8/90\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;248;rgb:af/9f/81\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;246;rgb:97/87/71\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;167;rgb:f7/30/28\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;142;rgb:aa/b0/1e\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;214;rgb:f7/b1/25\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;109;rgb:71/95/86\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;175;rgb:c7/70/89\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;108;rgb:7d/b6/69\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;208;rgb:fb/6a/16\007\033\\"
|
||||||
|
|
||||||
|
printf "\033Ptmux;\033\033]4;88;rgb:89/00/09\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;100;rgb:66/62/0d\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;136;rgb:a5/63/11\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;24;rgb:0e/53/65\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;96;rgb:7b/2b/5e\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;66;rgb:35/6a/46\007\033\\"
|
||||||
|
printf "\033Ptmux;\033\033]4;130;rgb:9d/28/07\007\033\\"
|
||||||
|
else
|
||||||
|
printf "\033P\033]4;236;rgb:26/24/23\007\033\\"
|
||||||
|
printf "\033P\033]4;234;rgb:16/18/19\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;235;rgb:1e/1e/1e\007\033\\"
|
||||||
|
printf "\033P\033]4;237;rgb:2e/2a/29\007\033\\"
|
||||||
|
printf "\033P\033]4;239;rgb:3f/39/35\007\033\\"
|
||||||
|
printf "\033P\033]4;241;rgb:53/4a/42\007\033\\"
|
||||||
|
printf "\033P\033]4;243;rgb:68/5c/51\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;244;rgb:7f/70/61\007\033\\"
|
||||||
|
printf "\033P\033]4;245;rgb:7f/70/61\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;228;rgb:ef/df/ae\007\033\\"
|
||||||
|
printf "\033P\033]4;230;rgb:f8/f4/cd\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;229;rgb:fa/ee/bb\007\033\\"
|
||||||
|
printf "\033P\033]4;223;rgb:e6/d4/a3\007\033\\"
|
||||||
|
printf "\033P\033]4;250;rgb:cb/b8/90\007\033\\"
|
||||||
|
printf "\033P\033]4;248;rgb:af/9f/81\007\033\\"
|
||||||
|
printf "\033P\033]4;246;rgb:97/87/71\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;167;rgb:f7/30/28\007\033\\"
|
||||||
|
printf "\033P\033]4;142;rgb:aa/b0/1e\007\033\\"
|
||||||
|
printf "\033P\033]4;214;rgb:f7/b1/25\007\033\\"
|
||||||
|
printf "\033P\033]4;109;rgb:71/95/86\007\033\\"
|
||||||
|
printf "\033P\033]4;175;rgb:c7/70/89\007\033\\"
|
||||||
|
printf "\033P\033]4;108;rgb:7d/b6/69\007\033\\"
|
||||||
|
printf "\033P\033]4;208;rgb:fb/6a/16\007\033\\"
|
||||||
|
|
||||||
|
printf "\033P\033]4;88;rgb:89/00/09\007\033\\"
|
||||||
|
printf "\033P\033]4;100;rgb:66/62/0d\007\033\\"
|
||||||
|
printf "\033P\033]4;136;rgb:a5/63/11\007\033\\"
|
||||||
|
printf "\033P\033]4;24;rgb:0e/53/65\007\033\\"
|
||||||
|
printf "\033P\033]4;96;rgb:7b/2b/5e\007\033\\"
|
||||||
|
printf "\033P\033]4;66;rgb:35/6a/46\007\033\\"
|
||||||
|
printf "\033P\033]4;130;rgb:9d/28/07\007\033\\"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
printf "\033]4;236;rgb:26/24/23\033\\"
|
||||||
|
printf "\033]4;234;rgb:16/18/19\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;235;rgb:1e/1e/1e\033\\"
|
||||||
|
printf "\033]4;237;rgb:2e/2a/29\033\\"
|
||||||
|
printf "\033]4;239;rgb:3f/39/35\033\\"
|
||||||
|
printf "\033]4;241;rgb:53/4a/42\033\\"
|
||||||
|
printf "\033]4;243;rgb:68/5c/51\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;244;rgb:7f/70/61\033\\"
|
||||||
|
printf "\033]4;245;rgb:7f/70/61\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;228;rgb:ef/df/ae\033\\"
|
||||||
|
printf "\033]4;230;rgb:f8/f4/cd\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;229;rgb:fa/ee/bb\033\\"
|
||||||
|
printf "\033]4;223;rgb:e6/d4/a3\033\\"
|
||||||
|
printf "\033]4;250;rgb:cb/b8/90\033\\"
|
||||||
|
printf "\033]4;248;rgb:af/9f/81\033\\"
|
||||||
|
printf "\033]4;246;rgb:97/87/71\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;167;rgb:f7/30/28\033\\"
|
||||||
|
printf "\033]4;142;rgb:aa/b0/1e\033\\"
|
||||||
|
printf "\033]4;214;rgb:f7/b1/25\033\\"
|
||||||
|
printf "\033]4;109;rgb:71/95/86\033\\"
|
||||||
|
printf "\033]4;175;rgb:c7/70/89\033\\"
|
||||||
|
printf "\033]4;108;rgb:7d/b6/69\033\\"
|
||||||
|
printf "\033]4;208;rgb:fb/6a/16\033\\"
|
||||||
|
|
||||||
|
printf "\033]4;88;rgb:89/00/09\033\\"
|
||||||
|
printf "\033]4;100;rgb:66/62/0d\033\\"
|
||||||
|
printf "\033]4;136;rgb:a5/63/11\033\\"
|
||||||
|
printf "\033]4;24;rgb:0e/53/65\033\\"
|
||||||
|
printf "\033]4;96;rgb:7b/2b/5e\033\\"
|
||||||
|
printf "\033]4;66;rgb:35/6a/46\033\\"
|
||||||
|
printf "\033]4;130;rgb:9d/28/07\033\\"
|
||||||
|
fi
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 3ce0257401562f2234cc7031073d09a69fba8911
|
|
73
.vim/bundle/vim-template/README.rst
Normal file
73
.vim/bundle/vim-template/README.rst
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
=============================
|
||||||
|
Simple Vim templates plugin
|
||||||
|
=============================
|
||||||
|
:Author: Adrian Perez <aperez@igalia.com>
|
||||||
|
|
||||||
|
This is a simple plugin for Vim that will allow you to have a set of
|
||||||
|
templates for certain file types. It is useful to add boilerplate code
|
||||||
|
like guards in C/C++ headers, or license disclaimers.
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
The easiest way to install the plugin is to install it as a bundle.
|
||||||
|
For example, using Pathogen__:
|
||||||
|
|
||||||
|
1. Get and install `pathogen.vim <https://github.com/tpope/vim-pathogen>`_. You can skip this step
|
||||||
|
if you already have it installed.
|
||||||
|
|
||||||
|
2. ``cd ~/.vim/bundle``
|
||||||
|
|
||||||
|
3. ``git clone git://github.com/aperezdc/vim-template.git``
|
||||||
|
|
||||||
|
__ https://github.com/tpope/vim-pathogen
|
||||||
|
|
||||||
|
Bundle installs are known to work fine also when using Vundle__. Other
|
||||||
|
bundle managers are expected to work as well.
|
||||||
|
|
||||||
|
__ https://github.com/gmarik/vundle
|
||||||
|
|
||||||
|
|
||||||
|
.. important:: If you use Fish__ as your shell, you *will* need to add
|
||||||
|
``set shell=/bin/sh`` to your ``~/.vimrc`` — the plugin relies on the
|
||||||
|
setting pointing to a Bourne-compatible__ shell.
|
||||||
|
|
||||||
|
__ http://fishshell.com/
|
||||||
|
__ https://en.wikipedia.org/wiki/Bourne_shell
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
=============
|
||||||
|
|
||||||
|
The documentation can be browsed directly in Vim::
|
||||||
|
|
||||||
|
:help template.txt
|
||||||
|
|
||||||
|
Alternatively, you can also `read it in your browser`__.
|
||||||
|
|
||||||
|
__ https://github.com/aperezdc/vim-template/blob/master/doc/template.txt
|
||||||
|
|
||||||
|
|
||||||
|
Updating
|
||||||
|
========
|
||||||
|
|
||||||
|
Manually
|
||||||
|
--------
|
||||||
|
|
||||||
|
In order to update the plugin, go to its bundle directory and use
|
||||||
|
Git to update it:
|
||||||
|
|
||||||
|
1. ``cd ~/.vim/bundle/vim-template``
|
||||||
|
|
||||||
|
2. ``git pull``
|
||||||
|
|
||||||
|
|
||||||
|
With Vundle
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Use the ``:BundleUpdate`` command provided by Vundle, for example invoking
|
||||||
|
Vim like this::
|
||||||
|
|
||||||
|
% vim +BundleUpdate
|
||||||
|
|
289
.vim/bundle/vim-template/doc/template.txt
Normal file
289
.vim/bundle/vim-template/doc/template.txt
Normal file
@ -0,0 +1,289 @@
|
|||||||
|
*template.txt* Simple templates plug-in
|
||||||
|
|
||||||
|
CONTENTS *template-contents*
|
||||||
|
|
||||||
|
Introduction |template-introduction|
|
||||||
|
Usage |template-usage|
|
||||||
|
Commands |template-commands|
|
||||||
|
Configuration |template-configuration|
|
||||||
|
Search order |template-search-order|
|
||||||
|
Variables |template-variables|
|
||||||
|
User Variables |template-user-variables|
|
||||||
|
Troubleshooting |template-troubleshooting|
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
INTRODUCTION *template-introduction*
|
||||||
|
|
||||||
|
This is a simple plug-in for Vim (and NeoVim) allowing to have template
|
||||||
|
files per file type, which will be used as starting point when creating
|
||||||
|
new buffers. Template files may contain variables (|template-variables|),
|
||||||
|
which are expanded at the time of buffer creation (see |template-usage|).
|
||||||
|
The main purpose of the templates is to add boilerplate code to new
|
||||||
|
files, like C/C++ header guards, or license disclaimers.
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
USAGE *template-usage*
|
||||||
|
|
||||||
|
Templates can be used by creating a new file name, the file suffix will
|
||||||
|
determine which template is used:
|
||||||
|
>
|
||||||
|
$ vim foo.c
|
||||||
|
<
|
||||||
|
Templates can be manually expanded in the current buffer using the
|
||||||
|
|:Template| command. For example, the following will load and expand the
|
||||||
|
template for a file matching the pattern `*.c`:
|
||||||
|
>
|
||||||
|
:Template *.c
|
||||||
|
<
|
||||||
|
|
||||||
|
Note that automatic insertion of templates can be disabling by setting
|
||||||
|
the `g:templates_no_autocmd` variable.
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
COMMANDS *template-commands*
|
||||||
|
|
||||||
|
The plug-in defines two commands, both of which expand a template in the
|
||||||
|
current buffer. The first expands a matched template at the beginning of
|
||||||
|
the current buffer. Its syntax is:
|
||||||
|
|
||||||
|
*:Template* <pattern>
|
||||||
|
|
||||||
|
The <pattern> must be the same as for the template file that is to be
|
||||||
|
expanded into the current buffer. For example:
|
||||||
|
>
|
||||||
|
:Template *.c
|
||||||
|
>
|
||||||
|
will expand the local template `.vim-template:*.c`, or the global template
|
||||||
|
`template:*.c`, whichever is found first (see |template-search-order|
|
||||||
|
for more information).
|
||||||
|
|
||||||
|
The second command works exactly the same except that it will expand a matched
|
||||||
|
template under the cursor instead of at the beginning of the buffer. Its syntax
|
||||||
|
is:
|
||||||
|
|
||||||
|
*:TemplateHere* <pattern>
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
CONFIGURATION *template-configuration*
|
||||||
|
|
||||||
|
The following variables can be used to configure the behaviour of the
|
||||||
|
plug-in:
|
||||||
|
|
||||||
|
`g:templates_no_autocmd`
|
||||||
|
Whether to disable automatic insertion of templates when new
|
||||||
|
buffers are created. (Default: `0`).
|
||||||
|
|
||||||
|
`g:templates_directory`
|
||||||
|
Path of a directory containing additional global templates.
|
||||||
|
Alternatively, it can contain a list of paths, which will
|
||||||
|
be searched in order. See |template-search-order| for more
|
||||||
|
details. (Default: `[]`).
|
||||||
|
|
||||||
|
`g:templates_name_prefix`
|
||||||
|
Prefix for path-relative templates. See |template-search-order|
|
||||||
|
for more details. (Default: `.vim-template:`).
|
||||||
|
|
||||||
|
`g:templates_global_name_prefix`
|
||||||
|
Prefix for global templates (builtin and those listed in
|
||||||
|
`g:templates_directory`, NOT path-relative templates). See
|
||||||
|
|template-search-order| for more details. (Default:
|
||||||
|
`=template=`).
|
||||||
|
|
||||||
|
`g:templates_fuzzy_start`
|
||||||
|
If non-zero, template patterns are not forced to match the
|
||||||
|
entire file name, just the end (`<pattern>$`). If zero, template
|
||||||
|
patterns need to consume the entire file name to procure a match
|
||||||
|
(`^<pattern>$`). For example, if `g:templates_fuzzy_start = 1`,
|
||||||
|
a file named `template:.c` would match files named `.c` and
|
||||||
|
`test.c`. If set to zero, the template would only match `.c`
|
||||||
|
(Default: `1`).
|
||||||
|
|
||||||
|
`g:templates_tr_in`, and `g:templates_tr_out`
|
||||||
|
These variables control how template names are interpreted as
|
||||||
|
regular expressions for matching file names. This can be
|
||||||
|
useful on a Windows box where `*` is not allowed in file
|
||||||
|
names. The default configuration converts underscores (`_`)
|
||||||
|
into regular expression wildcards (`.*`).
|
||||||
|
|
||||||
|
(Default: `['.','*','?']`, and `['\.','.*','\?']`).
|
||||||
|
|
||||||
|
`g:templates_no_builtin_templates`
|
||||||
|
If non-zero, disables usage of the built-in templates. See
|
||||||
|
|template-search-order| for more details. (Default: `0`).
|
||||||
|
|
||||||
|
`g:templates_user_variables`
|
||||||
|
Allows expansion of user-defined variables. See
|
||||||
|
|template-user-variables| for more details.
|
||||||
|
(Default: `[]`).
|
||||||
|
|
||||||
|
`g:templates_debug`
|
||||||
|
If non-zero, output debugging information. (Default: `0`).
|
||||||
|
|
||||||
|
`g:templates_plugin_loaded`
|
||||||
|
Setting this to a non-zero value will disable the plug-in.
|
||||||
|
(Default: `0`).
|
||||||
|
|
||||||
|
`g:templates_search_height`
|
||||||
|
Controls the search in the current directory and parents. If
|
||||||
|
set to -1, the template is searched for in the given
|
||||||
|
directory and all parents in its directory structure, stopping
|
||||||
|
at the first matching template. If set to 0, no searching
|
||||||
|
is done in the given directory or any parents. If set to [1]
|
||||||
|
only the given directory is searched. If greater
|
||||||
|
than one, n parents and the given directory will be searched
|
||||||
|
where n is equal to height - 1. (Default: `-1`).
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
SEARCH ORDER *template-search-order*
|
||||||
|
|
||||||
|
Searching for templates uses the following logic:
|
||||||
|
|
||||||
|
1. If a file named `.vim-template:<pattern>` exists in the current
|
||||||
|
directory, it is used. If there are multiple template files that match
|
||||||
|
pattern in the same directory, the one that is most specific is used.
|
||||||
|
If no suitable template is found, goto step `(2)`.
|
||||||
|
|
||||||
|
2. If a parent directory exists, it is set as current directory, and goto
|
||||||
|
step `(1)`; otherwise goto step `(3)`.
|
||||||
|
|
||||||
|
3. Try to use `=template=<pattern>` file from the directories specified using
|
||||||
|
the `g:templates_directory` variable (only if the option is defined,
|
||||||
|
and the directory exists).
|
||||||
|
|
||||||
|
4. Try to use the `=template=<pattern>` file supplied with the plug-in (only
|
||||||
|
if `g:templates_no_builtin_templates` is undefined or has a zero value).
|
||||||
|
|
||||||
|
Note that the `.vim-template:` local file prefix can be set using the
|
||||||
|
`g:templates_name_prefix` variable, and the `=template=` global file prefix
|
||||||
|
can be set using the `g:templates_global_name_prefix` variable. The variable
|
||||||
|
`g:templates_search_height` controls searching the current directory and
|
||||||
|
parents.
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
VARIABLES *template-variables*
|
||||||
|
|
||||||
|
Template variables are all-caps identifiers surrounded by percent signs,
|
||||||
|
e.g. `%VAR%`. The following variables are available for expansion in
|
||||||
|
templates:
|
||||||
|
|
||||||
|
`%DAY%`, `%YEAR%`, `%MONTH`
|
||||||
|
Current day of the month, year, and month of the year,
|
||||||
|
as numeric values.
|
||||||
|
|
||||||
|
`%DATE%`
|
||||||
|
Current date in `YYYY-mm-dd` format. This is equivalent
|
||||||
|
to expanding `%YEAR%-%MONTH%-%DAY%`.
|
||||||
|
|
||||||
|
`%TIME%`
|
||||||
|
Current time in `HH:MM` format.
|
||||||
|
|
||||||
|
`%FDATE%`
|
||||||
|
Current full date (date and time) in `YYYY-mm-dd HH:MM`
|
||||||
|
format. This is equivalent to expanding `%DATE% %TIME%`.
|
||||||
|
|
||||||
|
`%FILE%`
|
||||||
|
File name, without extension.
|
||||||
|
|
||||||
|
`%EXT%`
|
||||||
|
File extension (component after the last period).
|
||||||
|
|
||||||
|
`%FFILE%`
|
||||||
|
File name, with extension. This is equivalent to
|
||||||
|
expanding `%FILE%.%EXT%`.
|
||||||
|
|
||||||
|
`%MAIL%`
|
||||||
|
E-mail address of the current user. May be overriden by
|
||||||
|
defining the `g:email` variable.
|
||||||
|
|
||||||
|
`%USER%`
|
||||||
|
Current logged-in user name. May be overriden by defining
|
||||||
|
the `g:username` variable.
|
||||||
|
|
||||||
|
`%LICENSE%`
|
||||||
|
Expands to the string `MIT` by default. May be overriden
|
||||||
|
by definining the `g:license` variable.
|
||||||
|
|
||||||
|
`%HOST%`
|
||||||
|
Current host name.
|
||||||
|
|
||||||
|
`%GUARD%`
|
||||||
|
A string containing only alphanumeric characters, and
|
||||||
|
underscores, suitable to be used as preprocessor guards
|
||||||
|
for C/C++/Objective-C header file.
|
||||||
|
|
||||||
|
`%CLASS%`
|
||||||
|
File name, without extension, and the first character of
|
||||||
|
each word capitalised. This is typically used for Java/C++
|
||||||
|
class names.
|
||||||
|
`%MACROCLASS%`
|
||||||
|
File name, without extension, in all-capitals.
|
||||||
|
|
||||||
|
`%CAMELCLASS%`
|
||||||
|
File name, without extension, with the first character of
|
||||||
|
every work capitalised, and underscores removed.
|
||||||
|
|
||||||
|
`%HERE%`
|
||||||
|
Expands to nothing, but ensures that the cursor will be placed in
|
||||||
|
the position where this variable appears after expanding the template.
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
USER VARIABLES *template-user-variables*
|
||||||
|
|
||||||
|
The `g:templates_user_variables` variable allows to expand user-defined
|
||||||
|
variables in templates. It should be set to an array, where each item is
|
||||||
|
a two-element array: the first element is the name of the user-defined
|
||||||
|
variable, and the second element the name of a function. For example,
|
||||||
|
the following can be added to the user |vimrc|:
|
||||||
|
>
|
||||||
|
let g:templates_user_variables = [
|
||||||
|
\ ['FULLPATH', 'GetFullPath'],
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
function! GetFullPath()
|
||||||
|
return expand('%:p')
|
||||||
|
endfunction
|
||||||
|
>
|
||||||
|
This way, each occurrence of `%FULLPATH%` in a template will be replaced
|
||||||
|
with the absolute path of the current file.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
TROUBLESHOOTING *template-troubleshooting*
|
||||||
|
|
||||||
|
Q: Why are no templates found by the plugin?
|
||||||
|
|
||||||
|
A: Make sure you are using a Bourne-compatible shell. Vim will pick by
|
||||||
|
default the value of the `$SHELL` environment variable. If you are using
|
||||||
|
a non-Bourn shell (like Fish, for example), you can tell Vim to use a
|
||||||
|
different one by using the 'shell' option. This should not be needed
|
||||||
|
in non-Unix systems, so you may want to add the following snippet to
|
||||||
|
your `vimrc`:
|
||||||
|
>
|
||||||
|
if has('unix')
|
||||||
|
set shell=/bin/sh
|
||||||
|
endif
|
||||||
|
<
|
||||||
|
---
|
||||||
|
|
||||||
|
Q: How can I debug how the plugin looks up templates?
|
||||||
|
|
||||||
|
A: Add `set g:templates_debug = 1` in your `vimrc`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Q: My question is not answered here. How can I contact the developers?
|
||||||
|
|
||||||
|
A: Please file an issue at https://github.com/aperezdc/vim-template/issues
|
||||||
|
We have a `question` category for the issues which you can check to see
|
||||||
|
whether others have had the same question before. Eventually, the most
|
||||||
|
common questions may end up in the |template-troubleshooting| section of
|
||||||
|
the documentation (this one you are reading).
|
||||||
|
|
||||||
|
|
||||||
|
vim:tw=78:sw=8:ts=8:ft=help:norl:noet
|
523
.vim/bundle/vim-template/plugin/templates.vim
Normal file
523
.vim/bundle/vim-template/plugin/templates.vim
Normal file
@ -0,0 +1,523 @@
|
|||||||
|
"
|
||||||
|
" Template system for Vim
|
||||||
|
"
|
||||||
|
" Copyright (C) 2012 Adrian Perez de Castro <aperez@igalia.com>
|
||||||
|
" Copyright (C) 2005 Adrian Perez de Castro <the.lightman@gmail.com>
|
||||||
|
"
|
||||||
|
" Distributed under terms of the MIT license.
|
||||||
|
"
|
||||||
|
|
||||||
|
if exists("g:templates_plugin_loaded")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:templates_plugin_loaded = 1
|
||||||
|
|
||||||
|
if !exists('g:templates_name_prefix')
|
||||||
|
let g:templates_name_prefix = ".vim-template:"
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_global_name_prefix')
|
||||||
|
let g:templates_global_name_prefix = "=template="
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_debug')
|
||||||
|
let g:templates_debug = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_tr_in')
|
||||||
|
let g:templates_tr_in = [ '.', '*', '?' ]
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_tr_out')
|
||||||
|
let g:templates_tr_out = [ '\.', '.*', '\?' ]
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_fuzzy_start')
|
||||||
|
let g:templates_fuzzy_start = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_search_height')
|
||||||
|
" First try to find the deprecated option
|
||||||
|
if exists('g:template_max_depth')
|
||||||
|
echom('g:template_max_depth is deprecated in favor of g:templates_search_height')
|
||||||
|
let g:templates_search_height = g:template_max_depth != 0 ? g:template_max_depth : -1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if(!exists('g:templates_search_height'))
|
||||||
|
let g:templates_search_height = -1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_directory')
|
||||||
|
let g:templates_directory = []
|
||||||
|
elseif type(g:templates_directory) == type('')
|
||||||
|
" Convert string value to a list with one element.
|
||||||
|
let s:tmp = g:templates_directory
|
||||||
|
unlet g:templates_directory
|
||||||
|
let g:templates_directory = [ s:tmp ]
|
||||||
|
unlet s:tmp
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_no_builtin_templates')
|
||||||
|
let g:templates_no_builtin_templates = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:templates_user_variables')
|
||||||
|
let g:templates_user_variables = []
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Put template system autocommands in their own group. {{{1
|
||||||
|
if !exists('g:templates_no_autocmd')
|
||||||
|
let g:templates_no_autocmd = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !g:templates_no_autocmd
|
||||||
|
augroup Templating
|
||||||
|
autocmd!
|
||||||
|
autocmd BufNewFile * call <SID>TLoad()
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
|
||||||
|
function <SID>Debug(mesg)
|
||||||
|
if g:templates_debug
|
||||||
|
echom(a:mesg)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" normalize the path
|
||||||
|
" replace the windows path sep \ with /
|
||||||
|
function <SID>NormalizePath(path)
|
||||||
|
return substitute(a:path, "\\", "/", "g")
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Template searching. {{{1
|
||||||
|
" Returns a string containing the path of the parent directory of the given
|
||||||
|
" path. Works like dirname(3). It also simplifies the given path.
|
||||||
|
function <SID>DirName(path)
|
||||||
|
let l:tmp = <SID>NormalizePath(a:path)
|
||||||
|
return substitute(l:tmp, "[^/][^/]*/*$", "", "")
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Default templates directory
|
||||||
|
let s:default_template_dir = <SID>DirName(<SID>DirName(expand("<sfile>"))) . "templates"
|
||||||
|
|
||||||
|
" Find the target template in windows
|
||||||
|
"
|
||||||
|
" In windows while we clone the symbol link from github
|
||||||
|
" it will turn to normal file, so we use this function
|
||||||
|
" to figure out the destination file
|
||||||
|
function <SID>TFindLink(path, template)
|
||||||
|
if !filereadable(a:path . a:template)
|
||||||
|
return a:template
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:content = readfile(a:path . a:template, "b")
|
||||||
|
if len(l:content) != 1
|
||||||
|
return a:template
|
||||||
|
endif
|
||||||
|
|
||||||
|
if filereadable(a:path . l:content[0])
|
||||||
|
return <SID>TFindLink(a:path, l:content[0])
|
||||||
|
else
|
||||||
|
return a:template
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Translate a template file name into a regular expression to test for matching
|
||||||
|
" against a given filename. As of writing this behavior is something like this:
|
||||||
|
" (with a g:templates_name_prefix set as 'template.')
|
||||||
|
"
|
||||||
|
" template.py -> ^.*py$
|
||||||
|
"
|
||||||
|
" template.test.py -> ^.*test.py$
|
||||||
|
"
|
||||||
|
function <SID>TemplateToRegex(template, prefix)
|
||||||
|
let l:template_base_name = fnamemodify(a:template,":t")
|
||||||
|
let l:template_glob = strpart(l:template_base_name, len(a:prefix))
|
||||||
|
|
||||||
|
" Translate the template's glob into a normal regular expression
|
||||||
|
let l:in_escape_mode = 0
|
||||||
|
let l:template_regex = ""
|
||||||
|
for l:c in split(l:template_glob, '\zs')
|
||||||
|
if l:in_escape_mode == 1
|
||||||
|
if l:c == '\'
|
||||||
|
let l:template_regex = l:template_regex . '\\'
|
||||||
|
else
|
||||||
|
let l:template_regex = l:template_regex . l:c
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:in_escape_mode = 0
|
||||||
|
else
|
||||||
|
if l:c == '\'
|
||||||
|
let l:in_escape_mode = 1
|
||||||
|
else
|
||||||
|
let l:tr_index = index(g:templates_tr_in, l:c)
|
||||||
|
if l:tr_index != -1
|
||||||
|
let l:template_regex = l:template_regex . g:templates_tr_out[l:tr_index]
|
||||||
|
else
|
||||||
|
let l:template_regex = l:template_regex . l:c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
if g:templates_fuzzy_start
|
||||||
|
return l:template_regex . '$'
|
||||||
|
else
|
||||||
|
return '^' . l:template_regex . '$'
|
||||||
|
endif
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Given a template and filename, return a score on how well the template matches
|
||||||
|
" the given filename. If the template does not match the file name at all,
|
||||||
|
" return 0
|
||||||
|
function <SID>TemplateBaseNameTest(template, prefix, filename)
|
||||||
|
let l:tregex = <SID>TemplateToRegex(a:template, a:prefix)
|
||||||
|
|
||||||
|
" Ensure that we got a valid regex
|
||||||
|
if l:tregex == ""
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" For now only use the base of the filename.. this may change later
|
||||||
|
" *Note* we also have to be careful because a:filename may also be the passed
|
||||||
|
" in text from TLoadCmd...
|
||||||
|
let l:filename_chopped = fnamemodify(a:filename,":t")
|
||||||
|
|
||||||
|
" Check for a match
|
||||||
|
let l:regex_result = match(l:filename_chopped,l:tregex)
|
||||||
|
if l:regex_result != -1
|
||||||
|
" For a match return a score based on the regex length
|
||||||
|
return len(l:tregex)
|
||||||
|
else
|
||||||
|
" No match
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Returns the most specific / highest scored template file found in the given
|
||||||
|
" path. Template files are found by using a glob operation on the current path
|
||||||
|
" and the setting of g:templates_name_prefix. If no template is found in the
|
||||||
|
" given directory, return an empty string
|
||||||
|
function <SID>TDirectorySearch(path, template_prefix, file_name)
|
||||||
|
let l:picked_template = ""
|
||||||
|
let l:picked_template_score = 0
|
||||||
|
|
||||||
|
" Use find if possible as it will also get hidden files on nix systems. Use
|
||||||
|
" builtin glob as a fallback
|
||||||
|
if executable("find") && !has("win32") && !has("win64")
|
||||||
|
let l:find_cmd = '`find -L ' . shellescape(a:path) . ' -maxdepth 1 -type f -name ' . shellescape(a:template_prefix . '*' ) . '`'
|
||||||
|
call <SID>Debug("Executing " . l:find_cmd)
|
||||||
|
let l:glob_results = glob(l:find_cmd)
|
||||||
|
if v:shell_error != 0
|
||||||
|
call <SID>Debug("Could not execute find command")
|
||||||
|
unlet l:glob_results
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if !exists("l:glob_results")
|
||||||
|
call <SID>Debug("Using fallback glob")
|
||||||
|
let l:glob_results = glob(a:path . a:template_prefix . "*")
|
||||||
|
endif
|
||||||
|
let l:templates = split(l:glob_results, "\n")
|
||||||
|
for template in l:templates
|
||||||
|
" Make sure the template is readable
|
||||||
|
if filereadable(template)
|
||||||
|
let l:current_score =
|
||||||
|
\<SID>TemplateBaseNameTest(template, a:template_prefix, a:file_name)
|
||||||
|
call <SID>Debug("template: " . template . " got scored: " . l:current_score)
|
||||||
|
|
||||||
|
" Pick that template only if it beats the currently picked template
|
||||||
|
" (here we make the assumption that template name length ~= template
|
||||||
|
" specifity / score)
|
||||||
|
if l:current_score > l:picked_template_score
|
||||||
|
let l:picked_template = template
|
||||||
|
let l:picked_template_score = l:current_score
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
if l:picked_template != ""
|
||||||
|
call <SID>Debug("Picked template: " . l:picked_template)
|
||||||
|
else
|
||||||
|
call <SID>Debug("No template found")
|
||||||
|
endif
|
||||||
|
|
||||||
|
return l:picked_template
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Searches for a [template] in a given [path].
|
||||||
|
"
|
||||||
|
" If [height] is [-1] the template is searched for in the given directory and
|
||||||
|
" all parents in its directory structure
|
||||||
|
"
|
||||||
|
" If [height] is [0] no searching is done in the given directory or any
|
||||||
|
" parents
|
||||||
|
"
|
||||||
|
" If [height] is [1] only the given directory is searched
|
||||||
|
"
|
||||||
|
" If [height] is greater than one, n parents and the given directory will be
|
||||||
|
" searched where n is equal to height - 1
|
||||||
|
"
|
||||||
|
" If no template is found an empty string is returned.
|
||||||
|
"
|
||||||
|
function <SID>TSearch(path, template_prefix, file_name, height)
|
||||||
|
if (a:height != 0)
|
||||||
|
|
||||||
|
" pick a template from the current path
|
||||||
|
let l:picked_template = <SID>TDirectorySearch(a:path, a:template_prefix, a:file_name)
|
||||||
|
if l:picked_template != ""
|
||||||
|
return l:picked_template
|
||||||
|
else
|
||||||
|
let l:pathUp = <SID>DirName(a:path)
|
||||||
|
if l:pathUp != a:path
|
||||||
|
let l:new_height = a:height >= 0 ? a:height - 1 : a:height
|
||||||
|
return <SID>TSearch(l:pathUp, a:template_prefix, a:file_name, l:new_height)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Ooops, either we cannot go up in the path or [height] reached 0
|
||||||
|
return ""
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" Tries to find valid templates using the global g:templates_name_prefix as a glob
|
||||||
|
" matcher for template files. The search is done as follows:
|
||||||
|
" 1. The [path] passed to the function, [upwards] times up.
|
||||||
|
" 2. The g:templates_directory directory, if it exists.
|
||||||
|
" 3. Built-in templates from s:default_template_dir.
|
||||||
|
" Returns an empty string if no template is found.
|
||||||
|
"
|
||||||
|
function <SID>TFind(path, name, up)
|
||||||
|
let l:tmpl = <SID>TSearch(a:path, g:templates_name_prefix, a:name, a:up)
|
||||||
|
if l:tmpl != ''
|
||||||
|
return l:tmpl
|
||||||
|
endif
|
||||||
|
|
||||||
|
for l:directory in g:templates_directory
|
||||||
|
let l:directory = <SID>NormalizePath(expand(l:directory) . '/')
|
||||||
|
if isdirectory(l:directory)
|
||||||
|
let l:tmpl = <SID>TSearch(l:directory, g:templates_global_name_prefix, a:name, 1)
|
||||||
|
if l:tmpl != ''
|
||||||
|
return l:tmpl
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
if g:templates_no_builtin_templates
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
return <SID>TSearch(<SID>NormalizePath(expand(s:default_template_dir) . '/'), g:templates_global_name_prefix, a:name, 1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Escapes a string for use in a regex expression where the regex uses / as the
|
||||||
|
" delimiter. Must be used with Magic Mode off /V
|
||||||
|
"
|
||||||
|
function <SID>EscapeRegex(raw)
|
||||||
|
return escape(a:raw, '/')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Template variable expansion. {{{1
|
||||||
|
|
||||||
|
" Makes a single [variable] expansion, using [value] as replacement.
|
||||||
|
"
|
||||||
|
function <SID>TExpand(variable, value)
|
||||||
|
silent! execute "%s/\\V%" . <SID>EscapeRegex(a:variable) . "%/" . <SID>EscapeRegex(a:value) . "/g"
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Performs variable expansion in a template once it was loaded {{{2
|
||||||
|
"
|
||||||
|
function <SID>TExpandVars()
|
||||||
|
" Date/time values
|
||||||
|
let l:day = strftime("%d")
|
||||||
|
let l:year = strftime("%Y")
|
||||||
|
let l:month = strftime("%m")
|
||||||
|
let l:monshort = strftime("%b")
|
||||||
|
let l:monfull = strftime("%B")
|
||||||
|
let l:time = strftime("%H:%M")
|
||||||
|
let l:date = exists("g:dateformat") ? strftime(g:dateformat) :
|
||||||
|
\ (l:year . "-" . l:month . "-" . l:day)
|
||||||
|
let l:fdate = l:date . " " . l:time
|
||||||
|
let l:filen = expand("%:t:r:r:r")
|
||||||
|
let l:filex = expand("%:e")
|
||||||
|
let l:filec = expand("%:t")
|
||||||
|
let l:fdir = expand("%:p:h:t")
|
||||||
|
let l:hostn = hostname()
|
||||||
|
let l:user = exists("g:username") ? g:username :
|
||||||
|
\ (exists("g:user") ? g:user : $USER)
|
||||||
|
let l:email = exists("g:email") ? g:email : (l:user . "@" . l:hostn)
|
||||||
|
let l:guard = toupper(substitute(l:filec, "[^a-zA-Z0-9]", "_", "g"))
|
||||||
|
let l:class = substitute(l:filen, "\\([a-zA-Z]\\+\\)", "\\u\\1\\e", "g")
|
||||||
|
let l:macroclass = toupper(l:class)
|
||||||
|
let l:camelclass = substitute(l:class, "_", "", "g")
|
||||||
|
|
||||||
|
" Finally, perform expansions
|
||||||
|
call <SID>TExpand("DAY", l:day)
|
||||||
|
call <SID>TExpand("YEAR", l:year)
|
||||||
|
call <SID>TExpand("DATE", l:date)
|
||||||
|
call <SID>TExpand("TIME", l:time)
|
||||||
|
call <SID>TExpand("USER", l:user)
|
||||||
|
call <SID>TExpand("FDATE", l:fdate)
|
||||||
|
call <SID>TExpand("MONTH", l:month)
|
||||||
|
call <SID>TExpand("MONTHSHORT", l:monshort)
|
||||||
|
call <SID>TExpand("MONTHFULL", l:monfull)
|
||||||
|
call <SID>TExpand("FILE", l:filen)
|
||||||
|
call <SID>TExpand("FFILE", l:filec)
|
||||||
|
call <SID>TExpand("FDIR", l:fdir)
|
||||||
|
call <SID>TExpand("EXT", l:filex)
|
||||||
|
call <SID>TExpand("MAIL", l:email)
|
||||||
|
call <SID>TExpand("HOST", l:hostn)
|
||||||
|
call <SID>TExpand("GUARD", l:guard)
|
||||||
|
call <SID>TExpand("CLASS", l:class)
|
||||||
|
call <SID>TExpand("MACROCLASS", l:macroclass)
|
||||||
|
call <SID>TExpand("CAMELCLASS", l:camelclass)
|
||||||
|
call <SID>TExpand("LICENSE", exists("g:license") ? g:license : "MIT")
|
||||||
|
|
||||||
|
" Perform expansions for user-defined variables
|
||||||
|
for [l:varname, l:funcname] in g:templates_user_variables
|
||||||
|
let l:value = function(funcname)()
|
||||||
|
call <SID>TExpand(l:varname, l:value)
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" }}}2
|
||||||
|
|
||||||
|
" Puts the cursor either at the first line of the file or in the place of
|
||||||
|
" the template where the %HERE% string is found, removing %HERE% from the
|
||||||
|
" template.
|
||||||
|
"
|
||||||
|
function <SID>TPutCursor()
|
||||||
|
0 " Go to first line before searching
|
||||||
|
if search("%HERE%", "W")
|
||||||
|
let l:column = col(".")
|
||||||
|
let l:lineno = line(".")
|
||||||
|
s/%HERE%//
|
||||||
|
call cursor(l:lineno, l:column)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" File name utils
|
||||||
|
"
|
||||||
|
" Ensures that the given file name is safe to be opened and will not be shell
|
||||||
|
" expanded
|
||||||
|
function <SID>NeuterFileName(filename)
|
||||||
|
let l:neutered = fnameescape(a:filename)
|
||||||
|
call <SID>Debug("Neutered " . a:filename . " to " . l:neutered)
|
||||||
|
return l:neutered
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" Template application. {{{1
|
||||||
|
|
||||||
|
" Loads a template for the current buffer, substitutes variables and puts
|
||||||
|
" cursor at %HERE%. Used to implement the BufNewFile autocommand.
|
||||||
|
"
|
||||||
|
function <SID>TLoad()
|
||||||
|
if !line2byte( line( '$' ) + 1 ) == -1
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
let l:file_name = expand("%:p")
|
||||||
|
let l:file_dir = <SID>DirName(l:file_name)
|
||||||
|
let l:depth = g:templates_search_height
|
||||||
|
let l:tFile = <SID>TFind(l:file_dir, l:file_name, l:depth)
|
||||||
|
call <SID>TLoadTemplate(l:tFile, 0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" Like the previous one, TLoad(), but intended to be called with an argument
|
||||||
|
" that either is a filename (so the file is loaded as a template) or
|
||||||
|
" a template suffix (and the template is searched as usual). Of course this
|
||||||
|
" makes variable expansion and cursor positioning.
|
||||||
|
"
|
||||||
|
function <SID>TLoadCmd(template, position)
|
||||||
|
if filereadable(a:template)
|
||||||
|
let l:tFile = a:template
|
||||||
|
else
|
||||||
|
let l:height = g:templates_search_height
|
||||||
|
let l:tName = g:templates_global_name_prefix . a:template
|
||||||
|
let l:file_name = expand("%:p")
|
||||||
|
let l:file_dir = <SID>DirName(l:file_name)
|
||||||
|
|
||||||
|
let l:tFile = <SID>TFind(l:file_dir, a:template, l:height)
|
||||||
|
endif
|
||||||
|
call <SID>TLoadTemplate(l:tFile, a:position)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Load the given file as a template
|
||||||
|
function <SID>TLoadTemplate(template, position)
|
||||||
|
if a:template != ""
|
||||||
|
let l:deleteLastLine = 0
|
||||||
|
if line('$') == 1 && getline(1) == ''
|
||||||
|
let l:deleteLastLine = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Read template file and expand variables in it.
|
||||||
|
let l:safeFileName = <SID>NeuterFileName(a:template)
|
||||||
|
if a:position == 0 || l:deleteLastLine == 1
|
||||||
|
execute "keepalt 0r " . l:safeFileName
|
||||||
|
else
|
||||||
|
execute "keepalt r " . l:safeFileName
|
||||||
|
endif
|
||||||
|
call <SID>TExpandVars()
|
||||||
|
|
||||||
|
if l:deleteLastLine == 1
|
||||||
|
" Loading a template into an empty buffer leaves an extra blank line at the bottom, delete it
|
||||||
|
execute line('$') . "d _"
|
||||||
|
endif
|
||||||
|
|
||||||
|
call <SID>TPutCursor()
|
||||||
|
setlocal nomodified
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Commands {{{1
|
||||||
|
|
||||||
|
" Just calls the above function, pass either a filename or a template
|
||||||
|
" suffix, as explained before =)
|
||||||
|
"
|
||||||
|
fun ListTemplateSuffixes(A,P,L)
|
||||||
|
let l:templates = split(globpath(s:default_template_dir, g:templates_global_name_prefix . a:A . "*"), "\n")
|
||||||
|
let l:res = []
|
||||||
|
for t in templates
|
||||||
|
let l:suffix = substitute(t, ".*\\.", "", "")
|
||||||
|
call add(l:res, l:suffix)
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return l:res
|
||||||
|
endfun
|
||||||
|
command -nargs=1 -complete=customlist,ListTemplateSuffixes Template call <SID>TLoadCmd("<args>", 0)
|
||||||
|
command -nargs=1 -complete=customlist,ListTemplateSuffixes TemplateHere call <SID>TLoadCmd("<args>", 1)
|
||||||
|
|
||||||
|
" Syntax autocommands {{{1
|
||||||
|
"
|
||||||
|
" Enable the vim-template syntax for template files
|
||||||
|
" Usually we'd put this in the ftdetect folder, but because
|
||||||
|
" g:templates_name_prefix doesn't get defined early enough we have to add the
|
||||||
|
" template detection from the plugin itself
|
||||||
|
execute "au BufNewFile,BufRead " . g:templates_name_prefix . "* "
|
||||||
|
\. "let b:vim_template_subtype = &filetype | "
|
||||||
|
\. "set ft=vim-template"
|
||||||
|
|
||||||
|
if !g:templates_no_builtin_templates
|
||||||
|
execute "au BufNewFile,BufRead "
|
||||||
|
\. s:default_template_dir . "/" . g:templates_global_name_prefix . "* "
|
||||||
|
\. "let b:vim_template_subtype = &filetype | "
|
||||||
|
\. "set ft=vim-template"
|
||||||
|
endif
|
||||||
|
|
||||||
|
for s:directory in g:templates_directory
|
||||||
|
let s:directory = <SID>NormalizePath(expand(s:directory) . '/')
|
||||||
|
if isdirectory(s:directory)
|
||||||
|
execute "au BufNewFile,BufRead "
|
||||||
|
\. s:directory . "/" . g:templates_global_name_prefix . "* "
|
||||||
|
\. "let b:vim_template_subtype = &filetype | "
|
||||||
|
\. "set ft=vim-template"
|
||||||
|
endif
|
||||||
|
unlet s:directory
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" vim: fdm=marker
|
19
.vim/bundle/vim-template/syntax/vim-template.vim
Normal file
19
.vim/bundle/vim-template/syntax/vim-template.vim
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
" vim-template syntax file
|
||||||
|
" Language: vim-template
|
||||||
|
" Maintainer: Lyude Paul <thatslyude@gmail.com>
|
||||||
|
" Last Change: 2014 April 21
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
if b:vim_template_subtype != ""
|
||||||
|
execute "runtime! syntax/" . b:vim_template_subtype . ".vim"
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn match vimtemplateVariable "%\%(DAY\|YEAR\|MONTH\|MONTHSHORT\|MONTHFULL\|DATE\|TIME\|FILE\|FFILE\|EXT\|MAIL\|USER\|HOST\|GUARD\|CLASS\|MACROCLASS\|CAMELCLASS\|HERE\)%" containedin=ALL
|
||||||
|
|
||||||
|
let b:current_syntax = "vim-template"
|
||||||
|
|
||||||
|
hi def link vimtemplateVariable Constant
|
10
.vim/bundle/vim-template/templates/=template=.bash
Normal file
10
.vim/bundle/vim-template/templates/=template=.bash
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
#
|
||||||
|
# %FFILE%
|
||||||
|
# Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the %LICENSE% license.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%HERE%
|
11
.vim/bundle/vim-template/templates/=template=.c
Normal file
11
.vim/bundle/vim-template/templates/=template=.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "%FILE%.h"
|
||||||
|
|
||||||
|
|
||||||
|
%HERE%
|
1
.vim/bundle/vim-template/templates/=template=.c++
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.c++
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.c
|
1
.vim/bundle/vim-template/templates/=template=.cc
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.cc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.c
|
13
.vim/bundle/vim-template/templates/=template=.cmake
Normal file
13
.vim/bundle/vim-template/templates/=template=.cmake
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
cmake_minimum_required (VERSION 2.8)
|
||||||
|
|
||||||
|
# projectname is the same as the main-executable
|
||||||
|
project(%HERE%%FDIR%)
|
||||||
|
|
||||||
|
add_definitions('-g')
|
||||||
|
add_definitions('-Wall')
|
||||||
|
#add_definitions('-std=c++11')
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${PROJECT_NAME}.cpp)
|
||||||
|
|
||||||
|
add_custom_target(${PROJECT_NAME}-symlink ALL ln --force -s ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/${PROJECT_NAME} DEPENDS ${PROJECT_NAME})
|
||||||
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME})
|
8
.vim/bundle/vim-template/templates/=template=.coffee
Normal file
8
.vim/bundle/vim-template/templates/=template=.coffee
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
###
|
||||||
|
# %FFILE%
|
||||||
|
# Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the %LICENSE% license.
|
||||||
|
###
|
||||||
|
|
||||||
|
%HERE%
|
1
.vim/bundle/vim-template/templates/=template=.cpp
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.cpp
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.c
|
12
.vim/bundle/vim-template/templates/=template=.css
Normal file
12
.vim/bundle/vim-template/templates/=template=.css
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER%
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body {
|
||||||
|
%HERE%background: white;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
1
.vim/bundle/vim-template/templates/=template=.cxx
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.cxx
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.c
|
8
.vim/bundle/vim-template/templates/=template=.dart
Normal file
8
.vim/bundle/vim-template/templates/=template=.dart
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// %FFILE%
|
||||||
|
// Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
//
|
||||||
|
// Distributed under terms of the %LICENSE% license.
|
||||||
|
//
|
||||||
|
|
||||||
|
%HERE%
|
8
.vim/bundle/vim-template/templates/=template=.f
Normal file
8
.vim/bundle/vim-template/templates/=template=.f
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
!
|
||||||
|
! %FFILE%
|
||||||
|
! Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
!
|
||||||
|
! Distributed under terms of the %LICENSE% license.
|
||||||
|
!
|
||||||
|
|
||||||
|
%HERE%
|
8
.vim/bundle/vim-template/templates/=template=.f90
Normal file
8
.vim/bundle/vim-template/templates/=template=.f90
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
!
|
||||||
|
! %FFILE%
|
||||||
|
! Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
!
|
||||||
|
! Distributed under terms of the %LICENSE% license.
|
||||||
|
!
|
||||||
|
|
||||||
|
%HERE%
|
10
.vim/bundle/vim-template/templates/=template=.go
Normal file
10
.vim/bundle/vim-template/templates/=template=.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
//
|
||||||
|
// %FFILE%
|
||||||
|
// Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
//
|
||||||
|
// Distributed under terms of the %LICENSE% license.
|
||||||
|
//
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
%HERE%
|
13
.vim/bundle/vim-template/templates/=template=.h
Normal file
13
.vim/bundle/vim-template/templates/=template=.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef %GUARD%
|
||||||
|
#define %GUARD%
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
#endif /* !%GUARD% */
|
12
.vim/bundle/vim-template/templates/=template=.hs
Normal file
12
.vim/bundle/vim-template/templates/=template=.hs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#! /usr/bin/env runhugs +l
|
||||||
|
--
|
||||||
|
-- %FFILE%
|
||||||
|
-- Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
--
|
||||||
|
-- Distributed under terms of the %LICENSE% license.
|
||||||
|
--
|
||||||
|
|
||||||
|
module %FILE% where
|
||||||
|
|
||||||
|
|
||||||
|
%HERE%
|
10
.vim/bundle/vim-template/templates/=template=.html
Normal file
10
.vim/bundle/vim-template/templates/=template=.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>%CLASS%</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
%HERE%
|
||||||
|
</body>
|
||||||
|
</html>
|
16
.vim/bundle/vim-template/templates/=template=.humans.txt
Normal file
16
.vim/bundle/vim-template/templates/=template=.humans.txt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/* TEAM */
|
||||||
|
Your title: %USER%
|
||||||
|
Site: %MAIL%, link to a contact form, etc.
|
||||||
|
Twitter: your Twitter username.
|
||||||
|
Location: City, Country.
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
/* THANKS */
|
||||||
|
Name: name or url
|
||||||
|
|
||||||
|
/* SITE */
|
||||||
|
Last update: YYYY/MM/DD
|
||||||
|
Standards: HTML5, CSS3,..
|
||||||
|
Components: Modernizr, jQuery, etc.
|
||||||
|
Software: Software used for the development
|
14
.vim/bundle/vim-template/templates/=template=.java
Normal file
14
.vim/bundle/vim-template/templates/=template=.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class %FILE%
|
||||||
|
{
|
||||||
|
public %FILE%() {
|
||||||
|
%HERE%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
8
.vim/bundle/vim-template/templates/=template=.jl
Normal file
8
.vim/bundle/vim-template/templates/=template=.jl
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#=
|
||||||
|
%FILE%
|
||||||
|
Copyright © %YEAR% %USER% <%MAIL%>
|
||||||
|
|
||||||
|
Distributed under terms of the %LICENSE% license.
|
||||||
|
=#
|
||||||
|
|
||||||
|
%HERE%
|
11
.vim/bundle/vim-template/templates/=template=.js
Normal file
11
.vim/bundle/vim-template/templates/=template=.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
(function(){
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
})();
|
12
.vim/bundle/vim-template/templates/=template=.jsp
Normal file
12
.vim/bundle/vim-template/templates/=template=.jsp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<%@ page contentType="text/html;Charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib prefix="" tagdir="/WEB-INF/tags"%>
|
||||||
|
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
%HERE%
|
||||||
|
</body>
|
||||||
|
</html>
|
21
.vim/bundle/vim-template/templates/=template=.jsx
Normal file
21
.vim/bundle/vim-template/templates/=template=.jsx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
import React, { Component } from 'react'
|
||||||
|
|
||||||
|
|
||||||
|
class %FILE% extends Component {
|
||||||
|
constructor(props: any) {
|
||||||
|
super(props)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
%HERE%
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
4
.vim/bundle/vim-template/templates/=template=.lhs
Normal file
4
.vim/bundle/vim-template/templates/=template=.lhs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
%FILE% by %USER%
|
||||||
|
%FDATE%
|
||||||
|
|
||||||
|
%HERE%
|
9
.vim/bundle/vim-template/templates/=template=.lua
Normal file
9
.vim/bundle/vim-template/templates/=template=.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#! /usr/bin/env lua
|
||||||
|
--
|
||||||
|
-- %FFILE%
|
||||||
|
-- Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
--
|
||||||
|
-- Distributed under terms of the %LICENSE% license.
|
||||||
|
--
|
||||||
|
|
||||||
|
%HERE%
|
1
.vim/bundle/vim-template/templates/=template=.m
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.m
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.c
|
1
.vim/bundle/vim-template/templates/=template=.mk
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.mk
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=Makefile
|
9
.vim/bundle/vim-template/templates/=template=.ml
Normal file
9
.vim/bundle/vim-template/templates/=template=.ml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
(*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*)
|
||||||
|
|
||||||
|
|
||||||
|
let %HERE%
|
1
.vim/bundle/vim-template/templates/=template=.mm
Symbolic link
1
.vim/bundle/vim-template/templates/=template=.mm
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.m
|
12
.vim/bundle/vim-template/templates/=template=.php
Normal file
12
.vim/bundle/vim-template/templates/=template=.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Short description for %FFILE%
|
||||||
|
*
|
||||||
|
* @package %FILE%
|
||||||
|
* @author %USER% <%MAIL%>
|
||||||
|
* @version 0.1
|
||||||
|
* @copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
* @license %LICENSE%
|
||||||
|
*/
|
||||||
|
|
||||||
|
%HERE%
|
16
.vim/bundle/vim-template/templates/=template=.pl
Normal file
16
.vim/bundle/vim-template/templates/=template=.pl
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#! /usr/bin/env perl
|
||||||
|
#
|
||||||
|
# Short description for %FFILE%
|
||||||
|
#
|
||||||
|
# Author %USER% <%MAIL%>
|
||||||
|
# Version 0.1
|
||||||
|
# Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
# Modified On %FDATE%
|
||||||
|
# Created %FDATE%
|
||||||
|
#
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%HERE%
|
48
.vim/bundle/vim-template/templates/=template=.pls
Normal file
48
.vim/bundle/vim-template/templates/=template=.pls
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
create or replace package %FILE%
|
||||||
|
is
|
||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
procedure main (pv_param1 varchar2(50)
|
||||||
|
,pv_param2 varchar2(50));
|
||||||
|
|
||||||
|
end %FILE%
|
||||||
|
/
|
||||||
|
|
||||||
|
show errors
|
||||||
|
exit
|
||||||
|
|
||||||
|
|
||||||
|
create or replace package body %FILE%
|
||||||
|
is
|
||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
procedure main (pv_param1 varchar2(50)
|
||||||
|
,pv_param2 varchar2(50))
|
||||||
|
is
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
null;
|
||||||
|
|
||||||
|
exception
|
||||||
|
when others then
|
||||||
|
|
||||||
|
raise;
|
||||||
|
|
||||||
|
end main;
|
||||||
|
|
||||||
|
end %FILE%
|
||||||
|
/
|
||||||
|
|
||||||
|
show errors
|
||||||
|
exit
|
38
.vim/bundle/vim-template/templates/=template=.pm
Normal file
38
.vim/bundle/vim-template/templates/=template=.pm
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package %FILE%;
|
||||||
|
#
|
||||||
|
# Short description for %FFILE%
|
||||||
|
#
|
||||||
|
# Author %USER% <%MAIL%>
|
||||||
|
# Version 0.1
|
||||||
|
# Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
# Modified On %FDATE%
|
||||||
|
# Created %FDATE%
|
||||||
|
#
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
our @ISA = qw(Exporter);
|
||||||
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
|
||||||
|
our @EXPORT = qw();
|
||||||
|
our $VERSION = '1.00';
|
||||||
|
require Exporter;
|
||||||
|
use AutoLoader qw(AUTOLOAD);
|
||||||
|
|
||||||
|
|
||||||
|
sub new
|
||||||
|
{
|
||||||
|
my $class = shift;
|
||||||
|
my $arg = shift;
|
||||||
|
my $self = {};
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
bless($self, $class);
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
||||||
|
# __END__
|
||||||
|
# # Below is stub documentation for your module. You'd better edit it!
|
26
.vim/bundle/vim-template/templates/=template=.pro
Normal file
26
.vim/bundle/vim-template/templates/=template=.pro
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
PRO %FILE%
|
||||||
|
;+
|
||||||
|
; Name:
|
||||||
|
; %FILE%
|
||||||
|
; Purpose:
|
||||||
|
;
|
||||||
|
; Calling sequence:
|
||||||
|
; %FILE%
|
||||||
|
; Input:
|
||||||
|
;
|
||||||
|
; Output:
|
||||||
|
;
|
||||||
|
; Keywords:
|
||||||
|
;
|
||||||
|
; History:
|
||||||
|
;
|
||||||
|
; Author:
|
||||||
|
; Copyright © %YEAR% %USER% <%MAIL%>
|
||||||
|
; Distributed under terms of the %LICENSE% license.
|
||||||
|
;-
|
||||||
|
|
||||||
|
COMPILE_OPT IDL2 ;Set compile options
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
END
|
11
.vim/bundle/vim-template/templates/=template=.py
Normal file
11
.vim/bundle/vim-template/templates/=template=.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:fenc=utf-8
|
||||||
|
#
|
||||||
|
# Copyright © %YEAR% %USER% <%MAIL%>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the %LICENSE% license.
|
||||||
|
|
||||||
|
"""
|
||||||
|
%HERE%
|
||||||
|
"""
|
10
.vim/bundle/vim-template/templates/=template=.rb
Normal file
10
.vim/bundle/vim-template/templates/=template=.rb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
#
|
||||||
|
# %FFILE%
|
||||||
|
# Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the %LICENSE% license.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%HERE%
|
6
.vim/bundle/vim-template/templates/=template=.robots.txt
Normal file
6
.vim/bundle/vim-template/templates/=template=.robots.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#
|
||||||
|
# The Web Robots Pages (http://www.robotstxt.org/)
|
||||||
|
#
|
||||||
|
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
17
.vim/bundle/vim-template/templates/=template=.rs
Normal file
17
.vim/bundle/vim-template/templates/=template=.rs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// %FFILE%
|
||||||
|
// Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
// Distributed under terms of the %LICENSE% license.
|
||||||
|
//
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn it_works() {
|
||||||
|
}
|
||||||
|
}
|
10
.vim/bundle/vim-template/templates/=template=.sh
Normal file
10
.vim/bundle/vim-template/templates/=template=.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# %FFILE%
|
||||||
|
# Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
#
|
||||||
|
# Distributed under terms of the %LICENSE% license.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%HERE%
|
11
.vim/bundle/vim-template/templates/=template=.sql
Normal file
11
.vim/bundle/vim-template/templates/=template=.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* %FFILE%
|
||||||
|
* Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
*
|
||||||
|
* Distributed under terms of the %LICENSE% license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
select %HERE%
|
||||||
|
|
||||||
|
|
||||||
|
-- vim:et
|
17
.vim/bundle/vim-template/templates/=template=.tex
Normal file
17
.vim/bundle/vim-template/templates/=template=.tex
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
% vim:ft=tex:
|
||||||
|
%
|
||||||
|
\documentclass[12pt]{article}
|
||||||
|
|
||||||
|
\title{
|
||||||
|
%FILE%
|
||||||
|
}
|
||||||
|
\author{
|
||||||
|
%USER% --- \texttt{%MAIL%}
|
||||||
|
}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
\end{document}
|
7
.vim/bundle/vim-template/templates/=template=.txt
Normal file
7
.vim/bundle/vim-template/templates/=template=.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
%FFILE%
|
||||||
|
|
||||||
|
:Author: %USER%
|
||||||
|
:Email: %MAIL%
|
||||||
|
:Date: %FDATE%
|
||||||
|
|
||||||
|
%HERE%
|
8
.vim/bundle/vim-template/templates/=template=.xml
Normal file
8
.vim/bundle/vim-template/templates/=template=.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<%FILE%>
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
</%FILE%>
|
||||||
|
<!-- vim:fenc=utf-8
|
||||||
|
-->
|
12
.vim/bundle/vim-template/templates/=template=.xsl
Normal file
12
.vim/bundle/vim-template/templates/=template=.xsl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
%FFILE%
|
||||||
|
Copyright (C) %YEAR% %USER% <%MAIL%>
|
||||||
|
|
||||||
|
Distributed under terms of the %LICENSE% license.
|
||||||
|
-->
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
8
.vim/bundle/vim-template/templates/=template=.zcml
Normal file
8
.vim/bundle/vim-template/templates/=template=.zcml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<configure
|
||||||
|
xmlns="http://namespaces.zope.org/zope"
|
||||||
|
xmlns:browser="http://namespaces.zope.org/browser"
|
||||||
|
xmlns:i18n="http://namespaces.zope.org/i18n">
|
||||||
|
|
||||||
|
%HERE%
|
||||||
|
|
||||||
|
</configure>
|
1
.vim/bundle/vim-template/templates/=template=CMakeLists.txt
Symbolic link
1
.vim/bundle/vim-template/templates/=template=CMakeLists.txt
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=.cmake
|
1
.vim/bundle/vim-template/templates/=template=GNUmakefile
Symbolic link
1
.vim/bundle/vim-template/templates/=template=GNUmakefile
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
=template=Makefile
|
11
.vim/bundle/vim-template/templates/=template=Makefile
Normal file
11
.vim/bundle/vim-template/templates/=template=Makefile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# %FFILE%
|
||||||
|
# %USER%, %FDATE%
|
||||||
|
#
|
||||||
|
|
||||||
|
all:
|
||||||
|
%HERE%@echo "%FFILE% needs your attention"
|
||||||
|
|
||||||
|
|
||||||
|
# vim:ft=make
|
||||||
|
#
|
Loading…
Reference in New Issue
Block a user