mirror of https://github.com/einverne/dotfiles.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
3.7 KiB
111 lines
3.7 KiB
2 years ago
|
This is my personal dotfiles which contain config for vim, zsh, tmux, git, fzf, etc;
|
||
10 years ago
|
|
||
2 years ago
|
## macOS setup
|
||
|
Set up by using [dotbot](https://blog.einverne.info/post/2020/08/use-dotbot-dotfiles-management.html):
|
||
4 years ago
|
|
||
2 years ago
|
cd ~
|
||
4 years ago
|
git clone [email protected]:einverne/dotfiles.git
|
||
|
cd dotfiles
|
||
2 years ago
|
# to bootstrap config for vim, zsh, tmux, git, fzf, etc
|
||
3 years ago
|
make bootstrap
|
||
|
# under Linux desktop, install essential packages
|
||
3 years ago
|
make linux
|
||
2 years ago
|
# under macOS, install applications by brew
|
||
|
make mac
|
||
|
|
||
|
Log out and log in again, zinit will install all plugins automatically. If you tried to edit file by vi, the vim-plug will install all plugins automatically.
|
||
4 years ago
|
|
||
2 years ago
|
## Termux setup
|
||
|
Install dependency first:
|
||
|
|
||
|
pkg install make python vim git
|
||
|
|
||
|
then:
|
||
|
|
||
|
git clone [email protected]:einverne/dotfiles.git
|
||
|
cd dotfiles
|
||
|
make termux
|
||
|
|
||
6 years ago
|
## Overview
|
||
|
|
||
3 years ago
|
- using [dotbot](https://github.com/anishathalye/dotbot/) to manage dotfiles, [read more](https://blog.einverne.info/post/2020/08/use-dotbot-dotfiles-management.html)
|
||
3 years ago
|
- zsh, using [zinit](https://blog.einverne.info/post/2020/10/use-zinit-to-manage-zsh-plugins.html) as zsh plugin management
|
||
4 years ago
|
- vim, using [vim-plug](https://github.com/junegunn/vim-plug) to manage vim plugins, vim-plug relate configuration is under `vim-plug_vimrc`. In Vim, `:PlugInstall` to install all vim plugins.
|
||
3 years ago
|
- tmux, using [tpm](https://blog.einverne.info/post/2017/12/tmux-plugins.html) to manage tmux plugins, in tmux, press `Ctrl +B` + `I` to install all tmux plugins.
|
||
2 years ago
|
- other useful tools, like [fzf](https://blog.einverne.info/post/2019/08/fzf-usage.html) to fuzzy search, ripgrep for recursively searching directories, zoxide to replace cd, exa to replace ls.
|
||
|
|
||
|
GUI applications:
|
||
|
|
||
|
- Kitty
|
||
|
- Karabiner-Elements
|
||
|
- Hammerspoon
|
||
5 years ago
|
|
||
5 years ago
|
### zsh config
|
||
2 years ago
|
to see `.zshrc` file.
|
||
5 years ago
|
|
||
|
### Vim config
|
||
5 years ago
|
vim-plug related configuration is under `vim-plug_vimrc`, to show all plugins list, use `:PluginList` in vim.
|
||
5 years ago
|
|
||
|
python related configurations is under `python_vimrc`.
|
||
|
|
||
5 years ago
|
## Components
|
||
|
|
||
|
- bin/: executable shell scripts, Anything in bin/ will get added to your $PATH and be made available everywhere.
|
||
|
- conf/: configuration file of zsh etc
|
||
|
|
||
2 years ago
|
## Instruction for vim
|
||
9 years ago
|
|
||
2 years ago
|
Enter the vim and then run `:PlugInstall` to install all plugins.
|
||
9 years ago
|
|
||
7 years ago
|
### install manually
|
||
9 years ago
|
Or, you can do it manually follow the step:
|
||
|
|
||
5 years ago
|
Enter vim, run `:PlugInstall`, after install all plugin, you will meet an error,
|
||
9 years ago
|
|
||
|
> Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.
|
||
|
|
||
|
For Ubuntu and derivatives:
|
||
|
|
||
|
sudo apt-get install exuberant-ctags
|
||
|
|
||
|
with yum:
|
||
|
|
||
|
sudo yum install ctags-etags
|
||
|
|
||
2 years ago
|
## Tmux config
|
||
|
I take some Tmux config from [gpakosz](https://github.com/gpakosz/.tmux). If you want to learn more about tmux, you can check [this article](http://einverne.github.io/post/2017/07/tmux-introduction.html).
|
||
7 years ago
|
|
||
2 years ago
|
You can manually install tmux plugins by `prefix + I`.
|
||
6 years ago
|
|
||
2 years ago
|
Tmux need:
|
||
6 years ago
|
|
||
|
- `tmux >= 2.1`
|
||
2 years ago
|
- You should set `$TERM` environment for `xterm-256color`
|
||
6 years ago
|
|
||
2 years ago
|
Tmux config:
|
||
6 years ago
|
|
||
2 years ago
|
- You can use `C-b` as prefix, and use `C-a` as second choice
|
||
|
- `prefix + |` to split panel vertically, `prefix + -` split panel horizontally
|
||
|
- `C-hjkl` to switch pane
|
||
|
- `prefix + Shift + HJKL` to adjust pane size
|
||
6 years ago
|
|
||
2 years ago
|
I use Tmux Plugin Manager to manage tmux plugins, and by default I use following plugins:
|
||
6 years ago
|
|
||
|
set -g @plugin 'tmux-plugins/tpm'
|
||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||
2 years ago
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||
|
set -g @plugin 'tmux-plugins/tmux-open'
|
||
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||
5 years ago
|
|
||
|
## fzf config
|
||
|
There are following alias in `.zshrc` :
|
||
|
|
||
|
- fe : open file using $EDITOR
|
||
|
- fo : open file Ctrl-o using open, Ctrl-e use $EDITOR
|
||
2 years ago
|
- fcd : cd path (fd to replace find)
|
||
5 years ago
|
- fkill : kill process
|
||
|
- tm : tm new tmux session
|
||
|
- fs : tmux attach tmux session
|