if neobundle#is_sourced('vim-ref') " {{{
if has('win32') || has('win64')
let g:ref_phpmanual_path = $VIM . '/vimfiles/manual/php_manual_ja/'
else
let g:ref_phpmanual_path = $HOME . '/.vim/manual/php_manual_ja/'
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
# "12345", "long text...." | |
# "12346", "long text...." | |
require 'csv' | |
require 'uri' | |
CSV.open('url.csv', 'wb', force_quotes: true) do |output| | |
CSV.read('about.csv', encoding: 'UTF-8:UTF-8', header_converters: nil).map do |input| | |
tmp = [] | |
tmp << input[0] | |
tmp << URI.extract(input[1]) |
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
def to_geta(str) | |
ng_codepoints = [ | |
*0x00..0x09, | |
*0x0b..0x0c, | |
*0x0e..0x1f, | |
0x7f, | |
*0x2150..0x219F, | |
*0x2460..0x24EF, | |
*0x2600..0x2660, | |
*0x3220..0x324F, |
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
#!/bin/bash | |
DIRS=("/bin" "/etc" "/usr") # SUCCESS | |
# DIRS=("/bin" "/etc" "/usr" "/hogehoge") # FAILURE | |
IDS="" | |
for D in ${DIRS[*]}; do | |
IDS=$IDS" `docker run -d ubuntu du -sh $D`" | |
done |
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
setlocal autoindent | |
setlocal formatoptions=tcroqln | |
setlocal nofoldenable | |
setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,b:-,b:+,b:* | |
abbreviate td [ ] | |
abbreviate tl - [ ] | |
nnoremap <silent><buffer> <Leader><Leader> :call ToggleCheckbox()<CR> | |
vnoremap <silent><buffer> <Leader><Leader> :call ToggleCheckbox()<CR> |
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
h := md5.New() | |
io.WriteString(h, "The fog is getting thicker!") | |
pp.Println(hex.EncodeToString((h.Sum(nil)))) | |
h2 := sha1.New() | |
io.WriteString(h2, "The fog is getting thicker!") | |
pp.Println(hex.EncodeToString((h2.Sum(nil)))) | |
s := "http://localhost:8080/xx/yy/zz/hogehoge.png:e?hoge=fuga&k=v#f" | |
pp.Println(url.QueryEscape(s)) |
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
NeoBundle 'vim-scripts/PDV--phpDocumentor-for-Vim' | |
if neobundle#is_sourced('PDV--phpDocumentor-for-Vim') " {{{ | |
inoremap <Leader>d <ESC>:call PhpDocSingle()<CR>i | |
nnoremap <Leader>d :call PhpDocSingle()<CR> | |
vnoremap <Leader>d :call PhpDocRange()<CR> | |
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
" NeoBundle 'gcmt/breeze.vim' | |
if neobundle#is_sourced('breeze.vim') " {{{ | |
let g:breeze_highlight_filename_patterns = '*.ctp,*.html,*.htm,*.xhtml,*.xml' | |
let g:breeze_highlight_tag = 1 | |
let g:breeze_hl_color = 'ctermbg=LightGrey ctermfg=Black guibg=LightGrey guifg=Black ' | |
" nnoremap th :<C-u>BreezeHlElementBlock<CR> | |
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
NeoBundleLazy 'Lokaltog/vim-easymotion' | |
if neobundle#is_sourced('vim-easymotion') " {{{ | |
" ホームポジションに近いキーを使う | |
let g:EasyMotion_keys = 'hjklasdfgyuiopqwertnmzxcvbHJKLASDFGYUIOPQWERTNMZXCVB' | |
let g:EasyMotion_leader_key = "<Space>" | |
" 1 ストローク選択を優先する | |
let g:EasyMotion_grouping = 1 | |
" カラー設定変更 | |
hi EasyMotionTarget ctermbg=none ctermfg=red |