This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. there are two gitsh in config.fish, delete the second one | |
2. abbr gitpl 'git pull -v' | |
3. abbr gitpu 'git push -v' | |
4. delete z.fish and zz.fish | |
5. clean config.fish | |
6. remove stow in ~/.local/bin, it depends on other libs, and find a binary/script replacement | |
7. replace grep -w with extra space, since -w doesn't parse `-` like t-xa | |
set -gx Z_PATH ~/.config/fish/functions/ | |
if test -e $Z_PATH/z.lua |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/anaconda3/share/emacs/26.1/lisp/textmodes/flyspell* | |
condai conda-forge hunspell | |
;; spell check | |
;; find aspell and hunspell automatically | |
(cond | |
;; try hunspell at first | |
;; if hunspell does NOT exist, use aspell | |
;; Using hunspell may produce the "Error enabling Flyspell mode: (stringp nil)" problem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
channels: | |
- ripl-org | |
- lebedov | |
- conda-forge | |
- defaults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# After install package using `conda install -c CHANNEL PKG`, you have to manually | |
# conda config --add channels your_new_channel, or these packages won't be updateed when `condau` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function elpac -d 'print old packages in .emacs.d/elpa/, with any command, it will clean old ones' | |
set -l elpa_path ~/.emacs.d/elpa | |
# ls contains color which will affect the $pkg string, * part means only directories | |
for pkg in (command ls $elpa_path) | |
if echo $pkg | grep -q '[0-9]' # check if pkg $contains version number, $status = 0 | |
set -l pkg_ver (echo $pkg | sed 's!.*-!!') | |
set -l pkg_name (echo $pkg | sed 's/[0-9.]*$//g') | |
set pkg_com (echo $pkg_name(echo $pkg_ver | cut -c1)) | |
if test (command ls $elpa_path | grep "^$pkg_com" | wc -l) -gt 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make projectile/helm-projectile prefix key work | |
(define-key projectile-mode-map (kbd "C-c C-p") 'projectile-command-map) | |
install helm-pydoc package | |
(with-eval-after-load "python" | |
(define-key python-mode-map (kbd "C-c D") 'helm-pydoc)) | |
change | |
helm-moccur-auto-update-on-resume 'noask | |
to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
change | |
Plugin 'gmarik/Vundle.vim' | |
to | |
Plugin 'VundleVim/Vundle.vim' | |
" this fix the errors(like Error detected while processing function) when using VundleInstall/Update | |
set shell=/bin/bash | |
Plugin 'liuchengxu/vim-which-key' | |
nnoremap <silent> <leader> :WhichKey '<leader>'<CR> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0. abbr lesst 'less ~/.tmux.conf' | |
0.1 abbr lessf 'less ~/.config/fish/config.fish' | |
0.2 abbr lesse 'less ~/.emacs.d/init.el' | |
1. replace alias to abbr | |
1.1 exclute such as rg, ls, ll, lla, lah, rm, cp, mv, du, less, wget, emx, time, ping, find | |
fine they will be used in other functions | |
2. delete $argv[1] part in m* abbrs | |
3. delete t-c* abbrs | |
4. make abbr containing abbr to function | |
5. set -gx FISH_CONFIG_PATH ~/.config/fish/config.fish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find | |
alias find 'find -L' # make find follow symlink dir/file by default | |
function f -d 'find the files by name, if no argv is passed, use the current dir' | |
find $argv[1] -name "*$argv[2]*" | |
end | |
function fl -d 'find a file using fzf and view it using less' | |
if fzfp # fzf exists, $status = 0 | |
less (find $argv[1] -name "*$argv[2]*" | fzf) | |
else | |
find $argv[1] -name "*$argv[2]*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
idx=1 # stop flag | |
result_dir="result" | |
create(){ | |
# input the info | |
read -e -p "The prefix of result archive: " prefix | |
result_prefix="$result_dir"/"$prefix" | |
read -e -p "The stop value: " stop # do actions every stop |