kannokanno/previm NeoBundleで。 NeoBundle 'kannokanno/previm' NeoBundle 'tyru/open-browser.vim'
背景 Vimを使っている。 問題 Vimの「書き込んで終了」コマンドは ":wq" だが、誤って ":w:wq" のようにしてしまうと ":wq" という変なファイルができてしまう。 解法 autocmdを使って特定のファイル名の書き込みには警告を出す。 詳細 id:tyruさんのエンター巻き込み事故を防ぐのコードを利用する。 以下では ":" で始まるか、"[" で終わるか、"]" で終わるファイル名のときに警告を表示している。 " Checking typo. " http://d.hatena.ne.jp/tyru/20130419/avoid_tyop (一部修正) autocmd BufWriteCmd :*,*[,*] call s:write_check_typo(expand('<afile>')) function! s:write_check_typo(file) le
背景 Vimを使っている。 問題 プログラムのコメントを書いているとき、挿入モードでの改行やノーマルモードでのコメント行から'o'などで自動的にコメント文字列が挿入されてしまう。 たとえばスクリプト言語で'#'が自動挿入される。 解法 autocmdを使ってオフにする。 詳細 rbtnnさんのgistを、~/.vimrcに入れておく。 " https://gist.github.com/rbtnn/8540338 (一部修正) augroup auto_comment_off autocmd! autocmd BufEnter * setlocal formatoptions-=r autocmd BufEnter * setlocal formatoptions-=o augroup END謝辞 困っていたときにrbtnnさんに教えていただきました。ありがとうございます。 id:mckn
結城がMacBook Airで使っている主なソフトウェア一覧です(名前順)。 ATOK: 日本語入力 BetterSnapTool: ウインドウの便利な小技(たまに使う) ClamXav: アンチウイルス Dropbox: クラウドストレージ Evernote: クラウドにメモを保存 FreeMind: マインドマップ(たまに使う) OmniGraffle Professional: ドローソフト Growl: 通知 HyperSwitch: Command+Tabをアプリ切り換えではなくウインドウ切り換えに KeyRemap4MacBook: キーアサインの変更 Numbers: 表計算ソフト OmmWriter: 集中して書き物するエディタ(たまに使う) Perl: LL Pixelmator: レタッチソフト QuickSilver: ローンチャ Ruby: LL Safari: W
背景 Twitterを使っている。 問題 一つのツイートには140字という字数制限があるので長めの文章が書けない。 複数ツイートに分けて書くと、一連のまとまったツイートだと認識してもらえない可能性がある。 解法 自分の直前のツイートあてにリプライ(返信)する形で「連鎖ツイート」していく。 クライアントのリプライの機能を使って書き始めたあとは@を削除してもよい。 結果 「連鎖ツイート」の一つから、全体を一連のツイートとしてたどることができるようになる。 字数制限を超えた文章も、まとまったツイートとして認識してもらえる可能性が高くなる。 実例 「連鎖ツイート」の途中のツイート(前後がたどれるはず) 謝辞 黒木さんのツイートで知りました。ありがとうございます。
背景 Tumblr, Twitter, iPhone, MacBookなどいろんなWebサービスや機器を使って生活している。 問題 自分の普段の作業をEvernoteに集約して振り返りたい。 すべてのツイートをEvernoteに入れるのは多すぎる。 個別の記録がたくさんのノートにばらつくのは避けたい。 そのほか個々のWebサービスごとに細かい調整をしたい。 解法 IFTTTを使う。 詳細(結城の場合) iPhoneでTumblr(作業予定) Tumblrには作業予定を書き込んでいる。 IFTTTで「新しいpostをEvernoteの指定ノートブック(DIARY)中の新規ノートに書く」というレシピを使う。 MacBookでTwitter(作業記録) Twitterでは作業記録とふだんのツイートが混在している。 TwitterでEvernoteに集約させたい情報(作業記録)は、#hyuki_d
前提 Vimを使っている。 問題 ファイルの改行コードをCR LFからLFに変更したい。 ファイルの文字コードをShift_JISやcp932からUTF-8に変更したい。 解法 :set fileformat=unix :set fileencoding=utf-8 詳細 :set file[Tab]で補完を使うと楽。 改行コードはdos (CR LF), unix (LF) など。 文字コードはutf-8, shift_jis, cp932など。 参照 http://advweb.seesaa.net/article/3074705.html 補足 1にマルがついた丸つき文字はshift_jisへ変換して保存しようとすると変換エラーになります。cp932なら大丈夫。 :setlocalを使ったほうが安全という指摘がありました。
「さくらのVPS申し込み」から「RubyをインストールしてReVIEWを動かす」までの自分用メモです。 なお、以下の手順やコマンドラインの多くは、ドットインストールさんの無料講座「さくらのVPSの基礎 (全21回) 」を見て書いています(もしも問題があるようなら、すぐに削除します)。細かい設定で省いている部分がありますので、正確なところはこの講座をごらんください。この講座はたいへんわかりやすくてすばらしいです!3分単位でさくさく学べます。 前提 Windows 7, PuTTY, msysgit, Firefox, Mail ssh, ssh-keygen, scpはmsysgitのものを使った さくらのVPS申し込み Firefox: http://vps.sakura.ad.jp/ さくらのVPS 1G Mail: お申込受付完了のお知らせ Mail: [さくらのVPS] 仮登録完了の
コンテキスト 作業ごとに進捗をパーセンテージで表したデータがExcelにあるとする。 問題 進捗の様子をパッと知りたい。 特に進捗が進んでいて「大丈夫」な作業はどれで、遅れていて「注意」な作業はどれで、すごく遅れていて「危険」な作業をざっくり知りたい。 解決 進捗の範囲を選択し、「条件付き書式」で「アイコンセット」を選べばよい。 詳細手順 (1)進捗の範囲を選択する。(このデータは適当に作りました) (2)「条件付き書式」→「アイコンセット」を選ぶ。 (3)自動的に三段階に分けてマークを付けてくれる。どこが赤信号か一目でわかりますね。 ※進捗はパーセンテージ(0〜100)である必要はありません。自動的に3段階に分割されます。 ※またどの数値の範囲をどのアイコンにするかは微調整できます。 関連 この日記の中のExcel関連記事一覧 【旧商品】Microsoft Office Excel 20
日付や数値がたくさん入っているデータがあるとします。 そのデータについて「何かわからないかな?」という簡単な分析をしようと思ったとき、Excelの「条件付き書式」が非常に手軽で便利です。 条件付き書式を使うと、セルの数値の「相対的な大きさ」をセルの中に「グラフ」のように表示したり、「相対的な大きさ」を「色の濃度」で表現したりという指定ができるのです。 ↓たとえば、このような感じになります(このデータは適当に作りました)。 このようにすると、Excelの表そのものが、データの傾向や特異な点を視覚的に教えてくれるようで、なかなか楽しくなります。 【旧商品】Microsoft Office Excel 2010 通常版 [パッケージ] 出版社/メーカー: マイクロソフト発売日: 2010/06/17メディア: DVD-ROM購入: 9人 クリック: 136回この商品を含むブログ (12件) を見
ActivePerlでNet::Twitterモジュールを使用してWindowsのコマンドラインからTwitterを更新するPerlスクリプトです。 準備 C:\work> ppm install Net::Twitter (Net::Twitterモジュールをインストール)スクリプト(tw.pl) #!/usr/bin/perl use strict; use warnings; use Encode; use YAML::Syck; use Net::Twitter; my $yaml = 'tw.yaml'; my $conf = YAML::Syck::LoadFile($yaml) or die qq{$yaml:$!\n}; my $status = $ARGV[0] or die qq{$0 message (in $conf->{encoding})\n}; $status
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く