Skip to content

Instantly share code, notes, and snippets.

sgur

Block or report user

Report or block sgur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sgur
sgur / gist:3223355
Created Aug 1, 2012
:, /, ? 2度押しで cmdline から cmdwin へ移行する
View gist:3223355
function! s:switch_cmdline(trigger)
if empty(getcmdline()) && getcmdtype() == a:trigger
call feedkeys("\<ESC>q".a:trigger, 'n')
else
return a:trigger
endif
endfunction
cmap <expr> ; <SID>switch_cmdline(';')
cmap <expr> / <SID>switch_cmdline('/')
@sgur
sgur / gist:3393989
Created Aug 19, 2012
HTMLヘルプのセキュリティ警告対応
View gist:3393989
Visual Studio のHTMLヘルプを表示する度にセキュリティ警告が表示される不具合の解決方法
差出人: "Microsoft e-Support Japan"
件名 : SRX1159808338ID - Microsoft Office 2007 のお問い合わせについての回答 (マイクロソフトサポート)
日時 : 2011年8月15日 18:56
このたびはマイクロソフト 電子メール サポートをご利用いただき誠にありがとうございます。
Office 担当 千葉 と申します。よろしくお願いいたします。
@sgur
sgur / simplify.sh
Created Sep 5, 2012
collect plugins into "simplified/" directory
View simplify.sh
mkdir -p simplified
for d in bundle/* ; do
for p in $d/* ; do
if [ -d $p ]; then
cp -ulr $p simplified
fi
done
done
@sgur
sgur / standard_keyboard + CTRL_N,P.ini
Created Sep 19, 2012
Operaキーボードショートカット変更
View standard_keyboard + CTRL_N,P.ini
Opera Preferences version 2.1
; Do not edit this file while Opera is running
; This file is stored in UTF-8 encoding
[Version]
File Version=1
[Info]
Description=Opera Standard Keyboard setup
Author=Opera Software ASA
@sgur
sgur / 2013-03-18-151956.vim
Created Mar 18, 2013
taskodone.com の API を webapi.vim から利用するサンプル
View 2013-03-18-151956.vim
" taskodne.com API sample
let s:user_id = 1
let s:api_key = 'See http://taskodone.com/user/account'
let s:number = type(0)
let s:string = type('')
function! s:validate_params(params, types)
if len(a:params) != len(a:types)
@sgur
sgur / googlesuggest.diff
Created May 13, 2013
googlesuggest-complete-vim (https://github.com/mattn/googlesuggest-complete-vim) を &filetype で絞り込む変更
View googlesuggest.diff
diff --git a/autoload/googlesuggest.vim b/autoload/googlesuggest.vim
index eb3ae37..3f652ab 100644
--- a/autoload/googlesuggest.vim
+++ b/autoload/googlesuggest.vim
@@ -68,12 +68,11 @@ function! googlesuggest#Complete(findstart, base)
else
" find months matching with "a:base"
let ret = []
- let res = webapi#http#get('http://suggestqueries.google.com/complete/search', {"client" : "youtube", "q" : a:base, "hjson" : "t", "hl" : g:googlesuggest_language, "ie" : "UTF8", "oe" : "UTF8" })
+ let res = webapi#http#get('http://suggestqueries.google.com/complete/search', {"client" : "youtube", "q" : &filetype . ' ' . a:base, "hjson" : "t", "hl" : g:googlesuggest_language, "ie" : "UTF8", "oe" : "UTF8" })
@sgur
sgur / gist:5569599
Created May 13, 2013
AutoComplPopでGoogleサジェストを自動補完する設定
View gist:5569599
let g:acp_behaviorUserDefinedFunction = 'googlesuggest#Complete'
let g:acp_behaviorUserDefinedMeets = 'acp#meetsForKeyword'
@sgur
sgur / .ctags
Last active Jul 13, 2016
Delphi 用 .ctags
View .ctags
--c-kinds=+p
--c++-kinds=+p
--fields=+liaS
--extra=+q
--jcode=utf8
--langdef=delphi
--langmap=delphi:.pas
--regex-delphi=/(\w+)\s*=\s*\(\s*\w\s*\)/\1/t,Type/
--regex-delphi=/(\w+)\s*=\s*class\s*[^;]*$/\1/c,Class/
--regex-delphi=/^constructor\s+(T[a-zA-Z0-9_]+(<[a-zA-Z0-9_, ]+>)?\.)([a-zA-Z0-9_<>, ]+)(.*)+/\1\3/n,Constructor/
View pyglob.vim
fu! PyGlob(path)
let path = escape(a:path, '\')
python << EOF
import vim
import re, os, os.path, fnmatch
custom_ignore = vim.eval('g:ctrlp_custom_ignore')
if custom_ignore['dir'][:2] == '\\v':
custom_ignore['dir'] = custom_ignore['dir'][2 :]
if custom_ignore['file'][:2] == '\\v':
@sgur
sgur / neosnippet_completer.py
Created Jun 18, 2013
neosnippet_completer.py
View neosnippet_completer.py
#!/usr/bin/env python
#
# Copyright (C) 2013 Stanislav Golovanov <stgolovanov@gmail.com>
# Strahinja Val Markovic <val@markovic.io>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
You can’t perform that action at this time.