Skip to content

Instantly share code, notes, and snippets.

View haya14busa's full-sized avatar
🐶

haya14busa haya14busa

🐶
View GitHub Profile
wget 'ftp://ftp.home.vim.org/pub/vim/unix/vim-7.4.tar.bz2'
tar xfv vim-7.4.tar.bz2
sudo ./configure --enable-multibyte --with-features=huge --disable-darwin
sudo make
sudo make install
sudo ldid -S /usr/local/bin/vim
" NeoBundle Function"{{{
function! s:bundle_tap(bundle) " {{{
let s:tapped_bundle = neobundle#get(a:bundle)
return neobundle#is_installed(a:bundle)
endfunction " }}}
function! s:bundle_config(config) " {{{
if exists("s:tapped_bundle") && s:tapped_bundle != {}
call neobundle#config(s:tapped_bundle.name, a:config)
endif
endfunction " }}}
from subprocess import call
# call(cmd, shell=True)
import sys, codecs
sys.stdout = codecs.getwriter('utf_8')(sys.stdout)
sys.stdin = codecs.getreader('utf_8')(sys.stdin)
def getSubDirectory(path):
#return [name for name in os.listdir(path) if os.path.isdir(os.path.join(dir, name))]
f = []
for name in os.listdir(path):
if os.path.isdir(os.path.join(path, name)):
f.append(name)
return f
import os
def getFileByListdir(path):
return [ f for f in os.listdir(path) if isfile(join(path,f)) ]
def getFileByWalk(path):
flist = []
for subdir, dirs, files in os.walk(path):
flist.extend(files)
return flist
// Font size using rem
// font-size :6pt、7pt、8pt、9pt、10pt、11pt、12pt、14pt、18pt、21pt、24pt、36pt、48pt、60pt、72pt
html
font-size:62.5%
" For Undo Revision, Break Undo Sequence "{{{
inoremap <CR> <C-]><C-G>u<CR>
inoremap <C-h> <C-g>u<C-h>
inoremap <BS> <C-g>u<BS>
inoremap <Del> <C-g>u<Del>
inoremap <C-d> <C-g>u<Del>
inoremap <C-w> <C-g>u<C-w>
inoremap <C-u> <C-g>u<C-u>
"}}}
git config --global merge.tool vimdiff
git config --global mergetool.prompt false
git config --global mergetool.keepBackup false
" Mapping for vimdiff{{{
" for git mergetool
if &diff
map <Leader>1 :diffget LOCAL<CR>
map <Leader>2 :diffget BASE<CR>
map <Leader>3 :diffget REMOTE<CR>
map <Leader>u :<C-u>diffupdate<CR>
map u u:<C-u>diffupdate<CR>
endif
"}}}