https://github.com/mildronize/dotfiles
My dotfiles
https://github.com/mildronize/dotfiles
Last synced: about 1 year ago
JSON representation
My dotfiles
- Host: GitHub
- URL: https://github.com/mildronize/dotfiles
- Owner: mildronize
- Created: 2015-10-05T17:39:24.000Z (over 10 years ago)
- Default Branch: develop
- Last Pushed: 2023-12-31T16:38:34.000Z (over 2 years ago)
- Last Synced: 2024-04-13T03:40:46.558Z (about 2 years ago)
- Language: Shell
- Size: 109 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dotfiles
A dotfiles boilerplate that anyone can fork it to save own configuration and ready to use. It contains [Vim](http://www.vim.org), [Zsh](http://www.zsh.org) with [Oh-my-zsh] and [Tmux](https://tmux.github.io/) configurations.
## Warning!
This `dotfiles` supports only no config of vim, tmux and zsh. In the other hand, you should to **backup your current configurations** of each program.
**Features**
- To reduce tightly coupled in each tool from [my previous version](https://github.com/mildronize/dotfiles-legacy) (forked from [ibotdotout](https://github.com/ibotdotout/dotfiles))
- To use [Dotbot](https://github.com/anishathalye/dotbot/) to create symbolink to my home automatically
- Use [Vim Plug]
The previous version uses [Janus Vim](https://github.com/carlhuda/janus)
- Use [Zgen](https://github.com/tarjoilija/zgen) to manage [Oh-my-zsh] and zsh plugins
## Todo
- [ ] Change Zgen to [ZPlug](https://github.com/zplug/zplug)
### How to use my dotfiles
1. Fork this repository
2. Commit your own configurations
[Oh-my-zsh]: https://github.com/robbyrussell/oh-my-zsh
> **Note:** This version is only install all things, next, I will seperate it.
## Contents
* [dotfiles](#dotfiles)
* [Usage](#usage)
* [Quick Setup](#quick-setup)
* [Manual](#manual)
* [Add Vim Plugin](#add-vim-plugin)
* [For Putty](#for-putty)
* [Install Powerline fonts](#install-powerline-fonts)
* [Managing your custom configurations](#managing-your-custom-configurations)
* [Vim](#vim)
* [Features](#features)
* [My Mapping Keys](#my-mapping-keys)
* [Overriding Basic key](#overriding-basic-key)
* [Work with Git by Fugitive ](#work-with-git-by-fugitive)
* [Auto zoom when active window by GoldenView ](#auto-zoom-when-active-window-by-goldenview)
* [Travel in a tree explorer by NERDtree ](#travel-in-a-tree-explorer-by-nerdtree)
* [Working with system clipboard by System Copy ](#working-with-system-clipboard-by-system-copy)
* [Quick comment code by NERDcommenter ](#quick-comment-code-by-nerdcommenter)
* [Quick aligning code by Tabular ](#quick-aligning-code-by-tabular)
# Usage
2 ways to use
1. quick setup or
2. manual
## Quick setup
### Installation
- Make sure you installed `git curl zsh tmux vim`, then run the command:
```
git clone https://github.com/mildronize/dotfiles.git ~/.dotfiles && cd ~/.dotfiles && make all
```
For tmux config, it requires to run `make tmux` inside tmux session.
## Manual
### Installation
- Make sure you installed `git curl zsh tmux vim`
- `git clone https://github.com/mildronize/dotfiles.git ~/.dotfiles`
- `cd ~/.dotfiles`
- `make vim-all` for installing [Vim Plug] that it can manage many vim plugins
- `make zsh` for installing zsh config
- `make tmux` for installing tmux config, note run this command inside tmux session.
- Run `zsh` to run zsh and install their plugins oh-my-zsh
### Update zsh config
- `rezsh` or `zgen reset && source ~/.zshrc`
## Add Vim Plugin
- Add plugin name in `~/.vimrc`
- Reload vim config `:source ~/.vimrc` or Reopen vim
- Install & Update plugin by using `:PlugInstall`
## For Putty
- [My Putty Configuration](https://gist.githubusercontent.com/mildronize/3ffffa30b98ddaa7d942/raw/13126c182b15289d44b352d17e0ad27d086650da/mildronize-putty-sessions.reg)
- Run `export PUTTY=true`
## Install Powerline fonts
- Support on Linux and Windows
-
## Install Cheat
[Interactive cheatsheets on the command-line](https://github.com/chrisallenlane/cheat)
- `sudo easy_install cheat`
## Problem
- **Q**: `zsh` isn't set to default shell
- **A**: `chsh -s /usr/bin/zsh [username]` (Don't use `sudo`)
[Vim Plug]: https://github.com/junegunn/vim-plug.git
## Managing your custom configurations
- Edit your custom configurations
```
Config for zsh : zsh/.zshrc.local
Config for Vim : vim/.vimrc.local
Config for Vim key : vim/.vimrc.key.local
Config for Vim Plugin : vim/plugin/*.vim
```
- Uncomment or add your config files what you place into your `$HOME` path at `.install.conf.yaml`
> Note: This file uses [yaml](http://yaml.org/) format
- Create new symbolinks of your dotfiles with [dotbot](https://github.com/anishathalye/dotbot/) using `./dotbot`
> Note: If you got some error, you should cope your existing dotfiles.
# Vim
Vim Usage:
- See in [Multi-language Vim Cheat sheet](http://sim.rtorr.com)
- มีภาษาไทยด้วยนะ ดูได้ใน [คู่มือการใช้ Vim ฉบับย่อ](http://vim.rtorr.com/lang/th/)
## Features
- Auto `PASTE` mode when pasting in insert mode
## My Mapping Keys
### Overriding Basic key
File: `~/.vimrc.keys`
Action | Key
--- | ---
Leader | space
Go to NORMAL mode | jk or kj
Toggle PASTE mode | F3
Switching word wrap | `leader` w
`INSERT` Jump out to the end of line
(still in insert mode) | Ctrll
Move to {next,previous} tab | L , H
Swap window to {next,previous} buffer | `leader` l , `leader` h
Toggle search highlight | `leader`hs
Toggle background dark or light | `leader`bg
### Work with Git by [Fugitive]
Action | Key
--- | ---
Git status | `leader`gs
Git commit | `leader`gc
Git push | `leader`gp
Git diff | `leader`gd
Read more at [Fugitive]
[Fugitive]: https://github.com/tpope/vim-fugitive
### Auto zoom when active window by [GoldenView]
Always have a nice view for vim split windows
Action | Key
--- | ---
Go to next split window | Ctrln
Swapping main split with not main split | F7
Read more at [GoldenView]
[GoldenView]: https://github.com/zhaocai/GoldenView.Vim
### Travel in a tree explorer by [NERDtree]
Action | Key
--- | ---
Toggle NERDtree | `leader`n
Read more at [NERDtree]
[NERDtree]: https://github.com/scrooloose/nerdtree
### Working with system clipboard by [System Copy]
Prerequisite: `xsel` for linux, other? read in [System Copy]
Action | Key
--- | ---
Copy the selected text into system clipboard | cp
`NORMAL` Paste from system clipboard into new line | cv
Read more at [System Copy]
[System Copy]: https://github.com/christoomey/vim-system-copy
### Quick comment code by [NERDcommenter]
Action | Key
--- | ---
Toggle comment code | `leader`/
Comment code | `leader`cc
Uncomment code | `leader`cu
Read more at [NERDcommenter]
[NERDcommenter]: https://github.com/scrooloose/nerdcommenter
### Quick aligning code by [Tabular]
Usage: `leader`a[Char what you want to align in same position in each line]
Example code:
```
dog=1
elephant=1
```
To algin use `leader`a= , after that:
```
dog = 1
elephant = 1
```
If it's not work. Don't worry!. Just add your key map in `~/.dotfiles/vim/plugin/tabular.vim`
Read more at [Tabular]
[Tabular]: https://github.com/godlygeek/tabular