Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created February 4, 2014 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhysd/8801426 to your computer and use it in GitHub Desktop.
Save rhysd/8801426 to your computer and use it in GitHub Desktop.
diff --git a/gitconfig b/gitconfig
index 660103e..8c7682d 100644
--- a/gitconfig
+++ b/gitconfig
@@ -52,3 +52,5 @@
email = lin90162@yahoo.co.jp
[push]
default = simple
+[github]
+ user = rhysd
diff --git a/vimrc b/vimrc
index 6ccd972..54c5cf2 100644
--- a/vimrc
+++ b/vimrc
@@ -453,6 +453,24 @@ function! s:open_calendar_app()
endif
endfunction
+" typo したファイル名を検出
+Autocmd BufWriteCmd *[,*] call s:write_check_typo(expand('<afile>'))
+function! s:write_check_typo(file)
+ let writecmd = 'write'.(v:cmdbang ? '!' : '').' '.a:file
+ if exists('b:write_check_typo_nocheck')
+ execute writecmd
+ return
+ endif
+ let prompt = "possible typo: really want to write to '" . a:file . "'?(y/n):"
+ let input = input(prompt)
+ if input ==# 'YES'
+ execute writecmd
+ let b:write_check_typo_nocheck = 1
+ elseif input =~? '^y\(es\)\=$'
+ execute writecmd
+ endif
+endfunction
+
" 基本マッピング {{{
" ; と : をスワップ
noremap : ;
@@ -1089,6 +1107,11 @@ NeoBundleLazy 'daisuzu/rainbowcyclone.vim', {
\ },
\ }
+NeoBundleLazy 'mattn/gist-vim', {
+ \ 'autoload' : {
+ \ 'commands' : 'Gist',
+ \ }
+ \ }
" if_lua プラグイン
let s:meet_neocomplete_requirements = has('lua') && (v:version > 703 || (v:version == 703 && has('patch885')))
@@ -3340,6 +3363,9 @@ endfunction
AutocmdFT python call <SID>jedi_settings()
" }}}
+" gist-vim
+let g:gist_open_browser_after_post = 1
+
" プラットフォーム依存な設定をロードする "{{{
function! SourceIfExist(path)
if filereadable(a:path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment