Skip to content

Commit

Permalink
chore: bump vim-plug and lsix
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Jun 12, 2024
1 parent 5a681e9 commit 80610b3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if has('autocmd') " vim-tiny does not have autocmd
autocmd FileType sh,bash setlocal equalprg=shfmt
augroup end
autocmd FileType c,cpp if expand('%:p') =~ '^/usr/include/\(\(c++\)\|\(\w\+\.h$\)\)' | setlocal tabstop=8 shiftwidth=8 softtabstop=8 | else | setlocal tabstop=2 shiftwidth=2 softtabstop=2 | endif
autocmd FileType cuda,vim,tex,html,sh,zsh,json,lua setlocal tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType cuda,vim,tex,html,sh,zsh,lua setlocal tabstop=2 shiftwidth=2 softtabstop=2
" tex使用空格缩进
autocmd FileType tex setlocal expandtab
if v:version >= 901
Expand Down
63 changes: 16 additions & 47 deletions root/.vim/autoload/plug.vim
Original file line number Diff line number Diff line change
@@ -1,67 +1,36 @@
" vim-plug: Vim plugin manager
" ============================
"
" Download plug.vim and put it in ~/.vim/autoload
" 1. Download plug.vim and put it in 'autoload' directory
"
" # Vim
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
" Edit your .vimrc
" # Neovim
" sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
"
" call plug#begin('~/.vim/plugged')
" 2. Add a vim-plug section to your ~/.vimrc (or ~/.config/nvim/init.vim for Neovim)
"
" " Make sure you use single quotes
" call plug#begin()
"
" " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
" Plug 'junegunn/vim-easy-align'
" " List your plugins here
" Plug 'tpope/vim-sensible'
"
" " Any valid git URL is allowed
" Plug 'https://github.com/junegunn/vim-github-dashboard.git'
"
" " Multiple Plug commands can be written in a single line using | separators
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
"
" " On-demand loading
" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
"
" " Using a non-default branch
" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
"
" " Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
" Plug 'fatih/vim-go', { 'tag': '*' }
"
" " Plugin options
" Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
"
" " Plugin outside ~/.vim/plugged with post-update hook
" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
"
" " Unmanaged plugin (manually installed and updated)
" Plug '~/my-prototype-plugin'
"
" " Initialize plugin system
" call plug#end()
"
" Then reload .vimrc and :PlugInstall to install plugins.
"
" Plug options:
" 3. Reload the file or restart Vim, then you can,
"
"| Option | Description |
"| ----------------------- | ------------------------------------------------ |
"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use |
"| `rtp` | Subdirectory that contains Vim plugin |
"| `dir` | Custom directory for the plugin |
"| `as` | Use different name for the plugin |
"| `do` | Post-update hook (string or funcref) |
"| `on` | On-demand loading: Commands or `<Plug>`-mappings |
"| `for` | On-demand loading: File types |
"| `frozen` | Do not update unless explicitly specified |
" :PlugInstall to install plugins
" :PlugUpdate to update plugins
" :PlugDiff to review the changes from the last update
" :PlugClean to remove plugins no longer in the list
"
" More information: https://github.com/junegunn/vim-plug
" For more information, see https://github.com/junegunn/vim-plug
"
"
" Copyright (c) 2017 Junegunn Choi
" Copyright (c) 2024 Junegunn Choi
"
" MIT License
"
Expand Down
10 changes: 7 additions & 3 deletions root/.vim/doc/command-line-tool.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ uwberzug:

翻译 https://github.com/afc163/fanyi#error-spawn-festival-enoent

>
>bash
sudo apt-get install festival festvox-kallpc16k
npm i -g fanyi
<
Expand All @@ -235,14 +235,18 @@ uwberzug:
*onefetch* 查看git项目信息
https://github.com/o2sh/onefetch
https://onefetch.dev/
>
>bash
onefetch --include-hidden
<

-------------------------------------------------------------------------------

|git-quick-stats| 统计代码行数
>bash
apt install git-quick-stats
<
*cloc* 统计代码行数
>
>bash
cloc $(git ls-files)
cloc .
<
Expand Down
2 changes: 1 addition & 1 deletion root/.vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ if has('autocmd') " vim-tiny does not have autocmd
autocmd FileType sh,bash setlocal equalprg=shfmt
augroup end
autocmd FileType c,cpp if expand('%:p') =~ '^/usr/include/\(\(c++\)\|\(\w\+\.h$\)\)' | setlocal tabstop=8 shiftwidth=8 softtabstop=8 | else | setlocal tabstop=2 shiftwidth=2 softtabstop=2 | endif
autocmd FileType cuda,vim,tex,html,sh,zsh,json,lua setlocal tabstop=2 shiftwidth=2 softtabstop=2
autocmd FileType cuda,vim,tex,html,sh,zsh,lua setlocal tabstop=2 shiftwidth=2 softtabstop=2
" tex使用空格缩进
autocmd FileType tex setlocal expandtab

Expand Down
18 changes: 8 additions & 10 deletions root/scripts/lsix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Requirements: just ImageMagick (and a Sixel terminal, of course)

# Version 1.8.2
# B9 November 2023
# Version 1.9
# B9 June 2024

# See end of file for USAGE.

Expand Down Expand Up @@ -54,7 +54,9 @@ if [[ ${BASH_VERSINFO[0]} -eq 3 ]]; then
fi
fi

if ! command -v montage >/dev/null; then
magick=$(type -p magick) # For ImageMagick 6 <-> 7 compatibility.

if ! command -v $magick montage >/dev/null; then
echo "Please install ImageMagick" >&2
exit 1
fi
Expand All @@ -65,10 +67,6 @@ if command -v gsed >/dev/null; then
alias sed=gsed # Use GNU sed for MacOS & BSD.
fi

if [[ "$COMSPEC" ]]; then
alias convert="magick convert" # Shun MS Windows' "convert" command.
fi

cleanup() {
echo -n $'\e\\' # Escape sequence to stop SIXEL.
stty echo # Reset terminal to show characters.
Expand Down Expand Up @@ -103,7 +101,7 @@ autodetect() {
You may test your terminal by viewing a single image, like so:
convert foo.jpg -geometry 800x480 sixel:-
$magick convert foo.jpg -geometry 800x480 sixel:-
If your terminal actually does support sixel, please file a bug
report at http://github.com/hackerb9/lsix/issues
Expand Down Expand Up @@ -241,8 +239,8 @@ main() {
onerow[len++]="file://$1"
shift
done
montage "${onerow[@]}" $imoptions gif:- \
| convert - -colors $numcolors sixel:-
$magick montage "${onerow[@]}" $imoptions gif:- \
| $magick convert - -colors $numcolors sixel:-
done
}

Expand Down

0 comments on commit 80610b3

Please sign in to comment.