This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| copy from http://meta.wikimedia.org/wiki/List_of_Wikipedias | |
| Anglo-Saxon (ang) | |
| العربية (ar) | |
| سنڌي (sd) | |
| Azərbaycan (az) | |
| Български (bg) | |
| বাংলা (bn) | |
| Català (ca) | |
| Česky (cs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set tabline=%!SetTabLine() | |
| function! SetTabLine() | |
| " NOTE: left/right padding of each tab was hard coded as 1 space. | |
| " NOTE: require Vim 7.3 strwidth() to display fullwidth text correctly. | |
| " settings | |
| let tabMinWidth = 0 | |
| let tabMaxWidth = 40 | |
| let tabMinWidthResized = 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " TODO when no keyword is under/after the cursor, try looking backward to find a word. | |
| fun! WordTransform() | |
| let w = expand("<cword>") | |
| let x = '' | |
| let c = strpart(getline('.'), col('.') - 1, 1) | |
| if match(w, '_') > -1 | |
| let x = substitute(w, '_\([a-z]\)', '\u\1', 'g') | |
| else | |
| let x = substitute(w, '\C[A-Z]', '_\L\0', 'g') | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Vim color file | |
| " Maintainer: bootleq <bootleq@gmail.com> | |
| " Last Change: 2010-09-17 | |
| " Version: 0.2 | |
| " | |
| " Summary: | |
| " Modified from "slate" theme in 256 color term. | |
| " Dark background, high contrast, similar color in cterm/gui, and avoid bold attribute in gui. | |
| " | |
| " Test: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command! -bang -nargs=* JsCompress call JsCompress(<bang>0, <f-args>) | |
| " @param boolean save 0: save to temp file and return compressed content. | |
| " 1: save with alternative filename, return the new name. | |
| " @param boolean interact 1 to prompt before starting compression. | |
| " @param string options extra options for running the compiler. | |
| fun! JsCompress(save, ...) | |
| let jar = '/scripts/google-compiler-20100616.jar' | |
| let defaults = ' --compilation_level=SIMPLE_OPTIMIZATIONS' | |
| \ . ' --warning_level=QUIET' | |
| let input = expand('%') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command! -nargs=* Bookmarklet call Bookmarklet(<f-args>) | |
| fun! Bookmarklet(...) | |
| let result = JsCompress(0, 0, '--compilation_level=WHITESPACE_ONLY') | |
| if len(getqflist()) == 0 && strlen(result) > 0 | |
| let reuse_win = 0 | |
| for winnr in tabpagebuflist(tabpagenr()) | |
| if bufname(winnr) == '[Bookmarklet]' | |
| exec winnr . 'wincmd w' | |
| let reuse_win = winnr | |
| endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " NOTE: limitations | |
| " 1. Only test if first non-blank character is highlighted with "Comment". | |
| " 2. Always linewise. | |
| vnoremap <silent> ac :<C-U>call TxtObjComment()<CR> | |
| onoremap <silent> ac :<C-U>call TxtObjComment()<CR> | |
| fun! TxtObjComment() | |
| if exists("g:syntax_on") | |
| if ! IsInComment() | |
| echomsg 'Not in a Comment region.' | |
| return 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " 暫存/復原 position {{{2 | |
| " @params stash/pop | |
| function PosStash(...) | |
| let l:stash = a:0 > 0 ? a:1 : 0 | |
| if l:stash | |
| let s:stashCursor = getpos(".") | |
| let g:stashCursor = s:stashCursor | |
| else | |
| call setpos('.', s:stashCursor) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Most adopted from Bob Hiestand's vsccommand plugin | |
| " http://www.vim.org/scripts/script.php?script_id=90 | |
| command! -nargs=? GitDiff cal GitDiff(<f-args>) | |
| function! GitDiff(...) | |
| let rev = "HEAD~" . (a:0 > 0 ? a:1 : 0) | |
| let oldDir = getcwd() | |
| let newDir = fnameescape(expand('%:p:h')) | |
| let filetype = &filetype | |
| let cdCommand = haslocaldir() ? 'lcd' : 'cd' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| predef: [ | |
| // for MooTools Core 1.3. Excluded of standard global objects and Slick. | |
| "$", "$$", "typeOf", "instanceOf", "$A", "$H", | |
| "Core", "Event", "Browser", "Class", "Chain", "Events", "Options", | |
| "Element", "Fx", "Request", "Cookie", "JSON", "Swiff", | |
| // for MooTools More 1.3 | |
| "More", "URI", "Hash", "Form", "OverText", "Drag", "Slider", "Sortables", "Assets", "Color", | |
| "Group", "IframeShim", "HtmlTable", "Keyboard", "Mask", "Scroller", "Tips", "Spinner", "Locale", |
OlderNewer