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
| nnoremap <silent>du :<C-u>call DiffUpdate()<CR> | |
| function! DiffUpdate() | |
| if &diff | |
| diffupdate | |
| else | |
| " dummy E99 | |
| echohl ErrorMsg | echo 'E99: Current buffer is not in diff mode' | echohl None | |
| endif | |
| endfunction |
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
| nnoremap <C-d> :<C-u>silent call OpenDiffWindow()<CR> | |
| function! OpenDiffWindow() | |
| execute "normal \<C-t>" | |
| setlocal bufhidden=unload nobuflisted buftype=nofile noswapfile | |
| file [Diff Right] | |
| vnew | |
| setlocal bufhidden=unload nobuflisted buftype=nofile noswapfile | |
| file [Diff Left] | |
| windo diffthis | |
| endfunction |
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
| find -name "*.tpl" | xargs nkf -g | grep -v "UTF-8" | grep -v "ASCII" |
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
| " HTMLインデント | |
| command! HtmlIndent call <SID>HtmlIndent() | |
| function! s:HtmlIndent() | |
| %s/>\zs\ze</\r/g | |
| let old = &filetype | |
| set filetype=html | |
| normal! ggVG= | |
| let &filetype = old | |
| endfunction |
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
| let g:switch_colorscheme_config = { | |
| \ '172.28.20.7' : 'murphy', | |
| \ } | |
| let g:switch_colorscheme_default = 'nevfn' | |
| autocmd MyAutoCmd BufEnter * call <SID>switchColorscheme() | |
| function! s:switchColorscheme() | |
| let color = '' | |
| for [key, value] in items(g:switch_colorscheme_config) | |
| if @% =~ key | |
| let color = value |
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
| <?php | |
| class Unko | |
| { | |
| public function func() | |
| { | |
| $totalnow = $now = $this->_measureTime(); | |
| some(); | |
| $now = $this->_measureTime(__LINE__, $now); | |
| some2(); |
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
| let &statusline = '' | |
| let &statusline .= '%{expand("%:t")}' | |
| let &statusline .= '%h%w%m%r' | |
| let &statusline .= ' (%<%{expand("%:p:~:h")}) ' | |
| let &statusline .= '%=' | |
| let &statusline .= '[HEX:%B][R:%l][C:%c]' | |
| let &statusline .= '%y' | |
| let &statusline .= '[%{&fileencoding != "" ? &fileencoding : &encoding}]' | |
| let &statusline .= '%{&bomb ? "[BOM]" : ""}' | |
| let &statusline .= '[%{&fileformat}]' |
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
| $.makePostData = function(formSelector) { | |
| var postData = {}; | |
| $(formSelector).find(':input').each(function(){ | |
| if (typeof $(this).attr('name') === 'undefined') { | |
| // name属性の無いフォームは無視 | |
| } else if ($(this).attr('name').match(/\[\]$/)) { | |
| if (typeof postData[$(this).attr('name')] === 'undefined') { | |
| postData[$(this).attr('name')] = [$(this).val()]; | |
| } else { | |
| postData[$(this).attr('name')].push($(this).val()); |
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
| let g:user_zen_settings = { | |
| \ 'lang' : 'ja', | |
| \ 'indentation' : ' ', | |
| \ 'html' : { | |
| \ 'filters' : 'html', | |
| \ 'snippets' : { | |
| \ 'jq' : "<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js\"></script>\n<script>\n\\$(function() {\n\t|\n})();\n</script>", | |
| \ 'cd' : "<![CDATA[|]]>", | |
| \ }, | |
| \ }, |
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
| " wiktionary | |
| let g:ref_source_webdict_sites = { | |
| \ 'wiktionary': { | |
| \ 'url': 'http://ja.wiktionary.org/wiki/%s', | |
| \ 'keyword_encoding': 'utf-8', | |
| \ 'output_encoding': 'euc-jp', | |
| \ 'cache': 1, | |
| \ } | |
| \ } | |
| function! g:ref_source_webdict_sites.wiktionary.filter(output) |