- gdbで実行する
- gdbでアタッチする
- gdbでリモートデバッグする
- デバッグ中のソースファイルをバッファ上で表示する
This file contains 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
" 120幅で改行する | |
set textwidth=120 | |
" 自動で改行する | |
set formatoptions+=t | |
" 挿入時、'textwidth'より短くても改行する | |
set formatoptions-=l | |
" 'textwidth'より短ければ、挿入時以降の空白でなくても改行する | |
set formatoptions-=v | |
" gqコマンドを使えば、既存のコードも自動で改行する |
This file contains 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
" 検索文字列をレジスタでグローバル置換 | |
function! s:ReplaceGlobalSearchToRegister() | |
let l:reg = getreg(v:register) | |
let l:cmd = '%substitute//' | |
let l:opt = '/g' | |
execute l:cmd . l:reg . l:opt | |
endfunction | |
nnoremap <silent> <Space>rs :<C-u>call <SID>ReplaceGlobalSearchToRegister()<CR> |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"os" | |
"strconv" | |
) | |
const topURL = "http://www.vim.org/scripts/" |
This file contains 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
# add print class tree method to Object | |
class Object | |
def self.print_class_tree | |
@class_tree ||= {} | |
# create class tree if not yet | |
ObjectSpace.each_object(Class) do |cls| | |
next if self == cls | |
# skip is cls is no name |
This file contains 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
" Inspired by ujihisa's vimrc | |
function! s:GitLogViewer() | |
" vnewだとコミットメッセージが切れてしまうのでnew | |
new | |
VimProcRead git log -u 'ORIG_HEAD..HEAD' | |
set filetype=git-log.git-diff | |
setlocal foldmethod=expr | |
setlocal foldexpr=getline(v:lnum)=~'^commit'?'>1':getline(v:lnum+1)=~'^commit'?'<1':'=' | |
setlocal foldtext=FoldTextOfGitLog() | |
endfunction |
This file contains 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
-----> Fetching custom git buildpack... done | |
-----> Ruby/Rack app detected | |
-----> Vendoring binaries | |
Fetching cairo-1.12.8.tgz | |
/tmp/build_2z0sqxbwxc8m1/vendor/cairo-1.12.8 | |
Exporting cairo-1.12.8.tgz build and include paths | |
Fetching pixman-0.28.0.tgz | |
/tmp/build_2z0sqxbwxc8m1/vendor/pixman-0.28.0 | |
Exporting pixman-0.28.0.tgz build and include paths | |
-----> Using Ruby version: ruby-2.0.0 |
This file contains 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
function! s:fix_number(pattern, ...) | |
if a:0 > 2 | |
return | |
endif | |
let s:start = exists('g:fix_number_default_start') ? g:fix_number_default_start : 0 | |
let s:step = exists('g:fix_number_default_step') ? g:fix_number_default_step : 1 | |
if a:0 >= 1 | |
let s:start = a:1 |
This file contains 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 'tyru/open-browser' | |
nnoremap gz vi':<C-u>call ExecuteWithSelectedText('OpenBrowser https://github.com/%s')<CR> | |
vnoremap gz :<C-u>call ExecuteWithSelectedText('OpenBrowser https://github.com/%s')<CR> | |
" visualモードで最後に選択したテキストを%sで指定してコマンドを実行する {{{ | |
function! ExecuteWithSelectedText(command) | |
if a:command !~? '%s' | |
return | |
endif |
This file contains 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 'tyru/open-browser' | |
NeoBundle 'kana/vim-operator-user' | |
call operator#user#define('open-neobundlepath', 'OpenNeoBundlePath') | |
map gz <Plug>(operator-open-neobundlepath) | |
function! OpenNeoBundlePath(motion_wise) | |
if line("'[") != line("']") | |
return | |
endif | |
let start = col("'[") - 1 |
OlderNewer