Skip to content

Dambe/utils

 
 

Repository files navigation

Title

Adding git completion for the Shell

Git scripts source

git-completion.zsh is taken from https://github.com/git/git/tree/master/contrib/completion

wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh

Global git configuration

Create symbolic link to local git.config to use it as global Git configuration:

ln -s ~/utils/git.config ~/.gitconfig

Show diff output as two windows in vimdiff

To use you can create a symbolic link to xd in /usr/local/bin:

ln -s ~/src/utils/xd /usr/local/bin/xd

Example usage:

git diff ... |xd
hg diff ... |xd
svn diff ... |xd
cat some.patch |xd

You can also preprocess diff output to get more precise results:

git diff ... |grep -v ... |sed ... |xd
cat some.patch |grep -v ... |sed ... |xd

Install oh-my-zsh

Install zsh

sudo apt install zsh

Make zsh the default shell

chsh -s /bin/zsh

Install SF-Mono-Powerline font

mkdir -p ~/.fonts
git clone https://github.com/Dambe/SF-Mono-Powerline.git ~/src/fonts/SF-Mono-Powerline
cp ~/.fonts/SF-Mono-Powerline-* ~/.local/share/fonts
fc-cache -fv

Install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
rm ~/.zshrc

Create symlinks

ln -s ~/src/utils/oh-my-zsh.rc ~/.zshrc
ln -s ~/src/utils/amuse_own.zsh-theme ~/.oh-my-zsh/themes/amuse_own.zsh-theme
source ~/.zshrc

Install fuzzysearch

Refer to https://github.com/junegunn/fzf

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

Setup tmux

Install tmux

sudo apt install tmux

Create symlink for tmux configuration

ln -s ~/src/utils/tmux.conf ~/.tmux.conf

Install tmux plugin manager (TPM). Refer to https://github.com/tmux-plugins/tpm

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Start tmux using tmux -2 and run the following command

tmux source ~/.tmux.conf

To install plugins, press prefix + I (capital i, as in Install) to fetch the plugins.

Install shell color theme base16

Refer to https://github.com/chriskempson/base16-shell

git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell

Setup vim

Create symlink to vim configuration

ln -s ~/src/utils/vim.rc ~/.vimrc

Install vim Plugin Manager vim-plug. Refer to https://github.com/junegunn/vim-plug

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Open vim and type :PlugInstall to install plugins.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%