Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dc3671/dotfiles

dotfiles for frontend-developer and python-user, including: vim(support vue files and python pylint), tmux, zsh(with oh-my-zsh)
https://github.com/dc3671/dotfiles

config dotfiles frontend-developer tmux vim vue ycm zsh

Last synced: 10 days ago
JSON representation

dotfiles for frontend-developer and python-user, including: vim(support vue files and python pylint), tmux, zsh(with oh-my-zsh)

Awesome Lists containing this project

README

        

# Dotfiles #

My dotfiles for frontend-developer and python-user, including:

* vim(support vue files and python pylint)
* tmux
* zsh(with [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh))

## Install ##

Make sure `vim`, `tmux`, `zsh`, `git` have been installed.

```bash
git clone https://github.com/dc3671/dotfiles.git
cd dotfiles
./install.sh
```

## Advanced config for `YouCompleteMe` ##

Install [`YouCompleteMe`](https://github.com/Valloric/YouCompleteMe) plugin, require Vim 7.4.1578 with Python 2 or Python 3 support. Because `YouCompleteMe` contains many submodules and it will cost a lot of time, I just add basic `js` and `python` support of it. If you need more support such as Go, Java, and C, you may do as below:

```bash
cd ~/.vim/bundle/YouCompleteMe/
# for C# support
python install.py --cs-completer
# for Go support
python install.py --go-completer
# for Java support
python install.py --java-completer
```
reference: https://github.com/Valloric/YouCompleteMe#installation

## Key Mappings ##

**may already be depreciated**

### Tmux ###

`` key has been changed to ctrl+x
```tmux
set -g prefix C-x
```

resize window
```tmux
bind -r ^k resizep -U 10 # upward (prefix Ctrl+k)
bind -r ^j resizep -D 10 # downward (prefix Ctrl+j)
bind -r ^h resizep -L 10 # to the left (prefix Ctrl+h)
bind -r ^l resizep -R 10 # to the right (prefix Ctrl+l)
```

swap windows position
```tmux
# swap with the previous pane (prefix Ctrl+u)
bind ^u swapp -U
# swap with the next pane (prefix Ctrl+d)
bind ^d swapp -D
```

split window
```tmux
unbind '"' # vertical split (prefix -)
bind - splitw -v
unbind %
bind | splitw -h # horizontal split (prefix |)
```

reload config `prefix+r`
```tmux
bind r source-file ~/.tmux.conf \; display "Reloaded!"
```

### Vim ###

`` key has been changed to `,`
```vim
let mapleader = ','
```

edit or save&reload vim config without exit
```vim
let g:spf13_edit_config_mapping='ec'
let g:spf13_apply_config_mapping='sc'
```

easier moving in windows
```vim
map j
map k
map l
map h
```

delete current buffer
```vim
nnoremap qq :Bdelete
```

toggle search highlight
```vim
nmap / :set invhlsearch
```

delete all trailing whitespaces
```vim
map :FixWhitespace
```

use 'm/M' to move among buffers
```vim
noremap m :bn
noremap M :bp
```

toggle between two buffers
```vim
nnoremap t
```
quick move in insert mode
```vim
inoremap o
inoremap
inoremap
inoremap
inoremap
inoremap
inoremap
inoremap
```

Go to home and end using capitalized directions
```vim
noremap H 0
noremap L $
noremap Y y$
```

select all
```vim
noremap sa ggVG
```

autoformat file
```vim
noremap f :Autoformat
```

CtrlSF, a grep plugin like that in SublimeText
```vim
nmap f CtrlSFPrompt
vmap f CtrlSFVwordPath
vmap F CtrlSFVwordExec
nmap n CtrlSFCwordPath
nmap p CtrlSFPwordPath
nnoremap o :CtrlSFOpen
nnoremap t :CtrlSFToggle
inoremap t :CtrlSFToggle
```

Nerdtree, show directory structures
```vim
map NERDTreeTabsToggle
map e :NERDTreeFind
nmap nt :NERDTreeFind
```

fzf, search files/tags/text among project
```vim
nnoremap :Files
nnoremap :Tags
nnoremap / :Ag
```

more detailed mapping see `.vimrc` -> `Key Mapping` part

## Contact ##

Any problem is welcome in [issues](https://github.com/dc3671/dotfiles/issues)

[Dash Chen](https://github.com/dc3671)