Git Product home page Git Product logo

dotfiles's Introduction

dotfiles

How to Use

やること

git clone https://github.com/kagerouttepaso/dotfiles
cd dotfiles
./install.sh

注意
結構依存しているパッケージがある。
必要なパッケージ一覧(Ubuntuのパッケージ名)以下のとおり

  • git
  • tmux
  • zsh
  • pandoc
  • exuberant-ctags
  • xclip
  • curl
  • silversearcher-ag
  • pt
  • clang
  • rtags
  • npm
    • mermaid
    • markdown-pdf

ubuntu12.04以上ならこっちをgit cloneしてchefを走らせたほうが賢明です   Chef_work

Windows環境

MSYS2

Cygwin

Windows環境でも基本的に必要パッケージをインストールしてやること のコマンドを入れれば問題ない。
x11のパッケージセットをインストールすればssh接続先のクリップボードの共有もできる用になっています
Cygwinを使うのをやめました

入れるパッケージ

  • git
  • zsh
  • ctags
  • x11すべて
  • curl
  • openssh
  • tmux

teraterm

設定ファイル を読みこめばいい感じになる

香り屋版Gvimへの対応

  1. Source Treeをダウンロードしてインストール、このDotfilesを好きなところにCloneしてくる。
  2. install.bat を管理者権限で実行 手順はunite-everythingのヘルプを参照
  3. 香り屋版Gvimをダウンロード
  4. Windows版agをダウンロードしてくる
    ダウンロードしてきた実行ファイルはgvimのファルダにつっこむ
  5. gvimを起動ここで色々エラーが出るけど気にしない。 プラギンのインストールするか聞かれるけどNOを選択。
    :NeobundleInstallでプラグインをインストール!!
  6. 快適なGvimライフへようこそ

Windows上だとrgrepがうまく動かないのでUniteGrepを使ってください

dotfiles C:\Users\UserName
./_vimrc _vimrc
./_gvimrc _gvimrc
./_vim .vim

その他メモ

コマンド

自前で設定したコマンドとか

zsh

all Platform

command mean
tmux tmux -2
sshx ssh -XC
zshrc vim ~/.zshrc
vimrc vim ~/.vimrc
sshconfig vim ~/.ssh/config
j run autojump

Linux

command mean
tmuxx tmux attach -d
md2html file encoded HTML in pandoc, and open in browser

cygwin

command mean
cdcyg move to desktop

vim

主な変更

  • バックアップ取らない
  • スワップ作らない
  • バックスペースで色々消せる
  • ビープ音鳴らさない
  • モードを表示
  • マウスを使用する
  • クリップボードを使用する
  • 全角スペースを表示
  • tagsファイルは6回階層上のものまで読み込む
  • 前回終了したカーソル行に移動
  • 補完にはNeocomplateを使用するが、使えない時はNeocomplecacheを使う

vimのシンタックス

javascript vimを使ってjavascriptの編集をするときは hshint をインストールするとシンタックスのチェックをしてもらえる
windows環境でそれを行うときは、nodejsをダウンロードして下記のコマンドを実行

拡張コマンド

挿入モード

command mean
<C-p> 貼付け
<C-j> <Down>
<C-k> <Up>
<C-h> <Left>
<C-l> <Right>
jj <esc>
, ,<Space>

ノーマルモード

command mean
<Space> 次のバッファへ
b 前のバッファへ
<C-g><C-g> カーソル下の単語をバッファを対象にGrep
<C-g><C-r> カーソル下の単語をカレントフォルダから再帰的にGrep
Ctags :!ctags -R
tt タグジャンプ
tb 現在開いているバッファを閉じてタグスタックをひとつ戻す
t1~t9 対応したタブ番号へ飛ぶ
tn 次のタブへ
tp 前のタブへ
tr バッファをタブ展開
0 行末へ
9 行頭へ
+ フレームサイズ増加
- フレームサイズ減少
( 対応するカッコに移動
) 対応するカッコに移動
vy カーソル位置の単語をヤンク
<C-j> <C-w>j
<C-k> <C-w>k
<C-l> <C-w>l
<C-h> <C-w>h
gl :GitGutterNextHunk
gh :GitGutterPrevHunk
<C-p> ペーストするレジスタを一つ古いものにする(ペーストした直後のみ)
<C-n> ペーストするレジスタを一つ新しいものにする(ペーストした直後のみ)
ss 置換開始
sw カーソル以下の単語を置換
gx カーソル以下の単語でブラウザ検索

ビジュアルモード

command mean
0 行末へ
v 行末へ
9 行頭へ
sw 文書全体で、選択した文章を置換
ss 選択した範囲を置換
<Enter> Alignの修正モードへ
gx カーソル以下の単語でブラウザ検索

コマンド

command mean
Tig gitのログビュアー
QB ウィンドウの形を変えずにバッファを閉じる
QB バッファを閉じてウィンドウも閉じる
TN NERDTree起動
TS SourceExplorer起動
TT TagList起動
TA 上記3つを起動
Rgrep カーソル下の単語をカレントディレクトリからgrep
Bgrep カーソル下の単語をバッファからgrep
VimShell VimShellの起動
VimFiler VimFilerの起動

Unite
Grepの検索エンジンにはagが使えればそちらを使う

command mean
f [unite]
[unite]u <C-u>Unite -no-split<Space>
[unite]a 全部乗せ<C-u>Unite -buffer-name=all buffer file_mru bookmark file grep:. find:.<CR><C-r><C-w><CR>*<C-r><C-w>*<CR>
[unite]b バッファ一覧<C-u>Unite buffer<CR>
[unite]h 最近使用したファイル一覧<C-u>Unite buffer file_mru<CR>
[unite]d カレントディレクトリからファイル一覧<C-u>Unite -buffer-name=files file<CR>
[unite]D Gitのカレントディレクトリからファイル一覧<C-u>Unite -buffer-name=git_files file_rec/async:! -winheight=15<CR>
[unite]c 現在のバッファのディレクトリからファイル一覧<C-u>UniteWithBufferDir -buffer-name=files file<CR>
[unite]r レジスタ一覧<C-u>Unite register<CR>
[unite]g グレップ検索<C-u>Unite grep:. -buffer-name=serch-buffer -no-quit<CR><C-r><C-w><CR>
[unite]G グレップ検索(対話的)<C-u>Unite grep -no-quit<CR>
[unite]f ファイル検索(win以外)<C-u>Unite find:. -buffer-name=serch-file -no-quit<CR>*<C-r><C-w>*<CR>
[unite]f ファイル検索(win) 日本語が文字化けしてしまう…<C-u>UniteWithCursorWord everything/async -no-quit<CR>
[unite]F ファイル検索(win)<C-u>Unite everything/async -no-quit<CR>
[unite]s ソースリスト<C-u>Unite source<CR>
[unite]o アウトラインを展開<C-u>Unite outline -buffer-name=outline -no-focus -no-start-insert<CR>
[unite]t アウトラインを展開<C-u>Unite outline -vertical -winwidth=50 -buffer-name=outline -no-focus -no-start-insert -no-quit<CR>

teratermとscreen

キーバインドを変更してある。とりあえずtmux.confscreenrcを見てください。
バインドはteratermがCtrl+oscreenがctrl+aにバインドされてます

npm config set proxy http://proxy.com:port --global
npm install jshint --global

memo

cygwinでctagsを使うときはExuburantCtagsを使わないとうまく行かなそう

todo

OSS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.