Skip to content

NishikiChisato/workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workflow

Neovim

Usage

Delete or backup ~/.config/nvim/, ~/.local/share/nvim/ and ~/.local/state/nvim/:

# delete
rm -rf ~/.config/nvim/*
rm -rf ~/.local/share/nvim/*
rm -rf ~/.local/state/nvim/*

# backup
mv ~/.config/nvim{,.bak}
mv ~/.local/share/nvim{,.bak}
mv ~/.local/state/nvim{,.bak}

Paste this nvim file to ~/.config/ and start nvim:

# assume nvim exist in current directory
cp ./nvim ~/.config

Prerequisite

Herd Font

  1. Download

We can go to the Nerd Fonts releases page to download the font we want.

For example, we can download Hack Nerd Font using the following command:

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.0/Hack.zip
  1. Unzip and Create local fonts directory

Unzip the downloaded fonts archive:

unzip Hack.zip -d Hack

Create local fonts directory

mkdir -p ~/.local/share/fonts
  1. Move the fonts to the local fonts directory
mv Hack/*.ttf ~/.local/share/fonts
  1. Update the fonts cache
fc-cache -fv
  1. Verify Installation
fc-list | grep "Hack"

ripgrep

Telescope live_grep relies on ripgrep for searching, we can install it using:

sudo apt-get install ripgrep

fd-find

Telescope find_files relies on fd-find for searching, we can install it using:

sudo apt-get install fd-find

Tmux

Usage

Installing tpm as packages manager:

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

Note that we install it into ~/.config/, instead default directory ~/.tmux/.

cp -r ./tmux ~/.config/

Prerequisite

In order to yank or paste content in tmux, we musl install xclip first:

sudo apt-get install xclip

Now that, in tmux, we can press prefix + [ to enter copy mode, and press y to yank something you want. To paste in tmux, press prefix + ].

The content we choosed in copy mode will be automatically copy to system clipboard, so we can directly press Ctrl + v to paste it in another plases.

Zsh

Instruction for installing zsh is here

Run the following command to install ohmyzsh

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

Nvim-diff

Svn

If you are using svn and want to enter diff mode of nvim when executing svn diff, we can:

# copy the script to /bin
cp ./diff/svn-diff /bin

# grants execute mode to it
chmod +x /bin/svn-diff

# edit you global subversion configure file
nvim ~/.subversion/config

Set the value of key diff-cmd to svn-diff:

diff-cmd = svn-diff

Git

Note that you can consult this answer for more information.

# copy the script to /bin
cp ./diff/nvim-diff /bin

# grants execute mode to it
chmod +x /bin/nvim-diff

Using git config to let git knows this external script:

# by default, when executes `gid diff`, it will enter interactive mode(e.g. it will automatically enter less)
# if you want to print contents from `git diff` to terminal and don't enter interactive mode, you can execute `git --no-pager diff`
# so, we must set pager of git to cat, let `git diff` just print its content to terminal
git config --global pager.diff "cat"
git config --global diff.external /bin/nvim-diff

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published